# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx::PG # A property grid event holds information about events associated with {Wx::PG::PropertyGrid} objects. # # To process input from a property grid control, use these event handler macros to direct input to member functions that take a {Wx::PG::PropertyGridEvent} argument. # ### Events emitted by this class # # The following event-handler methods redirect the events to member method or handler blocks for {Wx::PG::PropertyGridEvent} events. # Event handler methods for events emitted by this class: # # - EVT_PG_SELECTED (id, func): Respond to {Wx::PG::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. # # - {Wx::EvtHandler#evt_pg_changed}(id, meth = nil, &block): Respond to {Wx::PG::EVT_PG_CHANGED} event, generated when property value has been changed by the user. # # - {Wx::EvtHandler#evt_pg_changing}(id, meth = nil, &block): Respond to {Wx::PG::EVT_PG_CHANGING} event, generated when property value is about to be changed by user. Use {Wx::PG::PropertyGridEvent#get_value} to take a peek at the pending value, and {Wx::PG::PropertyGridEvent#veto} to prevent change from taking place, if necessary. # # - {Wx::EvtHandler#evt_pg_highlighted}(id, meth = nil, &block): Respond to {Wx::PG::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. # # - {Wx::EvtHandler#evt_pg_right_click}(id, meth = nil, &block): Respond to {Wx::PG::EVT_PG_RIGHT_CLICK} event, which occurs when property is clicked on with right mouse button. # # - {Wx::EvtHandler#evt_pg_double_click}(id, meth = nil, &block): Respond to {Wx::PG::EVT_PG_DOUBLE_CLICK} event, which occurs when property is double-clicked on with left mouse button. # # - {Wx::EvtHandler#evt_pg_item_collapsed}(id, meth = nil, &block): Respond to {Wx::PG::EVT_PG_ITEM_COLLAPSED} event, generated when user collapses a property or category. # # - {Wx::EvtHandler#evt_pg_item_expanded}(id, meth = nil, &block): Respond to {Wx::PG::EVT_PG_ITEM_EXPANDED} event, generated when user expands a property or category. # # - {Wx::EvtHandler#evt_pg_label_edit_begin}(id, meth = nil, &block): Respond to {Wx::PG::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. # # - {Wx::EvtHandler#evt_pg_label_edit_ending}(id, meth = nil, &block): Respond to {Wx::PG::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. # # - {Wx::EvtHandler#evt_pg_col_begin_drag}(id, meth = nil, &block): Respond to {Wx::PG::EVT_PG_COL_BEGIN_DRAG} event, generated when user starts resizing a column - can be vetoed. # # - EVT_PG_COL_DRAGGING, (id, func): Respond to {Wx::PG::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. # # - {Wx::EvtHandler#evt_pg_col_end_drag}(id, meth = nil, &block): Respond to {Wx::PG::EVT_PG_COL_END_DRAG} event, generated after column resize by user has finished. # # Category: {Wx::PG::PropertyGrid}, {Wx::Events} # # @wxrb_require USE_PROPGRID class PropertyGridEvent < CommandEvent # @overload initialize(commandType=0, id=0) # Constructor. # @param commandType [Wx::Notebook::EventType] # @param id [Integer] # @return [Wx::PG::PropertyGridEvent] # @overload initialize(event) # Copy constructor. # @param event [Wx::PG::PropertyGridEvent] # @return [Wx::PG::PropertyGridEvent] def initialize(*args) end # Returns true if you can veto the action that the event is signaling. # @return [Boolean] def can_veto; end alias_method :can_veto?, :can_veto # 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 # @return [Integer] def get_column; end alias_method :column, :get_column # Returns highest level non-category, non-root parent of property for which event occurred. # # Useful when you have nested properties with children. # #
# Remark: #

If immediate parent is root or category, this will return the property itself. #

#
# @return [Wx::PG::PGProperty] def get_main_parent; end alias_method :main_parent, :get_main_parent # Returns property associated with this event. # #
# Remark: #

You should assume that this property can always be NULL. For instance, {Wx::PG::EVT_PG_SELECTED} is emitted not only when a new property is selected, but also when selection is cleared by user activity. #

#
# @return [Wx::PG::PGProperty] def get_property; end alias_method :property, :get_property # Returns current validation failure flags. # @return [Integer] def get_validation_failure_behavior; end alias_method :validation_failure_behavior, :get_validation_failure_behavior # Returns name of the associated property. # #
# Remark: #

Property name is stored in event, so it remains accessible even after the associated property or the property grid has been deleted. #

#
# @return [String] def get_property_name; end alias_method :property_name, :get_property_name # Returns value of the associated property. # # Works for all event types, but for {Wx::PG::EVT_PG_CHANGING} this member function returns the value that is pending, so you can call {Wx::PG::PropertyGridEvent#veto} if the value is not satisfactory. # #
# Remark: #

Property value is stored in event, so it remains accessible even after the associated property or the property grid has been deleted. #

#
# @return [Wx::Variant] def get_property_value; end alias_method :property_value, :get_property_value # Returns value of the associated property. # # # @see Wx::PG::PropertyGridEvent#get_property_value # @return [Wx::Variant] def get_value; end alias_method :value, :get_value # Set if event can be vetoed. # @param canVeto [Boolean] # @return [void] def set_can_veto(canVeto) end alias_method :can_veto=, :set_can_veto # Changes the property associated with this event. # @param p [Wx::PG::PGProperty] # @return [void] def set_property(p) end alias_method :property=, :set_property # Set override validation failure behaviour. # # Only effective if {Wx::PG::PropertyGridEvent#veto} was also called, and only allowed if event type is {Wx::PG::EVT_PG_CHANGING}. # @param flags [Integer] # @return [void] def set_validation_failure_behavior(flags) end alias_method :validation_failure_behavior=, :set_validation_failure_behavior # 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. # @param message [String] # @return [void] def set_validation_failure_message(message) end alias_method :validation_failure_message=, :set_validation_failure_message # Call this from your event handler to veto action that the event is signaling. # # You can only veto a shutdown if {Wx::PG::PropertyGridEvent#can_veto} returns true. # #
# Remark: #

Currently only {Wx::PG::EVT_PG_CHANGING} supports vetoing. #

#
# @param veto [Boolean] # @return [void] def veto(veto=true) end # Returns true if event was vetoed. # @return [Boolean] def was_vetoed; end end # PropertyGridEvent end