Class: Wx::PG::PropertyGridEvent
- Inherits:
-
CommandEvent
- Object
- Object
- Event
- CommandEvent
- Wx::PG::PropertyGridEvent
- Defined in:
- lib/wx/doc/gen/pg/property_grid_event.rb
Overview
A property grid event holds information about events associated with PropertyGrid objects.
To process input from a property grid control, use these event handler macros to direct input to member functions that take a PropertyGridEvent argument.
Events emitted by this class
The following event-handler methods redirect the events to member method or handler blocks for PropertyGridEvent events. Event handler methods for events emitted by this class:
-
EVT_PG_SELECTED (id, func): Respond to EVT_PG_SELECTED event, generated when a property selection has been changed, either by user action or by indirect program function. For instance, collapsing a parent property programmatically causes any selected child property to become unselected, and may therefore cause this event to be generated.
-
EvtHandler#evt_pg_changed(id, meth = nil, &block): Respond to EVT_PG_CHANGED event, generated when property value has been changed by the user.
-
EvtHandler#evt_pg_changing(id, meth = nil, &block): Respond to EVT_PG_CHANGING event, generated when property value is about to be changed by user. Use #get_value to take a peek at the pending value, and #veto to prevent change from taking place, if necessary.
-
EvtHandler#evt_pg_highlighted(id, meth = nil, &block): Respond to EVT_PG_HIGHLIGHTED event, which occurs when mouse moves over a property. Event's property is NULL if hovered area does not belong to any property.
-
EvtHandler#evt_pg_right_click(id, meth = nil, &block): Respond to EVT_PG_RIGHT_CLICK event, which occurs when property is clicked on with right mouse button.
-
EvtHandler#evt_pg_double_click(id, meth = nil, &block): Respond to EVT_PG_DOUBLE_CLICK event, which occurs when property is double-clicked on with left mouse button.
-
EvtHandler#evt_pg_item_collapsed(id, meth = nil, &block): Respond to EVT_PG_ITEM_COLLAPSED event, generated when user collapses a property or category.
-
EvtHandler#evt_pg_item_expanded(id, meth = nil, &block): Respond to EVT_PG_ITEM_EXPANDED event, generated when user expands a property or category.
-
EvtHandler#evt_pg_label_edit_begin(id, meth = nil, &block): Respond to EVT_PG_LABEL_EDIT_BEGIN event, generated when user is about to begin editing a property label. You can veto this event to prevent the action.
-
EvtHandler#evt_pg_label_edit_ending(id, meth = nil, &block): Respond to EVT_PG_LABEL_EDIT_ENDING event, generated when user is about to end editing of a property label. You can veto this event to prevent the action.
-
EvtHandler#evt_pg_col_begin_drag(id, meth = nil, &block): Respond to EVT_PG_COL_BEGIN_DRAG event, generated when user starts resizing a column - can be vetoed.
-
EVT_PG_COL_DRAGGING, (id, func): Respond to EVT_PG_COL_DRAGGING, event, generated when a column resize by user is in progress. This event is also generated when user double-clicks the splitter in order to recenter it.
-
EvtHandler#evt_pg_col_end_drag(id, meth = nil, &block): Respond to EVT_PG_COL_END_DRAG event, generated after column resize by user has finished.
Category: PropertyGrid, Events
Instance Method Summary collapse
-
#can_veto ⇒ Boolean
(also: #can_veto?)
Returns true if you can veto the action that the event is signaling.
-
#get_column ⇒ Integer
(also: #column)
Returns the column index associated with this event.
-
#get_main_parent ⇒ Wx::PG::PGProperty
(also: #main_parent)
Returns highest level non-category, non-root parent of property for which event occurred.
-
#get_property ⇒ Wx::PG::PGProperty
(also: #property)
Returns property associated with this event.
-
#get_property_name ⇒ String
(also: #property_name)
Returns name of the associated property.
-
#get_property_value ⇒ Wx::Variant
(also: #property_value)
Returns value of the associated property.
-
#get_validation_failure_behavior ⇒ Integer
(also: #validation_failure_behavior)
Returns current validation failure flags.
-
#get_value ⇒ Wx::Variant
(also: #value)
Returns value of the associated property.
-
#initialize(*args) ⇒ PropertyGridEvent
constructor
A new instance of PropertyGridEvent.
-
#set_can_veto(canVeto) ⇒ void
(also: #can_veto=)
Set if event can be vetoed.
-
#set_property(p) ⇒ void
(also: #property=)
Changes the property associated with this event.
-
#set_validation_failure_behavior(flags) ⇒ void
(also: #validation_failure_behavior=)
Set override validation failure behaviour.
-
#set_validation_failure_message(message) ⇒ void
(also: #validation_failure_message=)
Sets custom failure message for this time only.
-
#veto(veto = true) ⇒ void
Call this from your event handler to veto action that the event is signaling.
-
#was_vetoed ⇒ Boolean
Returns true if event was vetoed.
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(commandType = 0, id = 0) ⇒ Wx::PG::PropertyGridEvent #initialize(event) ⇒ Wx::PG::PropertyGridEvent
Returns a new instance of PropertyGridEvent.
59 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 59 def initialize(*args) end |
Instance Method Details
#can_veto ⇒ Boolean Also known as: can_veto?
Returns true if you can veto the action that the event is signaling.
63 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 63 def can_veto; end |
#get_column ⇒ Integer Also known as: column
Returns the column index associated with this event.
For the column dragging events, it is the column to the left of the splitter being dragged
70 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 70 def get_column; end |
#get_main_parent ⇒ Wx::PG::PGProperty Also known as: main_parent
Returns highest level non-category, non-root parent of property for which event occurred.
Useful when you have nested properties with children.
If immediate parent is root or category, this will return the property itself.
83 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 83 def get_main_parent; end |
#get_property ⇒ Wx::PG::PGProperty Also known as: property
Returns property associated with this event.
You should assume that this property can always be NULL. For instance, EVT_PG_SELECTED is emitted not only when a new property is selected, but also when selection is cleared by user activity.
94 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 94 def get_property; end |
#get_property_name ⇒ String Also known as: property_name
Returns name of the associated property.
Property name is stored in event, so it remains accessible even after the associated property or the property grid has been deleted.
110 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 110 def get_property_name; end |
#get_property_value ⇒ Wx::Variant Also known as: property_value
Returns value of the associated property.
Works for all event types, but for EVT_PG_CHANGING this member function returns the value that is pending, so you can call #veto if the value is not satisfactory.
Property value is stored in event, so it remains accessible even after the associated property or the property grid has been deleted.
123 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 123 def get_property_value; end |
#get_validation_failure_behavior ⇒ Integer Also known as: validation_failure_behavior
Returns current validation failure flags.
99 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 99 def get_validation_failure_behavior; end |
#get_value ⇒ Wx::Variant Also known as: value
Returns value of the associated property.
131 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 131 def get_value; end |
#set_can_veto(canVeto) ⇒ void Also known as: can_veto=
This method returns an undefined value.
Set if event can be vetoed.
137 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 137 def set_can_veto(canVeto) end |
#set_property(p) ⇒ void Also known as: property=
This method returns an undefined value.
Changes the property associated with this event.
143 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 143 def set_property(p) end |
#set_validation_failure_behavior(flags) ⇒ void Also known as: validation_failure_behavior=
This method returns an undefined value.
Set override validation failure behaviour.
Only effective if #veto was also called, and only allowed if event type is EVT_PG_CHANGING.
151 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 151 def set_validation_failure_behavior(flags) end |
#set_validation_failure_message(message) ⇒ void Also known as: validation_failure_message=
This method returns an undefined value.
Sets custom failure message for this time only.
Only applies if Wx::PG::PG_VALIDATION_FAILURE_BEHAVIOR_FLAGS::PG_VFB_SHOW_MESSAGE is set in validation failure flags.
159 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 159 def () end |
#veto(veto = true) ⇒ void
This method returns an undefined value.
Call this from your event handler to veto action that the event is signaling.
You can only veto a shutdown if #can_veto returns true.
Currently only EVT_PG_CHANGING supports vetoing.
173 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 173 def veto(veto=true) end |
#was_vetoed ⇒ Boolean
Returns true if event was vetoed.
177 |
# File 'lib/wx/doc/gen/pg/property_grid_event.rb', line 177 def was_vetoed; end |