/////////////////////////////////////////////////////////////////////////////
-// Name: src/mac/carbon/databrow.cpp
+// Name: src/osx/carbon/databrow.cpp
// Purpose: Classes and functions for the Carbon data browser
// Author:
// Modified by:
#endif
#include "wx/dataview.h"
-#include "wx/mac/carbon/databrow.h"
-#include "wx/mac/private.h"
-#include "wx/mac/uma.h"
+#include "wx/osx/carbon/databrow.h"
+#include "wx/osx/private.h"
+#include "wx/osx/uma.h"
#include <limits>
DataBrowserTableViewColumnIndex modelColumnIndex;
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetPeer()));
+ wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetWXPeer()));
wxCHECK_MSG(dataViewCtrlPtr != NULL, false,_("Pointer to data view control not set correctly."));
{
wxArrayDataBrowserItemID itemIDs;
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetPeer()));
+ wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetWXPeer()));
wxCHECK_RET(dataViewCtrlPtr != NULL,_("wxWidget control pointer is not a data view pointer"));
// variable definitions:
wxDataViewCtrl* dataViewCtrlPtr;
- dataViewCtrlPtr = dynamic_cast<wxDataViewCtrl*>(this->GetPeer());
+ dataViewCtrlPtr = dynamic_cast<wxDataViewCtrl*>(this->GetWXPeer());
wxCHECK_MSG(dataViewCtrlPtr != NULL,errDataBrowserNotConfigured,_("Pointer to data view control not set correctly."));
if (dataViewCtrlPtr->IsDeleting())
return noErr; // if a delete process is running the data of editable fields cannot be saved because the associated model variable may already have been deleted
wxDataViewColumn* dataViewColumnPtr;
wxDataViewCtrl* dataViewCtrlPtr;
- dataViewCtrlPtr = dynamic_cast<wxDataViewCtrl*>(this->GetPeer());
+ dataViewCtrlPtr = dynamic_cast<wxDataViewCtrl*>(this->GetWXPeer());
wxCHECK_MSG(dataViewCtrlPtr != NULL,errDataBrowserNotConfigured,_("Pointer to data view control not set correctly."));
wxCHECK_MSG(dataViewCtrlPtr->GetModel() != NULL,errDataBrowserNotConfigured,_("Pointer to model not set correctly."));
dataViewColumnPtr = dataViewCtrlPtr->GetColumnPtr(propertyID);
case kDataBrowserContainerIsClosableProperty:
{
// variable definitions:
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetPeer()));
+ wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetWXPeer()));
wxCHECK_MSG(dataViewCtrlPtr != NULL,errDataBrowserNotConfigured,_("Pointer to data view control not set correctly."));
// initialize wxWidget event:
case kDataBrowserContainerIsOpenableProperty:
{
// variable definitions:
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetPeer()));
+ wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetWXPeer()));
wxCHECK_MSG(dataViewCtrlPtr != NULL,errDataBrowserNotConfigured,_("Pointer to data view control not set correctly."));
// initialize wxWidget event:
case kDataBrowserItemIsContainerProperty:
{
// variable definition:
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetPeer()));
+ wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetWXPeer()));
wxCHECK_MSG(dataViewCtrlPtr != NULL,errDataBrowserNotConfigured,_("Pointer to data view control not set correctly."));
wxCHECK_MSG(dataViewCtrlPtr->GetModel() != NULL,errDataBrowserNotConfigured,_("Pointer to model not set correctly."));
void wxMacDataViewDataBrowserListViewControl::DataBrowserItemNotificationProc(DataBrowserItemID itemID, DataBrowserItemNotification message, DataBrowserItemDataRef itemData)
{
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetPeer()));
+ wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->GetWXPeer()));
// check if the data view control pointer still exists because this call back function can still be called when the control has already been deleted:
wxVariant dataToRender;
- dataViewCtrlPtr = dynamic_cast<wxDataViewCtrl*>(this->GetPeer());
+ dataViewCtrlPtr = dynamic_cast<wxDataViewCtrl*>(this->GetWXPeer());
wxCHECK_RET(dataViewCtrlPtr != NULL, _("Pointer to data view control not set correctly."));
wxCHECK_RET(dataViewCtrlPtr->GetModel() != NULL,_("Pointer to model not set correctly."));
wxCHECK_RET(this->GetColumnIndex(propertyID,&columnIndex) == noErr,_("Could not determine column index."));
if (this->GetRegion(kControlContentMetaPart,rgn) == noErr)
GetRegionBounds(rgn,&content);
else
- this->GetRect(&content);
+ GetControlBounds(m_controlRef, &content);
::DisposeRgn(rgn);
// space for the header
this->GetHeaderButtonHeight(&headerHeight);
wxDC *dc = dataViewCustomRendererPtr->GetDC();
wxRect cellrect( static_cast<int>(rectangle->left),
- static_cast<int>(rectangle->top+2),
+ static_cast<int>(rectangle->top),
static_cast<int>(1+rectangle->right-rectangle->left),
static_cast<int>(rectangle->bottom-rectangle->top) );
dataViewCustomRendererItem = reinterpret_cast<void*>(itemID);
wxCHECK_MSG(dataViewCustomRendererItem.IsOk(),kDataBrowserNothingHit,_("Invalid data view item"));
- dataViewCtrlPtr = dynamic_cast<wxDataViewCtrl*>(this->GetPeer());
+ dataViewCtrlPtr = dynamic_cast<wxDataViewCtrl*>(this->GetWXPeer());
wxCHECK_MSG(dataViewCtrlPtr != NULL,kDataBrowserNothingHit,_("Pointer to data view control not set correctly."));
dataViewColumnPtr = dataViewCtrlPtr->GetColumnPtr(propertyID);
wxCHECK_MSG(dataViewColumnPtr != NULL,kDataBrowserNothingHit,_("No column existing."));