Sha256: dfd6aab1d77ae960bbb6eb742dc0e1b85ac0ae68625f3ef422217c776ba5be9a

Contents?: true

Size: 1.37 KB

Versions: 12

Compression:

Stored size: 1.37 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

12 entries across 12 versions & 2 rubygems

Version Path
wxruby64-2.0.1-x64-mingw32 samples/bigdemo/wxMDIWindows.rbw
wxruby-2.0.1-x86-mswin32-60 samples/bigdemo/wxMDIWindows.rbw
wxruby-1.9.7-i386-mswin32 samples/bigdemo/wxMDIWindows.rbw
wxruby-1.9.10-x86-mswin32-60 samples/bigdemo/wxMDIWindows.rbw
wxruby-1.9.6-x86-mswin32-60 samples/bigdemo/wxMDIWindows.rbw
wxruby-1.9.6-x86-mingw32 samples/bigdemo/wxMDIWindows.rbw
wxruby-1.9.7-x86-mswin32-60 samples/bigdemo/wxMDIWindows.rbw
wxruby-1.9.8-x86-mingw32 samples/bigdemo/wxMDIWindows.rbw
wxruby-1.9.8-x86-mswin32-60 samples/bigdemo/wxMDIWindows.rbw
wxruby-1.9.9-x86-mingw32 samples/bigdemo/wxMDIWindows.rbw
wxruby-1.9.9-x86-mswin32-60 samples/bigdemo/wxMDIWindows.rbw
wxruby-2.0.0-x86-mswin32-60 samples/bigdemo/wxMDIWindows.rbw