/////////////////////////////////////////////////////////////////////////////
// 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}
/**
*/
- wxDataViewEvent(wxEventType commandType = wxEVT_@NULL,
+ wxDataViewEvent(wxEventType commandType = wxEVT_NULL,
int winid = 0);
wxDataViewEvent(const wxDataViewEvent& event);
//@}
/**
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;
/**
};
+
/**
@class wxDataViewIconTextRenderer
@wxheader{dataview.h}
};
+
/**
@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}
The compare function to be used by control. The default compare function
sorts by container and other items separately and in ascending order.
Override this for a different sorting behaviour.
-
See also HasDefaultCompare().
*/
virtual int Compare(const wxDataViewItem& item1,
/**
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 @e item or an invalid wxDataViewItem if the the root item is
+ 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 @e item is a container, i.e. if
+ 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
/**
Call this to inform the model that an item has changed.
-
This will eventually emit a wxEVT_DATAVIEW_ITEM_VALUE_CHANGED
event (in which the column fields will not be set) to the user.
*/
/**
Call this to inform the model that several items have changed.
-
This will eventually emit wxEVT_DATAVIEW_ITEM_VALUE_CHANGED
events (in which the column fields will not be set) to the user.
*/
const wxDataViewItemArray& items);
/**
- Remove the @e notifier from the list of notifiers.
+ Remove the @a notifier from the list of notifiers.
*/
void RemoveNotifier(wxDataViewModelNotifier* notifier);
been changed. This is also called from wxDataViewCtrl's
internal editing code, e.g. when editing a text field
in the control.
-
This will eventually emit a wxEVT_DATAVIEW_ITEM_VALUE_CHANGED
event to the user.
*/
};
+
/**
@class wxDataViewCustomRenderer
@wxheader{dataview.h}
*/
wxDataViewCustomRenderer(const wxString& varianttype = "string",
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
- bool no_init = @false);
+ bool no_init = false);
/**
Destructor.
/**
Override this to create the actual editor control once editing
- is about to start. @e parent is the parent of the editor
- control, @e labelRect indicates the position and
- size of the editor control and @e value is its initial value:
+ is about to start. @a parent is the parent of the editor
+ control, @a labelRect indicates the position and
+ size of the editor control and @a value is its initial value:
*/
- virtual wxControl* CreateEditorCtrl(wxWindow * parent,
+ virtual wxControl* CreateEditorCtrl(wxWindow* parent,
wxRect labelRect,
- const wxVariant & value);
+ const wxVariant& value);
/**
Create DC on request. Internal.
*/
-#define virtual wxDC* GetDC() /* implementation is private */
+ virtual wxDC* GetDC();
/**
Return size required to show content.
from the editor control (pointed to by @e editor):
*/
virtual bool GetValueFromEditorCtrl(wxControl* editor,
- wxVariant & value);
+ wxVariant& value);
/**
Override this and make it return @e @true in order to
};
+
/**
@class wxDataViewBitmapRenderer
@wxheader{dataview.h}
};
+
/**
@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}
/**
*/
- wxDataViewItem(void* id = @NULL);
+ wxDataViewItem(void* id = NULL);
wxDataViewItem(const wxDataViewItem& item);
//@}
/**
Returns the ID.
*/
-#define void* GetID() /* implementation is private */
+ void* GetID() const;
/**
Returns @true if the ID is not @e @NULL.
*/
-#define bool IsOk() /* implementation is private */
+ bool IsOk() const;
};
+
/**
@class wxDataViewCtrl
@wxheader{dataview.h}
/**
Add a wxDataViewColumn to the control. Returns
@e @true on success.
-
Note that there is a number of short cut methods which implicitly create
a wxDataViewColumn and a
wxDataViewRenderer for it (see below).
/**
Collapses the item.
*/
- void Collapse(const wxDataViewItem & item);
+ void Collapse(const wxDataViewItem& item);
/**
Create the control. Useful for two step creation.
/**
Call this to ensure that the given item is visible.
*/
- void EnsureVisible(const wxDataViewItem & item,
- const wxDataViewColumn* column = @NULL);
+ void EnsureVisible(const wxDataViewItem& item,
+ const wxDataViewColumn* column = NULL);
/**
Expands the item.
*/
- void Expand(const wxDataViewItem & item);
+ void Expand(const wxDataViewItem& item);
/**
- Returns pointer to the column. @e pos refers to the
+ Returns pointer to the column. @a pos refers to the
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 @e sel with currently selected items and returns
+ 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.
*/
- void Select(const wxDataViewItem & item);
+ void Select(const wxDataViewItem& item);
/**
Select all items.
/**
Set which column shall contain the tree-like expanders.
*/
- void SetExpanderColumn(wxDataViewColumn * col);
+ void SetExpanderColumn(wxDataViewColumn* col);
/**
Sets the indendation.
/**
Sets the selection to the array of wxDataViewItems.
*/
- void SetSelections(const wxDataViewItemArray & sel);
+ void SetSelections(const wxDataViewItemArray& sel);
/**
Unselect the given item.
*/
- void Unselect(const wxDataViewItem & item);
+ void Unselect(const wxDataViewItem& item);
/**
Unselect all item. This method only has effect if multiple
};
+
/**
@class wxDataViewModelNotifier
@wxheader{dataview.h}
};
+
/**
@class wxDataViewRenderer
@wxheader{dataview.h}
a certain aspect (e.g. max number of characters or only alphanumeric
input, ASCII only etc.). Return @e @false if the value is
not valid.
-
Please note that due to implementation limitations, this validation
is done after the editing control already is destroyed and the
editing process finished.
};
+
/**
@class wxDataViewTextRenderer
@wxheader{dataview.h}
};
+
/**
@class wxDataViewProgressRenderer
@wxheader{dataview.h}
};
+
/**
@class wxDataViewSpinRenderer
@wxheader{dataview.h}
{
public:
/**
- Constructor. @e min and @e max indicate the minimum und
+ Constructor. @a min and @a max indicate the minimum und
maximum values of for the wxSpinCtrl.
*/
wxDataViewSpinRenderer(int min, int max,
};
+
/**
@class wxDataViewToggleRenderer
@wxheader{dataview.h}
};
+
/**
@class wxDataViewTreeCtrl
@wxheader{dataview.h}
const wxString& text,
int icon = -1,
int expanded = -1,
- wxClientData* data = @NULL);
+ wxClientData* data = NULL);
/**
wxDataViewItem AppendItem(const wxDataViewItem& parent,
const wxString& text,
int icon = -1,
- wxClientData* data = @NULL);
+ wxClientData* data = NULL);
/**
Creates the control and a wxDataViewTreeStore as
/**
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;
//@}
/**
const wxString& text,
int icon = -1,
int expanded = -1,
- wxClientData* data = @NULL);
+ wxClientData* data = NULL);
/**
Calls the same method from wxDataViewTreeStore but uess
const wxDataViewItem& previous,
const wxString& text,
int icon = -1,
- wxClientData* data = @NULL);
+ wxClientData* data = NULL);
/**
Calls the same method from wxDataViewTreeStore but uess
const wxString& text,
int icon = -1,
int expanded = -1,
- wxClientData* data = @NULL);
+ wxClientData* data = NULL);
/**
Calls the same method from wxDataViewTreeStore but uess
wxDataViewItem PrependItem(const wxDataViewItem& parent,
const wxString& text,
int icon = -1,
- wxClientData* data = @NULL);
+ wxClientData* data = NULL);
/**
Sets the image list.
};
+
/**
@class wxDataViewTreeStore
@wxheader{dataview.h}
const wxString& text,
const wxIcon& icon = wxNullIcon,
const wxIcon& expanded = wxNullIcon,
- wxClientData* data = @NULL);
+ wxClientData* data = NULL);
/**
Append an item.
wxDataViewItem AppendItem(const wxDataViewItem& parent,
const wxString& text,
const wxIcon& icon = wxNullIcon,
- wxClientData* data = @NULL);
+ wxClientData* data = NULL);
/**
Delete all item in the model.
/**
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.
const wxString& text,
const wxIcon& icon = wxNullIcon,
const wxIcon& expanded = wxNullIcon,
- wxClientData* data = @NULL);
+ wxClientData* data = NULL);
/**
Inserts an item after @e previous.
const wxDataViewItem& previous,
const wxString& text,
const wxIcon& icon = wxNullIcon,
- wxClientData* data = @NULL);
+ wxClientData* data = NULL);
/**
Inserts a container before the first child item or @e parent.
const wxString& text,
const wxIcon& icon = wxNullIcon,
const wxIcon& expanded = wxNullIcon,
- wxClientData* data = @NULL);
+ wxClientData* data = NULL);
/**
Inserts an item before the first child item or @e parent.
wxDataViewItem PrependItem(const wxDataViewItem& parent,
const wxString& text,
const wxIcon& icon = wxNullIcon,
- wxClientData* data = @NULL);
+ wxClientData* data = NULL);
/**
Sets the client data associated with the item.
};
+
/**
@class wxDataViewDateRenderer
@wxheader{dataview.h}
};
+
/**
@class wxDataViewTextRendererAttr
@wxheader{dataview.h}
};
+
/**
@class wxDataViewColumn
@wxheader{dataview.h}
/**
Returns the renderer of this wxDataViewColumn.
-
See also wxDataViewRenderer.
*/
wxDataViewRenderer* GetRenderer();
/**
Returns @true if the column is sortable.
-
See SetSortable()
*/
bool GetSortable();
/**
Returns @true, if the sort order is ascending.
-
See also SetSortOrder()
*/
bool IsSortOrderAscending();
make the column header clickable. Call
SetSortOrder()
afterwards to actually make the sort indicator appear.
- If @e sortable is @false, the column header is
+ If @a sortable is @false, the column header is
no longer clickable and the sort indicator (little
arrow) will disappear.
*/
*/
void SetTitle(const wxString& title);
};
+