Class: Wx::EraseEvent

Inherits:
Event show all
Defined in:
lib/wx/doc/gen/events.rb

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:

Category: Events

See Also:

  • and Event Handling

Instance Method Summary collapse

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.

Parameters:

  • id (Integer) (defaults to: 0)
  • dc (Wx::DC) (defaults to: nil)


1532
# File 'lib/wx/doc/gen/events.rb', line 1532

def initialize(id=0, dc=nil) end

Instance Method Details

#get_dcWx::DC Also known as: dc

Returns the device context associated with the erase event to draw on.

The returned pointer is never NULL.

Returns:



1538
# File 'lib/wx/doc/gen/events.rb', line 1538

def get_dc; end