/////////////////////////////////////////////////////////////////////////////
// Name: dataview.h
-// Purpose: documentation for wxDataViewIconText class
+// Purpose: interface of wxDataViewIconText
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
/**
Gets the icon.
*/
- const wxIcon GetIcon();
+ const wxIcon GetIcon() const;
/**
Gets the text.
*/
- wxString GetText();
+ wxString GetText() const;
/**
Set the icon.
};
+
/**
@class wxDataViewEvent
@wxheader{dataview.h}
public:
//@{
/**
-
+
*/
wxDataViewEvent(wxEventType commandType = wxEVT_NULL,
int winid = 0);
/**
Used to clone the event.
*/
- wxEvent* Clone();
+ wxEvent* Clone() const;
/**
Returns the position of the column in the control or -1
if no column field was set by the event emitter.
*/
- int GetColumn();
+ int GetColumn() const;
/**
Returns a pointer to the wxDataViewColumn from which
/**
Returns the wxDataViewModel associated with the event.
*/
- wxDataViewModel* GetModel();
+ wxDataViewModel* GetModel() const;
/**
Returns a the position of a context menu event in screen coordinates.
*/
- wxPoint GetPosition();
+ wxPoint GetPosition() const;
/**
Returns a reference to a value.
*/
- const wxVariant GetValue();
+ const wxVariant GetValue() const;
/**
-
+
*/
void SetColumn(int col);
void SetDataViewColumn(wxDataViewColumn* col);
/**
-
+
*/
void SetModel(wxDataViewModel* model);
/**
-
+
*/
void SetValue(const wxVariant& value);
};
+
/**
@class wxDataViewIconTextRenderer
@wxheader{dataview.h}
{
public:
/**
-
+
*/
wxDataViewIconTextRenderer(const wxString& varianttype = "wxDataViewIconText",
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT);
};
+
/**
@class wxDataViewIndexListModel
@wxheader{dataview.h}
/**
Oberride this to indicate that the row has special font attributes.
This only affects the
- wxDataViewTextRendererText renderer.
+ wxDataViewTextRendererText() renderer.
See also wxDataViewItemAttr.
*/
bool GetAttr(unsigned int row, unsigned int col,
/**
Returns the wxDataViewItem at the given @e row.
*/
- wxDataViewItem GetItem(unsigned int row);
+ wxDataViewItem GetItem(unsigned int row) const;
/**
Returns the position of given @e item.
*/
- unsigned int GetRow(const wxDataViewItem& item);
+ unsigned int GetRow(const wxDataViewItem& item) const;
/**
Override this to allow getting values from the model.
*/
void GetValue(wxVariant& variant, unsigned int row,
- unsigned int col);
+ unsigned int col) const;
/**
Call this after if the data has to be read again from
};
+
/**
@class wxDataViewModel
@wxheader{dataview.h}
/**
Oberride this to indicate that the item has special font attributes.
This only affects the
- wxDataViewTextRendererText renderer.
+ wxDataViewTextRendererText() renderer.
See also wxDataViewItemAttr.
*/
bool GetAttr(const wxDataViewItem& item, unsigned int col,
an item. Returns the number of items.
*/
virtual unsigned int GetChildren(const wxDataViewItem& item,
- wxDataViewItemArray& children);
+ wxDataViewItemArray& children) const;
/**
Override this to indicate the number of columns in the model.
*/
- virtual unsigned int GetColumnCount();
+ virtual unsigned int GetColumnCount() const;
/**
Override this to indicate what type of data is stored in the
column specified by @e col. This should return a string
indicating the type of data as reported by wxVariant.
*/
- virtual wxString GetColumnType(unsigned int col);
+ virtual wxString GetColumnType(unsigned int col) const;
/**
Override this to indicate which wxDataViewItem representing the parent
of @a item or an invalid wxDataViewItem if the the root item is
the parent item.
*/
- virtual wxDataViewItem GetParent(const wxDataViewItem& item);
+ virtual wxDataViewItem GetParent(const wxDataViewItem& item) const;
/**
Override this to indicate the value of @e item
*/
virtual void GetValue(wxVariant& variant,
const wxDataViewItem& item,
- unsigned int col);
+ unsigned int col) const;
/**
Override this method to indicate if a container item merely
acts a normal item with entries for futher columns. By
default returns @e @false.
*/
- virtual bool HasContainerColumns(const wxDataViewItem& item);
+ virtual bool HasContainerColumns(const wxDataViewItem& item) const;
/**
Override this to indicate that the model provides a default compare
should be used. See also wxDataViewIndexListModel
for a model which makes use of this.
*/
- virtual bool HasDefaultCompare();
+ virtual bool HasDefaultCompare() const;
/**
Override this to indicate of @a item is a container, i.e. if
it can have child items.
*/
- virtual bool IsContainer(const wxDataViewItem& item);
+ virtual bool IsContainer(const wxDataViewItem& item) const;
/**
Call this to inform the model that an item has been added
};
+
/**
@class wxDataViewCustomRenderer
@wxheader{dataview.h}
/**
Override this to react to double clicks or ENTER.
*/
- virtual bool Activate(wxRect cell, wxDataViewModel* model,
- unsigned int col,
- unsigned int row);
+ virtual bool Activate( wxRect cell,
+ wxDataViewModel* model,
+ const wxDataViewItem & item,
+ unsigned int col );
/**
Override this to create the actual editor control once editing
/**
Overrride this to react to a left click.
*/
- virtual bool LeftClick(wxPoint cursor, wxRect cell,
- wxDataViewModel* model,
- unsigned int col,
- unsigned int row);
+ virtual bool LeftClick( wxPoint cursor,
+ wxRect cell,
+ wxDataViewModel * model,
+ const wxDataViewItem & item,
+ unsigned int col );
/**
Override this to render the cell. Before this is called,
/**
Overrride this to react to a right click.
*/
- virtual bool RightClick(wxPoint cursor, wxRect cell,
+ virtual bool RightClick(wxPoint cursor,
+ wxRect cell,
wxDataViewModel* model,
- unsigned int col,
- unsigned int row);
+ const wxDataViewItem & item,
+ unsigned int col);
/**
Overrride this to start a drag operation.
*/
virtual bool StartDrag(wxPoint cursor, wxRect cell,
wxDataViewModel* model,
- unsigned int col,
- unsigned int row);
+ const wxDataViewItem & item,
+ unsigned int col);
};
+
/**
@class wxDataViewBitmapRenderer
@wxheader{dataview.h}
{
public:
/**
-
+
*/
wxDataViewBitmapRenderer(const wxString& varianttype = "wxBitmap",
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT);
};
+
/**
@class wxDataViewItemAttr
@wxheader{dataview.h}
This class is used to indicate to a wxDataViewCtrl
- that a certain Item has extra font attributes
+ that a certain Item() has extra font attributes
for its renderer. For this, it is required to override
wxDataViewModel::GetAttr.
Attributes are currently only supported by
- wxDataViewTextRendererText.
+ wxDataViewTextRendererText().
@library{wxadv}
@category{FIXME}
};
+
/**
@class wxDataViewItem
@wxheader{dataview.h}
public:
//@{
/**
-
+
*/
wxDataViewItem(void* id = NULL);
wxDataViewItem(const wxDataViewItem& item);
/**
Returns the ID.
*/
- void* GetID();
+ void* GetID() const;
/**
Returns @true if the ID is not @e @NULL.
*/
- bool IsOk();
+ bool IsOk() const;
};
+
/**
@class wxDataViewCtrl
@wxheader{dataview.h}
position in the control which may change after reordering
columns by the user.
*/
- virtual wxDataViewColumn* GetColumn(unsigned int pos);
+ virtual wxDataViewColumn* GetColumn(unsigned int pos) const;
/**
Returns the number of columns.
*/
- virtual unsigned int GetColumnCount();
+ virtual unsigned int GetColumnCount() const;
/**
Returns the position of the column or -1 if not found in the control.
*/
- virtual int GetColumnPosition(const wxDataViewColumn* column);
+ virtual int GetColumnPosition(const wxDataViewColumn* column) const;
/**
Returns column containing the expanders.
*/
- wxDataViewColumn* GetExpanderColumn();
+ wxDataViewColumn* GetExpanderColumn() const;
/**
Returns indentation.
*/
- int GetIndent();
+ int GetIndent() const;
/**
Returns item rect.
*/
wxRect GetItemRect(const wxDataViewItem& item,
- const wxDataViewColumn* col = NULL);
+ const wxDataViewColumn* col = NULL) const;
/**
Returns pointer to the data model associated with the
control (if any).
*/
- virtual wxDataViewModel* GetModel();
+ virtual wxDataViewModel* GetModel() const;
/**
Returns first selected item or an invalid item if none is selected.
*/
- wxDataViewItem GetSelection();
+ wxDataViewItem GetSelection() const;
/**
Fills @a sel with currently selected items and returns
their number.
*/
- int GetSelections(wxDataViewItemArray& sel);
+ int GetSelections(wxDataViewItemArray& sel) const;
/**
Returns the wxDataViewColumn currently responsible for sorting
or @NULL if none has been selected.
*/
- virtual wxDataViewColumn* GetSortingColumn();
+ virtual wxDataViewColumn* GetSortingColumn() const;
/**
Hittest.
*/
void HitTest(const wxPoint& point, wxDataViewItem& item,
- wxDataViewColumn*& col);
+ wxDataViewColumn*& col) const;
/**
Return @true if the item is selected.
*/
- bool IsSelected(const wxDataViewItem& item);
+ bool IsSelected(const wxDataViewItem& item) const;
/**
Select the given item.
};
+
/**
@class wxDataViewModelNotifier
@wxheader{dataview.h}
};
+
/**
@class wxDataViewRenderer
@wxheader{dataview.h}
};
+
/**
@class wxDataViewTextRenderer
@wxheader{dataview.h}
{
public:
/**
-
+
*/
wxDataViewTextRenderer(const wxString& varianttype = "string",
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT);
};
+
/**
@class wxDataViewProgressRenderer
@wxheader{dataview.h}
{
public:
/**
-
+
*/
wxDataViewProgressRenderer(const wxString& label = wxEmptyString,
const wxString& varianttype = "long",
};
+
/**
@class wxDataViewSpinRenderer
@wxheader{dataview.h}
};
+
/**
@class wxDataViewToggleRenderer
@wxheader{dataview.h}
{
public:
/**
-
+
*/
wxDataViewToggleRenderer(const wxString& varianttype = "bool",
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT);
};
+
/**
@class wxDataViewTreeCtrl
@wxheader{dataview.h}
~wxDataViewTreeCtrl();
/**
-
+
*/
wxDataViewItem AppendContainer(const wxDataViewItem& parent,
const wxString& text,
wxClientData* data = NULL);
/**
-
+
*/
wxDataViewItem AppendItem(const wxDataViewItem& parent,
const wxString& text,
/**
Calls the identical method from wxDataViewTreeStore.
*/
- int GetChildCount(const wxDataViewItem& parent);
+ int GetChildCount(const wxDataViewItem& parent) const;
/**
Returns the image list.
/**
Calls the identical method from wxDataViewTreeStore.
*/
- wxClientData* GetItemData(const wxDataViewItem& item);
+ wxClientData* GetItemData(const wxDataViewItem& item) const;
/**
Calls the identical method from wxDataViewTreeStore.
*/
- const wxIcon GetItemExpandedIcon(const wxDataViewItem& item);
+ const wxIcon GetItemExpandedIcon(const wxDataViewItem& item) const;
/**
Calls the identical method from wxDataViewTreeStore.
*/
- const wxIcon GetItemIcon(const wxDataViewItem& item);
+ const wxIcon GetItemIcon(const wxDataViewItem& item) const;
/**
Calls the identical method from wxDataViewTreeStore.
*/
- wxString GetItemText(const wxDataViewItem& item);
+ wxString GetItemText(const wxDataViewItem& item) const;
/**
Calls the identical method from wxDataViewTreeStore.
*/
wxDataViewItem GetNthChild(const wxDataViewItem& parent,
- unsigned int pos);
+ unsigned int pos) const;
//@{
/**
Returns the store.
*/
- wxDataViewTreeStore* GetStore();
- const wxDataViewTreeStore* GetStore();
+ wxDataViewTreeStore* GetStore() const;
+ const wxDataViewTreeStore* GetStore() const;
//@}
/**
};
+
/**
@class wxDataViewTreeStore
@wxheader{dataview.h}
/**
Return the number of children of item.
*/
- int GetChildCount(const wxDataViewItem& parent);
+ int GetChildCount(const wxDataViewItem& parent) const;
/**
Returns the client data asoociated with the item.
*/
- wxClientData* GetItemData(const wxDataViewItem& item);
+ wxClientData* GetItemData(const wxDataViewItem& item) const;
/**
Returns the icon to display in expanded containers.
*/
- const wxIcon GetItemExpandedIcon(const wxDataViewItem& item);
+ const wxIcon GetItemExpandedIcon(const wxDataViewItem& item) const;
/**
Returns the icon of the item.
*/
- const wxIcon GetItemIcon(const wxDataViewItem& item);
+ const wxIcon GetItemIcon(const wxDataViewItem& item) const;
/**
Returns the text of the item.
*/
- wxString GetItemText(const wxDataViewItem& item);
+ wxString GetItemText(const wxDataViewItem& item) const;
/**
Returns the nth child item of item.
*/
wxDataViewItem GetNthChild(const wxDataViewItem& parent,
- unsigned int pos);
+ unsigned int pos) const;
/**
Inserts a container after @e previous.
};
+
/**
@class wxDataViewDateRenderer
@wxheader{dataview.h}
{
public:
/**
-
+
*/
wxDataViewDateRenderer(const wxString& varianttype = "datetime",
wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE);
};
+
/**
@class wxDataViewTextRendererAttr
@wxheader{dataview.h}
{
public:
/**
-
+
*/
wxDataViewTextRendererAttr(const wxString& varianttype = "string",
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
};
+
/**
@class wxDataViewColumn
@wxheader{dataview.h}
*/
void SetTitle(const wxString& title);
};
+