Sha256: 25cad412f0fe6146a09b55e455a0986e2863c2d02fc8c2f914940bd88dbf7818

Contents?: true

Size: 1.39 KB

Versions: 14

Compression:

Stored size: 1.39 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'



module Demo

class MyParentFrame < Wx::MDIParentFrame
    def initialize
        super(nil, -1, "MDI Parent", Wx::DEFAULT_POSITION, 
              Wx::Size.new(600,400))
        
        @win_count = 0
        menu = Wx::Menu.new
        menu.append(5000, "&New Window")
        menu.append_separator
        menu.append(5001, "E&xit")
        
        menubar = Wx::MenuBar.new
        menubar.append(menu, "&File")
        set_menu_bar(menubar)
        
        create_status_bar
        
        evt_menu(5000) {|event| on_new_window(event)}
        evt_menu(5001) {|event| on_exit(event)}
        scrollwin_demo_file = File.join(File.dirname(__FILE__), 
                                        "wxScrolledWindow.rbw")
        load scrollwin_demo_file
    end
    
    def on_exit(event)
        close
    end
    
    def on_new_window(event)
        @win_count += 1
        win = Wx::MDIChildFrame.new(self, -1, "Child Window: #{@win_count}")
        canvas = MyCanvas.new(win)
        win.show
    end
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/MDIDemo.rbw
wxruby3-0.9.1-x64-mingw-ucrt samples/bigdemo/MDIDemo.rbw
wxruby3-0.9.0-x64-mingw-ucrt samples/bigdemo/MDIDemo.rbw
wxruby3-0.9.0.pre.rc.3-x64-mingw-ucrt samples/bigdemo/MDIDemo.rbw
wxruby3-0.9.0.pre.rc.2-x64-mingw-ucrt samples/bigdemo/MDIDemo.rbw
wxruby3-0.9.0.pre.rc.1-x64-mingw-ucrt samples/bigdemo/MDIDemo.rbw
wxruby3-0.9.0.pre.beta.14-x64-mingw-ucrt samples/bigdemo/MDIDemo.rbw
wxruby3-0.9.0.pre.beta.13-x64-mingw-ucrt samples/bigdemo/MDIDemo.rbw
wxruby3-0.9.0.pre.beta.11-x64-mingw-ucrt samples/bigdemo/MDIDemo.rbw
wxruby3-0.9.0.pre.beta.10-x64-mingw-ucrt samples/bigdemo/MDIDemo.rbw
wxruby3-0.9.0.pre.beta.9-x64-mingw-ucrt samples/bigdemo/MDIDemo.rbw
wxruby3-0.9.0.pre.beta.8-x64-mingw-ucrt samples/bigdemo/MDIDemo.rbw
wxruby3-0.9.0.pre.beta.2-x64-mingw-ucrt-3.2-3.2.2 samples/bigdemo/MDIDemo.rbw
wxruby3-0.9.0.pre.beta.1-x64-mingw-ucrt-3.2 samples/bigdemo/MDIDemo.rbw