#include </home/zeitlin/src/wx/github/interface/wx/dataview.h>
This is the event class for the wxDataViewCtrl notifications.
The following event handler macros redirect the events to member function handlers 'func' with prototypes like:
Event macros:
wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED
event. wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED
event. wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED
event. wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE
event. wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING
event. wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED
event. wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING
event. wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED
event. wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED
event. wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU
event. wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK
event. wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED
event. wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED
event. wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED
event. Currently this even is only generated when using the native OSX version. wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG
event. wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE
event. wxEVT_COMMAND_DATAVIEW_ITEM_DROP
event. wxEVT_COMMAND_DATAVIEW_CACHE_HINT
event. Public Member Functions | |
wxDataViewEvent (wxEventType commandType=wxEVT_NULL, int winid=0) | |
Constructor. | |
int | GetColumn () const |
Returns the position of the column in the control or -1 if no column field was set by the event emitter. | |
wxDataViewColumn * | GetDataViewColumn () const |
Returns a pointer to the wxDataViewColumn from which the event was emitted or NULL. | |
wxDataViewModel * | GetModel () const |
Returns the wxDataViewModel associated with the event. | |
wxPoint | GetPosition () const |
Returns the position of a context menu event in screen coordinates. | |
const wxVariant & | GetValue () const |
Returns a reference to a value. | |
bool | IsEditCancelled () const |
Can be used to determine whether the new value is going to be accepted in wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE handler. | |
void | SetColumn (int col) |
Sets the column index associated with this event. | |
void | SetDataViewColumn (wxDataViewColumn *col) |
For wxEVT_DATAVIEW_COLUMN_HEADER_CLICK only. | |
void | SetModel (wxDataViewModel *model) |
Sets the dataview model associated with this event. | |
void | SetValue (const wxVariant &value) |
Sets the value associated with this event. | |
void | SetDataObject (wxDataObject *obj) |
Set wxDataObject for data transfer within a drag operation. | |
wxDataFormat | GetDataFormat () const |
Gets the wxDataFormat during a drop operation. | |
size_t | GetDataSize () const |
Gets the data size for a drop data transfer. | |
void * | GetDataBuffer () const |
Gets the data buffer for a drop data transfer. | |
void | SetDragFlags (int flags) |
Specify the kind of the drag operation to perform. | |
wxDragResult | GetDropEffect () const |
Returns the effect the user requested to happen to the dropped data. | |
int | GetCacheFrom () const |
Return the first row that will be displayed. | |
int | GetCacheTo () const |
Return the last row that will be displayed. |
wxDataViewEvent::wxDataViewEvent | ( | wxEventType | commandType = wxEVT_NULL , |
int | winid = 0 |
||
) |
Constructor.
Typically used by wxWidgets internals only.
int wxDataViewEvent::GetCacheFrom | ( | ) | const |
Return the first row that will be displayed.
int wxDataViewEvent::GetCacheTo | ( | ) | const |
Return the last row that will be displayed.
int wxDataViewEvent::GetColumn | ( | ) | const |
Returns the position of the column in the control or -1 if no column field was set by the event emitter.
void* wxDataViewEvent::GetDataBuffer | ( | ) | const |
Gets the data buffer for a drop data transfer.
wxDataFormat wxDataViewEvent::GetDataFormat | ( | ) | const |
Gets the wxDataFormat during a drop operation.
size_t wxDataViewEvent::GetDataSize | ( | ) | const |
Gets the data size for a drop data transfer.
wxDataViewColumn* wxDataViewEvent::GetDataViewColumn | ( | ) | const |
Returns a pointer to the wxDataViewColumn from which the event was emitted or NULL.
wxDragResult wxDataViewEvent::GetDropEffect | ( | ) | const |
Returns the effect the user requested to happen to the dropped data.
This function can be used inside wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE and wxEVT_COMMAND_DATAVIEW_ITEM_DROP handlers and returns whether the user is trying to copy (the return value is wxDragCopy) or move (if the return value is wxDragMove) the data.
Currently this is only available when using the generic version of wxDataViewCtrl (used e.g. under MSW) and always returns wxDragNone in the GTK and OS X native versions.
wxDataViewModel* wxDataViewEvent::GetModel | ( | ) | const |
Returns the wxDataViewModel associated with the event.
wxPoint wxDataViewEvent::GetPosition | ( | ) | const |
Returns the position of a context menu event in screen coordinates.
const wxVariant& wxDataViewEvent::GetValue | ( | ) | const |
Returns a reference to a value.
bool wxDataViewEvent::IsEditCancelled | ( | ) | const |
Can be used to determine whether the new value is going to be accepted in wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE handler.
Returns true if editing the item was cancelled or if the user tried to enter an invalid value (refused by wxDataViewRenderer::Validate()). If this method returns false, it means that the value in the model is about to be changed to the new one.
Notice that wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE event handler can call wxNotifyEvent::Veto() to prevent this from happening.
Currently support for setting this field and for vetoing the change is only available in the generic version of wxDataViewCtrl, i.e. under MSW but not GTK nor OS X.
void wxDataViewEvent::SetColumn | ( | int | col | ) |
Sets the column index associated with this event.
void wxDataViewEvent::SetDataObject | ( | wxDataObject * | obj | ) |
Set wxDataObject for data transfer within a drag operation.
void wxDataViewEvent::SetDataViewColumn | ( | wxDataViewColumn * | col | ) |
For wxEVT_DATAVIEW_COLUMN_HEADER_CLICK
only.
void wxDataViewEvent::SetDragFlags | ( | int | flags | ) |
Specify the kind of the drag operation to perform.
This method can be used inside a wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG handler in order to configure the drag operation. Valid values are wxDrag_CopyOnly (default), wxDrag_AllowMove (allow the data to be moved) and wxDrag_DefaultMove.
Currently it is only honoured by the generic version of wxDataViewCtrl (used e.g. under MSW) and not supported by the native GTK and OS X versions.
void wxDataViewEvent::SetModel | ( | wxDataViewModel * | model | ) |
Sets the dataview model associated with this event.
void wxDataViewEvent::SetValue | ( | const wxVariant & | value | ) |
Sets the value associated with this event.