More interface header reviews by Azriel Fasten, and added skeleton docs for wxBookCtrlBase (still needs docs though).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2008-05-20 07:48:30 +00:00
parent 79996663e2
commit 7977b62ae2
7 changed files with 991 additions and 680 deletions

View File

@@ -13,18 +13,17 @@
An opaque reference to a tree item.
@library{wxcore}
@category{FIXME}
@category{misc}
@see wxTreeCtrl, wxTreeItemData, @ref overview_wxtreectrloverview "wxTreeCtrl
overview"
@see wxTreeCtrl, wxTreeItemData, @ref overview_treectrl
*/
class wxTreeItemId
{
public:
/**
Default constructor. wxTreemItemIds are not meant to be constructed explicitly
by
the user; they are returned by the wxTreeCtrl functions instead.
Default constructor. A wxTreeItemId is not meant to be constructed
explicitly by the user; only those returned by the wxTreeCtrl functions
should be used.
*/
wxTreeItemId();
@@ -35,11 +34,96 @@ public:
//@{
/**
Operators for comparison between wxTreeItemId objects.
Operators for comparison between wxTreeItemId objects.
*/
void operator !() const;
const bool operator ==(const wxTreeItemId& item) const;
const bool operator !=(const wxTreeItemId& item) const;
bool operator ==(const wxTreeItemId& item) const;
bool operator !=(const wxTreeItemId& item) const;
//@}
/**
Antonym of IsOk(), i.e. returns @true only if the item is not valid.
*/
bool operator !() const;
};
/**
@class wxTreeItemData
@wxheader{treebase.h}
wxTreeItemData is some (arbitrary) user class associated with some item. The
main advantage of having this class is that wxTreeItemData objects are
destroyed automatically by the tree and, as this class has virtual
destructor, it means that the memory and any other resources associated with
a tree item will be automatically freed when it is deleted. Note that we
don't use wxObject as the base class for wxTreeItemData because the size of
this class is critical: in many applications, each tree leaf will have
wxTreeItemData associated with it and the number of leaves may be quite big.
Also please note that because the objects of this class are deleted by the
tree using the operator @c delete, they must always be allocated on the heap
using @c new.
@library{wxcore}
@category{containers}
@see wxTreeCtrl
*/
class wxTreeItemData : public wxClientData
{
public:
/**
Default constructor.
@beginWxPythonOnly
The following methods are added in wxPython for accessing the object:
- GetData(): Returns a reference to the Python Object.
- SetData(obj): Associates a new Python Object with the wxTreeItemData.
@endWxPythonOnly
*/
wxTreeItemData();
/**
Virtual destructor.
*/
~wxTreeItemData();
/**
Returns the item associated with this node.
*/
const wxTreeItemId GetId();
/**
Sets the item associated with this node.
*/
void SetId(const wxTreeItemId& id);
};
/**
Indicates which type to associate an image with a wxTreeCtrl item.
@see wxTreeCtrl::GetItemImage(), wxTreeCtrl::SetItemImage()
*/
enum wxTreeItemIcon
{
/**
To get/set the item image for when the item is
@b not selected and @b not expanded.
*/
wxTreeItemIcon_Normal,
/**
To get/set the item image for when the item is
@b selected and @b not expanded.
*/
wxTreeItemIcon_Selected,
/**
To get/set the item image for when the item is
@b not selected and @b expanded.
*/
wxTreeItemIcon_Expanded,
/**
To get/set the item image for when the item is
@b selected and @b expanded.
*/
wxTreeItemIcon_SelectedExpanded,
wxTreeItemIcon_Max
};