Class: Wx::NotifyEvent
- Inherits:
-
CommandEvent
- Object
- Object
- Event
- CommandEvent
- Wx::NotifyEvent
- 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
Direct Known Subclasses
AUI::AuiToolBarEvent, BookCtrlEvent, GRID::GridEvent, GRID::GridRangeSelectEvent, GRID::GridSizeEvent, HeaderCtrlEvent, ListEvent, MediaEvent, RBN::RibbonBarEvent, RTC::RichTextEvent, SpinDoubleEvent, SpinEvent, SplitterEvent, TreeEvent, WizardEvent
Instance Method Summary collapse
-
#allow ⇒ void
This is the opposite of #veto: it explicitly allows the event to be processed.
-
#initialize(eventType = Wx::EVT_NULL, id = 0) ⇒ Wx::NotifyEvent
constructor
Constructor (used internally by wxWidgets only).
-
#is_allowed ⇒ Boolean
(also: #allowed?)
Returns true if the change is allowed (#veto hasn’t been called) or false otherwise (if it was).
-
#veto ⇒ void
Prevents the change announced by this event from happening.
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).
84 |
# File 'lib/wx/doc/gen/events.rb', line 84 def initialize(eventType=Wx::EVT_NULL, id=0) end |
Instance Method Details
#allow ⇒ void
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_allowed ⇒ Boolean Also known as: allowed?
Returns true if the change is allowed (#veto hasn’t been called) or false otherwise (if it was).
94 |
# File 'lib/wx/doc/gen/events.rb', line 94 def is_allowed; end |
#veto ⇒ void
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 |