Version: 2.9.4
Public Member Functions
wxDataViewEvent Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/dataview.h>

Inheritance diagram for wxDataViewEvent:

Detailed Description

This is the event class for the wxDataViewCtrl notifications.

Events using this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxDataViewEvent& event)

Event macros:

Library:  wxAdvanced
Category:  Events, wxDataViewCtrl Related Classes

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.
wxDataViewColumnGetDataViewColumn () const
 Returns a pointer to the wxDataViewColumn from which the event was emitted or NULL.
wxDataViewModelGetModel () const
 Returns the wxDataViewModel associated with the event.
wxPoint GetPosition () const
 Returns the position of a context menu event in screen coordinates.
const wxVariantGetValue () 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.

List of all members.


Constructor & Destructor Documentation

wxDataViewEvent::wxDataViewEvent ( wxEventType  commandType = wxEVT_NULL,
int  winid = 0 
)

Constructor.

Typically used by wxWidgets internals only.


Member Function Documentation

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.

Since:
2.9.4
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.

Since:
2.9.3
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.

参照:
GetDropEffect()
Since:
2.9.4
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.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines