#include <limits>
-#include "wx/mac/carbon/databrow.h"
+#include "wx/osx/carbon/databrow.h"
#ifndef WX_PRECOMP
#include "wx/timer.h"
bool noFailureFlag = (!(parent.IsOk()) && (this->m_dataViewControlPtr->AddItem(kDataBrowserNoItem,&itemID) == noErr) ||
parent.IsOk() && (this->m_dataViewControlPtr->AddItem(reinterpret_cast<DataBrowserItemID>(parent.GetID()),&itemID) == noErr));
- wxDataViewCtrl *dvc = (wxDataViewCtrl*) this->m_dataViewControlPtr->GetPeer();
+ wxDataViewCtrl *dvc = (wxDataViewCtrl*) this->m_dataViewControlPtr->GetWXPeer();
if (dvc->GetWindowStyle() & wxDV_VARIABLE_LINE_HEIGHT)
{
wxDataViewModel *model = GetOwner();
// give allocated array space free again:
delete[] itemIDs;
- wxDataViewCtrl *dvc = (wxDataViewCtrl*) this->m_dataViewControlPtr->GetPeer();
+ wxDataViewCtrl *dvc = (wxDataViewCtrl*) this->m_dataViewControlPtr->GetWXPeer();
if (dvc->GetWindowStyle() & wxDV_VARIABLE_LINE_HEIGHT)
{
wxDataViewModel *model = GetOwner();
wxCHECK_MSG(item.IsOk(),false,_("Changed item is invalid."));
if (this->m_dataViewControlPtr->UpdateItems(&itemID) == noErr)
{
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->m_dataViewControlPtr->GetPeer()));
+ wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->m_dataViewControlPtr->GetWXPeer()));
// sent the equivalent wxWidget event:
wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED,dataViewCtrlPtr->GetId()); // variable defintion
noFailureFlag = (this->m_dataViewControlPtr->UpdateItems(kDataBrowserNoItem,noOfEntries,itemIDs,kDataBrowserItemNoProperty,kDataBrowserItemNoProperty) == noErr);
if (noFailureFlag)
{
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->m_dataViewControlPtr->GetPeer()));
+ wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->m_dataViewControlPtr->GetWXPeer()));
// send for all changed items a wxWidget event:
wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED,dataViewCtrlPtr->GetId()); // variable defintion
// variable definition and initialization:
DataBrowserItemID itemID(reinterpret_cast<DataBrowserItemID>(item.GetID()));
OSStatus errorStatus;
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->m_dataViewControlPtr->GetPeer()));
+ wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->m_dataViewControlPtr->GetWXPeer()));
// when this method is called and currently an item is being edited this item may have already been deleted in the model (the passed item and the being edited item have
// not to be identical because the being edited item might be below the passed item in the hierarchy);
DataBrowserItemID* itemIDs;
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->m_dataViewControlPtr->GetPeer()));
+ wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->m_dataViewControlPtr->GetWXPeer()));
size_t noOfEntries;
DataBrowserPropertyID propertyID;
- wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->m_dataViewControlPtr->GetPeer()));
+ wxDataViewCtrl* dataViewCtrlPtr(dynamic_cast<wxDataViewCtrl*>(this->m_dataViewControlPtr->GetWXPeer()));
wxCHECK_MSG(item.IsOk(), false,_("Passed item is invalid."));
wxDataViewItemArray array;
GetOwner()->GetChildren( item, array );
ItemsAdded( item, array );
+ this->m_dataViewControlPtr->SetScrollPosition(0, 0);
return noFailureFlag;
} /* Cleared() */
bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator )
{
- if (!(this->wxControl::Create(parent,id,pos,size,(style | wxSUNKEN_BORDER) & ~(wxHSCROLL | wxVSCROLL),validator)))
+ if (!(this->wxControl::Create(parent,id,pos,size,style & ~(wxHSCROLL | wxVSCROLL),validator)))
return false;
#ifdef __WXMAC__
#endif
this->m_peer = new wxMacDataViewDataBrowserListViewControl(this,pos,size,style);
+
+ if ( style & wxBORDER_NONE )
+ this->m_peer->SetData( kControlNoPart, kControlDataBrowserIncludesFrameAndFocusTag, (Boolean) false ) ;
+
this->MacPostControlCreate(pos,size);
::SetAutomaticControlDragTrackingEnabledForWindow(::GetControlOwner(this->m_peer->GetControlRef()),true);