bool wxOSXDataViewModelNotifier::ItemChanged(wxDataViewItem const& item)
{
wxCHECK_MSG(item.IsOk(), false,_("Changed item is invalid."));
bool wxOSXDataViewModelNotifier::ItemChanged(wxDataViewItem const& item)
{
wxCHECK_MSG(item.IsOk(), false,_("Changed item is invalid."));
- wxCHECK_MSG(this->GetOwner() != NULL,false,_("Owner not initialized."));
- if (this->m_DataViewCtrlPtr->GetDataViewPeer()->Update(this->GetOwner()->GetParent(item),item))
+ wxCHECK_MSG(GetOwner() != NULL,false,_("Owner not initialized."));
+ if (m_DataViewCtrlPtr->GetDataViewPeer()->Update(GetOwner()->GetParent(item),item))
// not to be identical because the being edited item might be below the passed item in the hierarchy);
// to prevent the control trying to ask the model to update an already deleted item the control is informed that currently a deleting process
// has been started and that variables can currently not be updated even when requested by the system:
// not to be identical because the being edited item might be below the passed item in the hierarchy);
// to prevent the control trying to ask the model to update an already deleted item the control is informed that currently a deleting process
// has been started and that variables can currently not be updated even when requested by the system:
- this->m_DataViewCtrlPtr->SetDeleting(true);
- noFailureFlag = this->m_DataViewCtrlPtr->GetDataViewPeer()->Remove(parent,item);
+ m_DataViewCtrlPtr->SetDeleting(true);
+ noFailureFlag = m_DataViewCtrlPtr->GetDataViewPeer()->Remove(parent,item);
// not to be identical because the being edited item might be below the passed item in the hierarchy);
// to prevent the control trying to ask the model to update an already deleted item the control is informed that currently a deleting process
// has been started and that variables can currently not be updated even when requested by the system:
// not to be identical because the being edited item might be below the passed item in the hierarchy);
// to prevent the control trying to ask the model to update an already deleted item the control is informed that currently a deleting process
// has been started and that variables can currently not be updated even when requested by the system:
bool wxOSXDataViewModelNotifier::ValueChanged(wxDataViewItem const& item, unsigned int col)
{
wxCHECK_MSG(item.IsOk(), false,_("Passed item is invalid."));
bool wxOSXDataViewModelNotifier::ValueChanged(wxDataViewItem const& item, unsigned int col)
{
wxCHECK_MSG(item.IsOk(), false,_("Passed item is invalid."));
- wxCHECK_MSG(this->GetOwner() != NULL,false,_("Owner not initialized."));
- if (this->m_DataViewCtrlPtr->GetDataViewPeer()->Update(this->GetOwner()->GetParent(item),item))
+ wxCHECK_MSG(GetOwner() != NULL,false,_("Owner not initialized."));
+ if (m_DataViewCtrlPtr->GetDataViewPeer()->Update(GetOwner()->GetParent(item),item))
dataViewEvent.SetColumn(col);
dataViewEvent.SetItem(item);
// send the equivalent wxWidget event:
dataViewEvent.SetColumn(col);
dataViewEvent.SetItem(item);
// send the equivalent wxWidget event:
for (size_t itemIndex=0; itemIndex<noOfItems; ++itemIndex)
{
int height = 20; // TODO find out standard height
for (size_t itemIndex=0; itemIndex<noOfItems; ++itemIndex)
{
int height = 20; // TODO find out standard height
// dependent methods can be found in the environment's
// source file.
// ---------------------------------------------------------
// dependent methods can be found in the environment's
// source file.
// ---------------------------------------------------------
}
void wxDataViewCustomRenderer::RenderText( const wxString &text, int xoffset, wxRect cell, wxDC *dc, int state )
}
void wxDataViewCustomRenderer::RenderText( const wxString &text, int xoffset, wxRect cell, wxDC *dc, int state )
- if ((this->m_DCPtr == NULL) && (this->GetOwner() != NULL) && (this->GetOwner()->GetOwner() != NULL))
- this->m_DCPtr = new wxClientDC(this->GetOwner()->GetOwner());
- return this->m_DCPtr;
+ if ((m_DCPtr == NULL) && (GetOwner() != NULL) && (GetOwner()->GetOwner() != NULL))
+ m_DCPtr = new wxClientDC(GetOwner()->GetOwner());
+ return m_DCPtr;
bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator )
{
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 & ~(wxHSCROLL | wxVSCROLL),validator)))
+ if (!(wxControl::Create(parent,id,pos,size,style & ~(wxHSCROLL | wxVSCROLL),validator)))
- m_peer = ::CreateDataView(this,parent,id,pos,size,style,this->GetExtraStyle());
+ m_peer = ::CreateDataView(this,parent,id,pos,size,style,GetExtraStyle());
// first, some error checking:
wxCHECK_MSG(dataViewWidgetPtr != NULL, false,_("Pointer to native control must not be NULL."));
wxCHECK_MSG(columnPtr != NULL, false,_("Column pointer must not be NULL."));
wxCHECK_MSG(columnPtr->GetRenderer() != NULL, false,_("Column does not have a renderer."));
// first, some error checking:
wxCHECK_MSG(dataViewWidgetPtr != NULL, false,_("Pointer to native control must not be NULL."));
wxCHECK_MSG(columnPtr != NULL, false,_("Column pointer must not be NULL."));
wxCHECK_MSG(columnPtr->GetRenderer() != NULL, false,_("Column does not have a renderer."));
- (columnPtr->GetModelColumn() < this->GetModel()->GetColumnCount()),false,_("Column's model column has no equivalent in the associated model."));
+ (columnPtr->GetModelColumn() < GetModel()->GetColumnCount()),false,_("Column's model column has no equivalent in the associated model."));
// if the insertion in the native control is successful the rest can also be initialized:
if (dataViewWidgetPtr->InsertColumn(pos,columnPtr))
{
// make sure that the data is up-to-date...
// if the newly appended column is the first column add the initial data to the control and mark the column as an expander column,
// otherwise ask the control to 'update' the data in the newly appended column:
// if the insertion in the native control is successful the rest can also be initialized:
if (dataViewWidgetPtr->InsertColumn(pos,columnPtr))
{
// make sure that the data is up-to-date...
// if the newly appended column is the first column add the initial data to the control and mark the column as an expander column,
// otherwise ask the control to 'update' the data in the newly appended column:
- this->ExpandAncestors(item); // make sure that the item exists in the control
- this->GetDataViewPeer()->EnsureVisible(item,columnPtr);
+ ExpandAncestors(item); // make sure that the item exists in the control
+ GetDataViewPeer()->EnsureVisible(item,columnPtr);
}
wxRect wxDataViewCtrl::GetItemRect(wxDataViewItem const& item, wxDataViewColumn const* columnPtr) const
{
if (item.IsOk() && (columnPtr != NULL))
}
wxRect wxDataViewCtrl::GetItemRect(wxDataViewItem const& item, wxDataViewColumn const* columnPtr) const
{
if (item.IsOk() && (columnPtr != NULL))
}
void wxDataViewCtrl::HitTest(wxPoint const& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const
{
}
void wxDataViewCtrl::HitTest(wxPoint const& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const
{
- this->ExpandAncestors(item); // make sure that the item exists in the control
- this->GetDataViewPeer()->Select(item);
+ ExpandAncestors(item); // make sure that the item exists in the control
+ GetDataViewPeer()->Select(item);
- wxCHECK_RET(this->GetModel() != NULL,_("Model pointer not initialized."));
- noOfChildren = this->GetModel()->GetChildren(parentItem,items);
- (void) this->GetModel()->ItemsAdded(parentItem,items);
+ wxCHECK_RET(GetModel() != NULL,_("Model pointer not initialized."));
+ noOfChildren = GetModel()->GetChildren(parentItem,items);
+ (void) GetModel()->ItemsAdded(parentItem,items);
- this->GetCustomRendererPtr()->FinishEditing();
- this->SetCustomRendererItem(wxDataViewItem());
- this->SetCustomRendererPtr (NULL);
+ GetCustomRendererPtr()->FinishEditing();
+ SetCustomRendererItem(wxDataViewItem());
+ SetCustomRendererPtr (NULL);
- if (this->GetExpanderColumn() != NULL)
- this->GetDataViewPeer()->DoSetExpanderColumn(this->GetExpanderColumn());
+ if (GetExpanderColumn() != NULL)
+ GetDataViewPeer()->DoSetExpanderColumn(GetExpanderColumn());
// reset DC of all custom renderers because DC has changed:
for (unsigned int i=0; i<noOfColumns; ++i)
{
// reset DC of all custom renderers because DC has changed:
for (unsigned int i=0; i<noOfColumns; ++i)
{