search for: get_app

Displaying 14 results from an estimated 14 matches for "get_app".

2006 Oct 23
0
[709] trunk/wxruby2/samples/dialogs/dialogs.rb: Use paint method again, remove unnecessary global (Alex Fenton)
...ent) - # PaintDC currently causing ObjectPreviouslyDeleted (10 Aug 2006) </del><ins>+ def on_paint(event) </ins><span class="cx"> paint do | dc | </span><del>- p dc </del><span class="cx"> dc.set_text_foreground( get_app.canvas_text_colour ) </span><span class="cx"> dc.set_font( get_app.canvas_font ) </span><span class="cx"> dc.draw_text("Windows common dialogs test application", 10, 10) </span><span class="lines">@@ -229,15 +22...
2006 Oct 17
0
[680] trunk/wxruby2/samples/printing/printing.rb: Cleaned up to use the Ruby naming convention, added #! line, now uses Wx default ID''s in standard menu items.
...;span class="lines">@@ -126,9 +128,9 @@ </span><span class="cx"> end </span><span class="cx"> </span><span class="cx"> def on_print(event) </span><del>- printDialogData = Wx::PrintDialogData.new(Wx::get_app.print_data) </del><ins>+ print_dialog_data = Wx::PrintDialogData.new(Wx::get_app.print_data) </ins><span class="cx"> </span><del>- printer = Wx::Printer.new(printDialogData) </del><ins>+ printer = Wx::Printer.new(print_dialog_data)...
2006 Nov 13
0
[739] trunk/wxruby2/samples/dialogs/dialogs.rb: Changed back to using block version of paint in on_paint method.
...class="lines">@@ -138,10 +138,11 @@ </span><span class="cx"> end </span><span class="cx"> </span><span class="cx"> def on_paint(event) </span><del>- dc = PaintDC.new(self) - dc.set_text_foreground( get_app.canvas_text_colour ) - dc.set_font( get_app.canvas_font ) - dc.draw_text("Windows common dialogs test application", 10, 10) </del><ins>+ paint do |dc| + dc.set_text_foreground( get_app.canvas_text_colour ) + dc.set_font( get_app.canvas_font ) + dc.draw_...
2006 Dec 26
0
[806] trunk/wxruby2/samples/treectrl: Restored demonstration of use of icons and fonts within TreeCtrl
...><span class="lines">@@ -254,17 +228,22 @@ </span><span class="cx"> end </span><span class="cx"> </span><span class="cx"> def add_test_items_to_tree(num_children,depth) </span><del>- image = Wx::get_app.show_images() ? TreeCtrlIcon_Folder : -1 </del><ins>+ image = Wx::get_app.show_images ? TreeCtrlIcon_Folder : -1 </ins><span class="cx"> root_id = add_root("Root",image, image) </span><span class="cx"> if image != -1 </...
2006 Nov 13
7
[736] trunk/wxruby2/samples/dialogs/dialogs.rb: Fixed crashing bug in on_paint and made the code style more Ruby like.
...span class="lines">@@ -138,11 +138,10 @@ </span><span class="cx"> end </span><span class="cx"> </span><span class="cx"> def on_paint(event) </span><del>- paint do | dc | - dc.set_text_foreground( get_app.canvas_text_colour ) - dc.set_font( get_app.canvas_font ) - dc.draw_text("Windows common dialogs test application", 10, 10) - end </del><ins>+ dc = PaintDC.new(self) + dc.set_text_foreground( get_app.canvas_text_colour ) + dc.set_font( get_app.canvas_font...
2005 Jul 12
3
comm between gui and app?
To me, the main app (an object) is separate from the app gui (object)... MVC''ish. How can I have the gui part communicate to the app that an event has taken place? Example code somewhere? Thank you. -- - Martin J. Brown, Jr. - - mjbjr@beaudesign.com - Public PGP Key ID: 0xB09AFEFE keyserver: http://pgpkeys.mit.edu:11371/ Key
2006 Oct 21
6
Window#paint patch
Attached is a patch and some extra files to fix our ObjectPreviouslyDeleted crasher with the paint method. As discussed, it just re-implements the method in Ruby. I created a directory lib/wx/classes as a place to hold Ruby extensions to the API. The attached app.rb and window.rb files should be added to it. When this patch is applied, files in that directory are automatically required on
2007 Jun 27
0
[1088] trunk/wxruby2/swig/Functions.i: Added a return statement where needed to fix compile on Win32
...2/swig/Functions.i&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp2007-06-27 18:17:42 UTC (rev 1088) </span><span class="lines">@@ -64,7 +64,7 @@ </span><span class="cx"> </span><span class="cx"> static VALUE get_app(VALUE self) </span><span class="cx"> { </span><del>- rb_const_get(mWxruby2, rb_intern("THE_APP")); </del><ins>+ return rb_const_get(mWxruby2, rb_intern("THE_APP")); </ins><span class="cx"> } </span><s...
2007 Mar 29
0
[928] branches/wxruby2/wxwidgets_282/samples/treectrl/treectrl.rb: Fixed on_insert_item, call to insert_item had arguments in wrong order/missing.
...&nbsp2007-03-29 21:56:43 UTC (rev 928) </span><span class="lines">@@ -1122,7 +1122,7 @@ </span><span class="cx"> </span><span class="cx"> def on_insert_item(event) </span><span class="cx"> image = Wx::get_app.show_images() ? TreeCtrlIcon_File : -1 </span><del>- @treectrl.insert_item(@treectrl.get_root_item(), image, "2nd item") </del><ins>+ @treectrl.insert_item(@treectrl.get_root_item(), -1, "2nd item", image) </ins><span class="cx"&g...
2007 May 04
0
[1010] trunk/wxruby2: PrintPreview ok method name changed to is_ok, update sample
...UTC (rev 1010) </span><span class="lines">@@ -149,7 +149,7 @@ </span><span class="cx"> # Pass two printout objects: for preview, and possible printing. </span><span class="cx"> print_dialog_data = Wx::PrintDialogData.new(Wx::get_app.print_data) </span><span class="cx"> preview = Wx::PrintPreview.new(MyPrintout.new, MyPrintout.new, print_dialog_data) </span><del>- if (!preview.ok) </del><ins>+ if not preview.is_ok </ins><span class="cx"> #dele...
2007 May 21
0
[1025] trunk/wxruby2/swig: Use Wx::THE_APP constant as global reference to App (as per WxWidgets);
...class="cx"> </span><span class="cx"> void log_message(int argc, VALUE *argv, VALUE self) </span><span class="lines">@@ -64,9 +64,7 @@ </span><span class="cx"> </span><span class="cx"> static VALUE get_app(VALUE self) </span><span class="cx"> { </span><del>- VALUE ret = wxRubyApp::app_ptr; - - return ret; </del><ins>+ rb_const_get(mWxruby2, rb_intern("THE_APP")); </ins><span class="cx"> } </span><span cl...
2007 May 21
0
[1027] trunk/wxruby2/doc/textile/app.txtl: Ruby-specific Wx::App documentation
...your application implementation -file to tell Widgets how to create an instance of your application class. </del><ins>+Any wxRuby program will have a single instance of Wx::App, which can be +accessed once the app has started by the constant @Wx::THE_APP@, or by +the module method @Wx::get_app()@. </ins><span class="cx"> </span><del>-Use DECLARE_APP(appClass) in a header file if you want the GetApp function (which returns -a reference to your application object) to be visible to other files. - </del><span class="cx"> h2. Derived fr...
2009 Sep 24
2
Running code after a modal dialog is shown
Hi all, I''m looking for a way to get a block of code to execute once a modal dialog has been displayed (via a call to show_modal.) I was hoping to find some event that would fire when the window was shown, but the only one that seemed vaguely promising (evt_window_create) seems to do nothing at all, at least in my environment (Ruby 1.9.1 on Win32, wxruby 2.0.1.) Here''s a
2006 Dec 02
7
Gauge Problem with XRC?
Hi I''ve just started using wxruby2-preview-0.0.36-i386-mswin32 outsourcing layout part to the external XRC file. Almost everything seems to be fine. Only that I can never retrieve Gauge objects in the main script. What I''ve been trying is something like this: class MainFrame < Wx::Frame include Wx def initialize(parent) super(nil,-1, "")