Class: Wx::NotifyEvent

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

Overview

This class is not used by the event handlers by itself, but is a base class for other event classes (such as BookCtrlEvent).

It (or an object of a derived class) is sent when the controls state is being changed and allows the program to #veto this change if it wants to prevent it from happening.

Category: Events

See Also:

Instance Method Summary collapse

Methods inherited from CommandEvent

#client_data, #client_data=, #get_client_data, #get_client_object, #get_int, #get_selection, #get_string, #is_checked, #is_selection, #set_client_data, #set_client_object, #set_extra_long, #set_int, #set_string

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(eventType = Wx::EVT_NULL, id = 0) ⇒ Wx::NotifyEvent

Constructor (used internally by wxWidgets only).

Parameters:

  • eventType (Wx::GenericCollapsiblePane::EventType) (defaults to: Wx::EVT_NULL)
  • id (Integer) (defaults to: 0)


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

def initialize(eventType=Wx::EVT_NULL, id=0) end

Instance Method Details

#allowvoid

This method returns an undefined value.

This is the opposite of #veto: it explicitly allows the event to be processed.

For most events it is not necessary to call this method as the events are allowed anyhow but some are forbidden by default (this will be mentioned in the corresponding event description).



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

def allow; end

#is_allowedBoolean Also known as: allowed?

Returns true if the change is allowed (#veto hasn’t been called) or false otherwise (if it was).

Returns:

  • (Boolean)


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

def is_allowed; end

#vetovoid

This method returns an undefined value.

Prevents the change announced by this event from happening.

It is in general a good idea to notify the user about the reasons for vetoing the change because otherwise the applications behaviour (which just refuses to do what the user wants) might be quite surprising.



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

def veto; end