- dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
- } /* if */
- } /* block */
- break;
- case kDataBrowserEditStopped:
- {
- // variable definitions:
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetPeer()));
-
- if (dataViewCtrlPtr != NULL)
- {
- // initialize wxWidget event:
- DataBrowserPropertyID propertyID;
- wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE,dataViewCtrlPtr->GetId()); // variable definition
-
- dataViewEvent.SetEventObject(dataViewCtrlPtr);
- dataViewEvent.SetItem(wxDataViewItem(reinterpret_cast<void*>(itemID)));
- if (this->GetPropertyID(itemData,&propertyID) == noErr)
- {
- // variable definition and initialization:
- DataBrowserTableViewColumnIndex columnIndex;
-
- wxCHECK_RET(this->GetColumnIndex(propertyID,&columnIndex),_("Column index not found."));
- dataViewEvent.SetColumn(columnIndex);
- dataViewEvent.SetDataViewColumn(dataViewCtrlPtr->GetColumnPtr(propertyID));
- } /* if */
- // finally send the equivalent wxWidget event:
- dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
- } /* if */
- } /* block */
- break;
- case kDataBrowserItemAdded:
- {
- // variable definitions:
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetPeer()));
-
- wxCHECK_RET(dataViewCtrlPtr != NULL,_("Pointer to data view control not set correctly."));
- // initialize wxWidget event:
- wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_MODEL_ITEM_ADDED,dataViewCtrlPtr->GetId()); // variable definition
-
- dataViewEvent.SetEventObject(dataViewCtrlPtr);
- dataViewEvent.SetItem(wxDataViewItem(reinterpret_cast<void*>(itemID)));
- // finally send the equivalent wxWidget event:
- dataViewCtrlPtr->GetEventHandler()->ProcessEvent(dataViewEvent);
- } /* block */
- break;
- case kDataBrowserItemDeselected:
- {
- // variable definitions:
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetPeer()));
-
- if (dataViewCtrlPtr != NULL) // can become NULL if an item is still selected while removing the data browser