#include </home/zeitlin/src/wx/github/interface/wx/propgrid/propgrid.h>
A property grid event holds information about events associated with wxPropertyGrid objects.
Public Member Functions | |
wxPropertyGridEvent (wxEventType commandType=0, int id=0) | |
Constructor. | |
wxPropertyGridEvent (const wxPropertyGridEvent &event) | |
Copy constructor. | |
~wxPropertyGridEvent () | |
Destructor. | |
bool | CanVeto () const |
Returns true if you can veto the action that the event is signaling. | |
unsigned int | GetColumn () const |
Returns the column index associated with this event. | |
wxPGProperty * | GetMainParent () const |
Returns highest level non-category, non-root parent of property for which event occurred. | |
wxPGProperty * | GetProperty () const |
Returns property associated with this event. | |
wxPGVFBFlags | GetValidationFailureBehavior () const |
Returns current validation failure flags. | |
wxString | GetPropertyName () const |
Returns name of the associated property. | |
wxVariant | GetPropertyValue () const wxVariant GetValue() const |
Returns value of the associated property. | |
void | SetCanVeto (bool canVeto) |
Set if event can be vetoed. | |
void | SetProperty (wxPGProperty *p) |
Changes the property associated with this event. | |
void | SetValidationFailureBehavior (wxPGVFBFlags flags) |
Set override validation failure behaviour. | |
void | SetValidationFailureMessage (const wxString &message) |
Sets custom failure message for this time only. | |
void | Veto (bool veto=true) |
Call this from your event handler to veto action that the event is signaling. | |
bool | WasVetoed () const |
Returns true if event was vetoed. |
wxPropertyGridEvent::wxPropertyGridEvent | ( | wxEventType | commandType = 0 , |
int | id = 0 |
||
) |
Constructor.
wxPropertyGridEvent::wxPropertyGridEvent | ( | const wxPropertyGridEvent & | event | ) |
Copy constructor.
wxPropertyGridEvent::~wxPropertyGridEvent | ( | ) |
Destructor.
bool wxPropertyGridEvent::CanVeto | ( | ) | const |
Returns true if you can veto the action that the event is signaling.
unsigned int wxPropertyGridEvent::GetColumn | ( | ) | const |
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
wxPGProperty* wxPropertyGridEvent::GetMainParent | ( | ) | const |
Returns highest level non-category, non-root parent of property for which event occurred.
Useful when you have nested properties with children.
wxPGProperty* wxPropertyGridEvent::GetProperty | ( | ) | const |
Returns property associated with this event.
wxEVT_PG_SELECTED
is emitted not only when a new property is selected, but also when selection is cleared by user activity. wxString wxPropertyGridEvent::GetPropertyName | ( | ) | const |
Returns name of the associated property.
wxVariant wxPropertyGridEvent::GetPropertyValue | ( | ) | const |
Returns value of the associated property.
Works for all event types, but for wxEVT_PG_CHANGING
this member function returns the value that is pending, so you can call Veto() if the value is not satisfactory.
wxPGVFBFlags wxPropertyGridEvent::GetValidationFailureBehavior | ( | ) | const |
Returns current validation failure flags.
void wxPropertyGridEvent::SetCanVeto | ( | bool | canVeto | ) |
Set if event can be vetoed.
void wxPropertyGridEvent::SetProperty | ( | wxPGProperty * | p | ) |
Changes the property associated with this event.
void wxPropertyGridEvent::SetValidationFailureBehavior | ( | wxPGVFBFlags | flags | ) |
Set override validation failure behaviour.
Only effective if Veto() was also called, and only allowed if event type is wxEVT_PG_CHANGING
.
void wxPropertyGridEvent::SetValidationFailureMessage | ( | const wxString & | message | ) |
Sets custom failure message for this time only.
Only applies if wxPG_VFB_SHOW_MESSAGE is set in validation failure flags.
void wxPropertyGridEvent::Veto | ( | bool | veto = true | ) |
Call this from your event handler to veto action that the event is signaling.
You can only veto a shutdown if wxPropertyGridEvent::CanVeto() returns true.
wxEVT_PG_CHANGING
supports vetoing. bool wxPropertyGridEvent::WasVetoed | ( | ) | const |
Returns true if event was vetoed.