search for: evt_left_down

Displaying 15 results from an estimated 15 matches for "evt_left_down".

2004 Jun 22
8
Tracking Mouse motion
Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: tst_wxPaint.rbw Type: application/octet-stream Size: 4446 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20040622/abc8ba85/tst_wxPaint-0001.obj
2004 Jun 02
13
wxGrid Question
When operating with a wxGrid is there a way to get a reference to the TextCtrl field that is created when you start typing in a cell. Also is there a way to get mouse events to work with a wxGrid, so far I can''t get any of them to work. I had tried various combo''s of: @grid.evt_left_down(){ |event| puts "Left mouse is down"; } using evt_left_down, evt_left_up, evt_mouse_events, etc... Thanks, Zach --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.684 / Virus Database: 446 - Release Date: 5/13/2004
2005 Jan 22
9
Dragging images across the canvas
...x::Frame def initialize(title) super(nil, -1, title,Wx::DEFAULT_POSITION, Wx::Size.new(250,250)) image = Wx::Image.new("sk.png") @bitmap = Wx::Bitmap.new(image) @left_dn = false evt_paint { on_paint } evt_motion {|event| on_motion(event) } evt_left_down {|event| @left_dn = true } evt_left_up {|event| @left_dn = false } end def move_region(nx,ny) ox,oy,w,h = @reg.get_box @reg.clear @reg = Wx::Region.new(nx,ny,nx+w,ny+h) dc = Wx::ClientDC.new(self) # Erase from the existing location # wb = Wx...
2004 Jun 11
9
Handling Events that don''t take an ID
Hey Kevin, Am I correct in assuming that if I want a particular widget to respond to an event which doesn''t take an ID as an argument (like evt_size or evt_left_down), that I have to inherit a new widget and define the event handler within the inherited class? Here''s a little contrived code example to illustrate what I mean: class MyCtrl < Wx::TextCtrl def initialize() evt_size {|event| on_size(event)} end def on_size(event) #...
2007 Jun 25
0
[1067] trunk/wxruby2: Set up event handlers in Ruby rather than by post-processing SWIG output
...ndDialogEvent, - Wx::EVT_COMMAND_FIND_REPLACE => Wx::FindDialogEvent, - Wx::EVT_COMMAND_FIND_REPLACE_ALL => Wx::FindDialogEvent, - Wx::EVT_COMMAND_FIND_CLOSE => Wx::FindDialogEvent, - Wx::EVT_SET_FOCUS => Wx::FocusEvent, - Wx::EVT_KILL_FOCUS => Wx::FocusEvent, - Wx::EVT_LEFT_DOWN => Wx::MouseEvent, - Wx::EVT_LEFT_UP => Wx::MouseEvent, - Wx::EVT_LEFT_DCLICK => Wx::MouseEvent, - Wx::EVT_MIDDLE_DOWN => Wx::MouseEvent, - Wx::EVT_MIDDLE_UP => Wx::MouseEvent, - Wx::EVT_MIDDLE_DCLICK => Wx::MouseEvent, - Wx::EVT_RIGHT_DOWN => Wx::MouseEvent,...
2004 Feb 02
0
the sample
...art -------------- #!/usr/bin/ruby require ''wxruby'' include Wx class MyImageFrame < Dialog def initialize parent, title, bmap super(parent, -1, title) @bitmap=bmap set_client_size_wh(@bitmap.get_width,@bitmap.get_height) evt_paint {|what| on_paint(what)} evt_left_down {on_click()} end def on_click close end def on_paint what dc = PaintDC.new(self) dc.draw_bitmap(@bitmap,0,0,true) end end class MyFrame < Wx::Frame def initialize(title) super(nil, -1, title) b=Button.new(self,-1,''e'') evt_button(-1) { MyIm...
2003 Nov 10
1
Statusbar usage
Hi! While playing around with a little example, I''ve realized, that I don''t exactly know, how to work with the statusbar. When just calling set_status_text (setStatusText in C++), then repeating messages don''t display again. I guess there should be a magic rule about statusbar''s text hierarchy, but can sy give me some hints about it? Maybe some wxruby hints
2010 Sep 09
1
Wx::Grid and motion events, bug?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there, Doesn''t a Wx::Grid get motion events sent? This code demonstrates the problem: - -------------------------------------------------------------- #!/usr/bin/env ruby #Encoding: UTF-8 require "wx" class MyFrame < Wx::Frame include Wx def initialize(parent = nil) super(parent, title: "Test", size:
2007 Jun 26
0
[1086] trunk/wxruby2/lib/wx/classes/evthandler.rb: Restore evt_mouse_events convenience handler, fixing bug in printing sample
...@ -736,6 +736,22 @@ </span><span class="cx"> end </span><span class="cx"> end </span><span class="cx"> </span><ins>+ # convenience evt_handler to listen to all mouse events + def evt_mouse_events(&block) + evt_left_down(&block) + evt_left_up(&block) + evt_middle_down(&block) + evt_middle_up(&block) + evt_right_down(&block) + evt_right_up(&block) + evt_motion(&block) + evt_left_dclick(&block) + evt_middle_dclick(&block) + evt_right_dclick(&block) +...
2007 Mar 17
0
[886] branches/wxruby2/wxwidgets_282/swig/fixevents.rb: Mouse events fix for Win32 (Artur Kuptel)
...&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspout.puts <<FUNC_DEF +static VALUE evt_mouse_events(int argc, VALUE *argv, VALUE self) +{ + evt_left_down(argc,argv,self); + evt_left_up(argc,argv,self); + evt_middle_down(argc,argv,self); + evt_middle_up(argc,argv,self); + evt_right_down(argc,argv,self); + evt_right_up(argc,argv,self); + evt_motion(argc,argv,self); + evt_left_dclick(argc,argv,self); + evt_middle_dclick(argc,arg...
2007 May 29
0
[1035] trunk/wxruby2/swig/classes/EvtHandler.i: Removed a heap of redundant stuff that''s been #if 0''d for a while
..._rclicked(int argc, VALUE *argv, VALUE self) -{ - return internal_evt_with_id(argc, argv, self, wxEVT_COMMAND_TOOL_RCLICKED); -} - -static VALUE evt_tool_enter(int argc, VALUE *argv, VALUE self) -{ - return internal_evt_with_id(argc, argv, self, wxEVT_COMMAND_TOOL_ENTER); -} - -static VALUE evt_left_down(int argc, VALUE *argv, VALUE self) -{ - return internal_evt_no_parameters(argc, argv, self, wxEVT_LEFT_DOWN); -} - -static VALUE evt_left_up(int argc, VALUE *argv, VALUE self) -{ - return internal_evt_no_parameters(argc, argv, self, wxEVT_LEFT_UP); -} - -static VALUE evt_left_dclick(int arg...
2007 Apr 29
0
[993] branches/wxruby2/wxwidgets_282/samples/bigdemo/wxScrolledWindow.rbw: Use ClientDC via Window#paint object
...++ branches/wxruby2/wxwidgets_282/samples/bigdemo/wxScrolledWindow.rbw&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp2007-04-29 16:40:51 UTC (rev 993) </span><span class="lines">@@ -35,11 +35,11 @@ </span><span class="cx"> evt_left_down {|event| on_left_button_event_down(event)} </span><span class="cx"> evt_left_up {|event| on_left_button_event_up(event)} </span><span class="cx"> evt_motion {|event| on_left_button_event_motion(event)} </span><del>- evt_...
2007 Jun 23
0
[1060] trunk/wxruby2/swig/fixevents.rb: Include some previously missing events, rehash and simplify
...uded? + + if evt.name =="EVT_MOUSE_EVENTS" + out.puts <<FUNC_DEF </ins><span class="cx"> static VALUE evt_mouse_events(int argc, VALUE *argv, VALUE self) </span><span class="cx"> { </span><span class="cx"> evt_left_down(argc,argv,self); </span><span class="lines">@@ -56,66 +61,40 @@ </span><span class="cx"> return evt_mousewheel(argc,argv,self); </span><span class="cx"> } </span><span class="cx"> FUNC_DEF </span><i...
2004 Jan 08
3
pictorG
...me < Dialog # -- opens a dialog to show a picture def initialize parent, title, filename super(parent, -1, title) @bitmap=Bitmap.new(filename,BITMAP_TYPE_ANY) # why should I say BITMAP_TYPE_ANY? set_client_size_wh(@bitmap.get_width,@bitmap.get_height) evt_paint {on_paint()} evt_left_down {on_click()} end def on_click @bitmap.destroy() self.destroy() end def on_paint dc = PaintDC.new(self) dc.draw_bitmap(@bitmap,0,0,true) end end class Pictures < ListCtrl # -- show the pictures def initialize parent super parent,-1,DEFAULT_POSITION,DEFAULT_SIZE,...
2007 May 31
0
[1042] trunk/wxruby2: Overhaul of the event handling WxType->RubyClass mapping to make it
...ndDialogEvent, + Wx::EVT_COMMAND_FIND_REPLACE => Wx::FindDialogEvent, + Wx::EVT_COMMAND_FIND_REPLACE_ALL => Wx::FindDialogEvent, + Wx::EVT_COMMAND_FIND_CLOSE => Wx::FindDialogEvent, + Wx::EVT_SET_FOCUS => Wx::FocusEvent, + Wx::EVT_KILL_FOCUS => Wx::FocusEvent, + Wx::EVT_LEFT_DOWN => Wx::MouseEvent, + Wx::EVT_LEFT_UP => Wx::MouseEvent, + Wx::EVT_LEFT_DCLICK => Wx::MouseEvent, + Wx::EVT_MIDDLE_DOWN => Wx::MouseEvent, + Wx::EVT_MIDDLE_UP => Wx::MouseEvent, + Wx::EVT_MIDDLE_DCLICK => Wx::MouseEvent, + Wx::EVT_RIGHT_DOWN => Wx::MouseEvent,...