Class: Wx::EraseEvent
Overview
An erase event is sent when a window’s background needs to be repainted.
On some platforms, such as GTK+, this event is simulated (simply generated just before the paint event) and may cause flicker. It is therefore recommended that you set the text background colour explicitly in order to prevent flicker. The default background colour under GTK+ is grey. To intercept this event, use the EVT_ERASE_BACKGROUND macro in an event table definition. You must use the device context returned by #get_dc to draw on, don’t create a PaintDC in the event handler.
Events using this class
The following event-handler methods redirect the events to member method or handler blocks for EraseEvent events. Event handler methods:
-
Wx::EvtHandler#evt_erase_background(meth = nil, &block): Process a EVT_ERASE_BACKGROUND event.
Category: Events
Instance Method Summary collapse
-
#get_dc ⇒ Wx::DC
(also: #dc)
Returns the device context associated with the erase event to draw on.
-
#initialize(id = 0, dc = nil) ⇒ Wx::EraseEvent
constructor
Constructor.
Methods inherited from Event
#clone, #get_event_category, #get_event_object, #get_event_type, #get_id, #get_skipped, #get_timestamp, #is_command_event, #resume_propagation, #set_event_object, #set_event_type, #set_id, #set_timestamp, #should_propagate, #skip, #stop_propagation
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize(id = 0, dc = nil) ⇒ Wx::EraseEvent
Constructor.
1532 |
# File 'lib/wx/doc/gen/events.rb', line 1532 def initialize(id=0, dc=nil) end |
Instance Method Details
#get_dc ⇒ Wx::DC Also known as: dc
Returns the device context associated with the erase event to draw on.
The returned pointer is never NULL.
1538 |
# File 'lib/wx/doc/gen/events.rb', line 1538 def get_dc; end |