Displaying 2 results from an estimated 2 matches for "on_left_button_event_mot".
2007 Apr 29
0
[993] branches/wxruby2/wxwidgets_282/samples/bigdemo/wxScrolledWindow.rbw: Use ClientDC via Window#paint object
...1 @@
</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_paint {|event| on_paint(event)}
</del><ins>+ evt_paint { on_paint }
</ins><span class="cx"> #evt_mousewheel {|event| on_wheel(event)}
</span><span class="cx"> end
</span>...
2007 Oct 02
0
[ wxruby-Patches-14375 ] bigdemo/wxScrolledWindow - paint bug with scrolled window
..._down(event)
if event.left_is_down() and !@drawing
set_focus()
set_XY(event)
@event_x_old = event.get_x # added this to save the current absolute...
@event_y_old = event.get_y # ... mouse position
@curLine = []
capture_mouse()
@drawing = true
end
end
----
And in on_left_button_event_motion
From:
paint do | dc |
dc.set_pen(Wx::Pen.new("MEDIUM FOREST GREEN", 4, Wx::SOLID))
coords = [@x, @y] + convert_event_coords(event)
@curLine.push(coords)
coords.flatten!()
dc.draw_line(coords[0], coords[1], coords[2], coords[3])
set_XY(event)
end
To:
paint do | dc |
dc.s...