Sha256: 0c6c3a0ba0382dbea16275d88c3d93100e1092e97f06e9573977c5b8cde7cfeb

Contents?: true

Size: 1.36 KB

Versions: 14

Compression:

Stored size: 1.36 KB

Contents

#!/usr/bin/env ruby
# wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
# Freely reusable code: see SAMPLES-LICENSE.TXT for details
begin
  require 'rubygems' 
rescue LoadError
end
require 'wx'



class TestPanel < Wx::Panel
    def initialize(parent, log)
        @log = log
        super(parent, -1)
        
        b1 = Wx::Button.new(self, -1, "MDI demo")
        evt_button(b1.get_id) {|event| show_mdi_demo(event)}
        
        box = Wx::BoxSizer.new(Wx::VERTICAL)
        box.add(20,30)
        box.add(b1, 0, Wx::ALIGN_CENTER | Wx::ALL, 15)
        set_sizer(box)
    end
    
    def show_mdi_demo(event)
        mdi_demo_file = File.join( File.dirname(__FILE__), "MDIDemo.rbw")
        load mdi_demo_file
        frame = Demo::MyParentFrame.new
        frame.show
    end
end

module Demo
    def Demo.run(frame,nb,log)
        win = TestPanel.new(nb, log)
        return win
    end
    
    def Demo.overview
        "An MDI (Multiple Document Interface) parent frame is a window which can contain MDI child frames in its own 'desktop'. It is a convenient way to avoid window clutter, and is used in many popular Windows applications, such as Microsoft Word(TM)."
    end
end


if __FILE__ == $0
  run_solo_lib = File.join( File.dirname(__FILE__), 'run.rb')
  load run_solo_lib
  run File.basename($0)
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
wxruby3-0.9.2-x64-mingw-ucrt samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.1-x64-mingw-ucrt samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0-x64-mingw-ucrt samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.rc.3-x64-mingw-ucrt samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.rc.2-x64-mingw-ucrt samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.rc.1-x64-mingw-ucrt samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.14-x64-mingw-ucrt samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.13-x64-mingw-ucrt samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.11-x64-mingw-ucrt samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.10-x64-mingw-ucrt samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.9-x64-mingw-ucrt samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.8-x64-mingw-ucrt samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.2-x64-mingw-ucrt-3.2-3.2.2 samples/bigdemo/wxMDIWindows.rbw
wxruby3-0.9.0.pre.beta.1-x64-mingw-ucrt-3.2 samples/bigdemo/wxMDIWindows.rbw