Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
dcpp::gui::IGUITreeViewNode Class Referenceabstract

Node for gui tree view. More...

#include <duckcpp/core/engine/IGUITreeView.hpp>

Inheritance diagram for dcpp::gui::IGUITreeViewNode:
Inheritance graph
Collaboration diagram for dcpp::gui::IGUITreeViewNode:
Collaboration graph

Public Member Functions

virtual IGUITreeViewgetOwner () const =0
 returns the owner (tree view) of this node
 
virtual IGUITreeViewNodegetParent () const =0
 Returns the parent node of this node.
 
virtual const wchar_t * getText () const =0
 returns the text of the node
 
virtual void setText (const wchar_t *text)=0
 sets the text of the node
 
virtual const wchar_t * getIcon () const =0
 returns the icon text of the node
 
virtual void setIcon (const wchar_t *icon)=0
 sets the icon text of the node
 
virtual dcpp::uint32_kt getImageIndex () const =0
 returns the image index of the node
 
virtual void setImageIndex (dcpp::uint32_kt imageIndex)=0
 sets the image index of the node
 
virtual dcpp::uint32_kt getSelectedImageIndex () const =0
 returns the image index of the node
 
virtual void setSelectedImageIndex (dcpp::uint32_kt imageIndex)=0
 sets the image index of the node
 
virtual void * getData () const =0
 returns the user data (void*) of this node
 
virtual void setData (void *data)=0
 sets the user data (void*) of this node
 
virtual IReferenceCountedgetData2 () const =0
 returns the user data2 (IReferenceCounted) of this node
 
virtual void setData2 (IReferenceCounted *data)=0
 sets the user data2 (IReferenceCounted) of this node
 
virtual dcpp::uint32_kt getChildCount () const =0
 returns the child item count
 
virtual void clearChildren ()=0
 removes all children (recursive) from this node
 
DCPP_DEPRECATED void clearChilds ()
 removes all children (recursive) from this node
 
virtual bool hasChildren () const =0
 returns true if this node has child nodes
 
DCPP_DEPRECATED bool hasChilds () const
 returns true if this node has child nodes
 
virtual IGUITreeViewNodeaddChildBack (const wchar_t *text, const wchar_t *icon=0, dcpp::int32_kt imageIndex=-1, dcpp::int32_kt selectedImageIndex=-1, void *data=0, IReferenceCounted *data2=0)=0
 Adds a new node behind the last child node.
 
virtual IGUITreeViewNodeaddChildFront (const wchar_t *text, const wchar_t *icon=0, dcpp::int32_kt imageIndex=-1, dcpp::int32_kt selectedImageIndex=-1, void *data=0, IReferenceCounted *data2=0)=0
 Adds a new node before the first child node.
 
virtual IGUITreeViewNodeinsertChildAfter (IGUITreeViewNode *other, const wchar_t *text, const wchar_t *icon=0, dcpp::int32_kt imageIndex=-1, dcpp::int32_kt selectedImageIndex=-1, void *data=0, IReferenceCounted *data2=0)=0
 Adds a new node behind the other node.
 
virtual IGUITreeViewNodeinsertChildBefore (IGUITreeViewNode *other, const wchar_t *text, const wchar_t *icon=0, dcpp::int32_kt imageIndex=-1, dcpp::int32_kt selectedImageIndex=-1, void *data=0, IReferenceCounted *data2=0)=0
 Adds a new node before the other node.
 
virtual IGUITreeViewNodegetFirstChild () const =0
 Return the first child node from this node.
 
virtual IGUITreeViewNodegetLastChild () const =0
 Return the last child node from this node.
 
virtual IGUITreeViewNodegetPrevSibling () const =0
 Returns the previous sibling node from this node.
 
virtual IGUITreeViewNodegetNextSibling () const =0
 Returns the next sibling node from this node.
 
virtual IGUITreeViewNodegetNextVisible () const =0
 Returns the next visible (expanded, may be out of scrolling) node from this node.
 
virtual bool deleteChild (IGUITreeViewNode *child)=0
 Deletes a child node.
 
virtual bool moveChildUp (IGUITreeViewNode *child)=0
 Moves a child node one position up.
 
virtual bool moveChildDown (IGUITreeViewNode *child)=0
 Moves a child node one position down.
 
virtual bool getExpanded () const =0
 Returns true if the node is expanded (children are visible).
 
virtual void setExpanded (bool expanded)=0
 Sets if the node is expanded.
 
virtual bool getSelected () const =0
 Returns true if the node is currently selected.
 
virtual void setSelected (bool selected)=0
 Sets this node as selected.
 
virtual bool isRoot () const =0
 Returns true if this node is the root node.
 
virtual dcpp::int32_kt getLevel () const =0
 Returns the level of this node.
 
virtual bool isVisible () const =0
 Returns true if this node is visible (all parents are expanded).
 
- Public Member Functions inherited from dcpp::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
dcpp::int32_kt getReferenceCount () const
 Get the reference count.
 
const dcpp::char_ktgetDebugName () const
 Returns the debug name of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from dcpp::IReferenceCounted
void setDebugName (const dcpp::char_kt *newName)
 Sets the debug name of the object.
 

Detailed Description

Node for gui tree view.

This element can create the following events of type EGUI_EVENT_TYPE:
  • EGET_TREEVIEW_NODE_EXPAND
  • EGET_TREEVIEW_NODE_COLLAPS
  • EGET_TREEVIEW_NODE_DESELECT
  • EGET_TREEVIEW_NODE_SELECT

Member Function Documentation

◆ addChildBack()

virtual IGUITreeViewNode * dcpp::gui::IGUITreeViewNode::addChildBack ( const wchar_t *  text,
const wchar_t *  icon = 0,
dcpp::int32_kt  imageIndex = -1,
dcpp::int32_kt  selectedImageIndex = -1,
void *  data = 0,
IReferenceCounted data2 = 0 
)
pure virtual

Adds a new node behind the last child node.

Parameters
texttext of the new node
iconicon text of the new node
imageIndexindex of the image for the new node (-1 = none)
selectedImageIndexindex of the selected image for the new node (-1 = same as imageIndex)
datauser data (void*) of the new node
data2user data2 (IReferenceCounted*) of the new node
Returns
The new node

◆ addChildFront()

virtual IGUITreeViewNode * dcpp::gui::IGUITreeViewNode::addChildFront ( const wchar_t *  text,
const wchar_t *  icon = 0,
dcpp::int32_kt  imageIndex = -1,
dcpp::int32_kt  selectedImageIndex = -1,
void *  data = 0,
IReferenceCounted data2 = 0 
)
pure virtual

Adds a new node before the first child node.

Parameters
texttext of the new node
iconicon text of the new node
imageIndexindex of the image for the new node (-1 = none)
selectedImageIndexindex of the selected image for the new node (-1 = same as imageIndex)
datauser data (void*) of the new node
data2user data2 (IReferenceCounted*) of the new node
Returns
The new node

◆ clearChilds()

DCPP_DEPRECATED void dcpp::gui::IGUITreeViewNode::clearChilds ( )
inline

removes all children (recursive) from this node

Deprecated:
Deprecated in 1.8, use clearChildren() instead. This method may be removed by Duckcpp 1.9

◆ deleteChild()

virtual bool dcpp::gui::IGUITreeViewNode::deleteChild ( IGUITreeViewNode child)
pure virtual

Deletes a child node.

Returns
Returns true if the node was found as a child and is deleted.

◆ getFirstChild()

virtual IGUITreeViewNode * dcpp::gui::IGUITreeViewNode::getFirstChild ( ) const
pure virtual

Return the first child node from this node.

Returns
The first child node or 0 if this node has no children.

◆ getLastChild()

virtual IGUITreeViewNode * dcpp::gui::IGUITreeViewNode::getLastChild ( ) const
pure virtual

Return the last child node from this node.

Returns
The last child node or 0 if this node has no children.

◆ getLevel()

virtual dcpp::int32_kt dcpp::gui::IGUITreeViewNode::getLevel ( ) const
pure virtual

Returns the level of this node.

The root node has level 0. Direct children of the root has level 1 ...

◆ getNextSibling()

virtual IGUITreeViewNode * dcpp::gui::IGUITreeViewNode::getNextSibling ( ) const
pure virtual

Returns the next sibling node from this node.

Returns
The next sibling node from this node or 0 if this is the last node from the parent node.

◆ getNextVisible()

virtual IGUITreeViewNode * dcpp::gui::IGUITreeViewNode::getNextVisible ( ) const
pure virtual

Returns the next visible (expanded, may be out of scrolling) node from this node.

Returns
The next visible node from this node or 0 if this is the last visible node.

◆ getParent()

virtual IGUITreeViewNode * dcpp::gui::IGUITreeViewNode::getParent ( ) const
pure virtual

Returns the parent node of this node.

For the root node this will return 0.

◆ getPrevSibling()

virtual IGUITreeViewNode * dcpp::gui::IGUITreeViewNode::getPrevSibling ( ) const
pure virtual

Returns the previous sibling node from this node.

Returns
The previous sibling node from this node or 0 if this is the first node from the parent node.

◆ hasChilds()

DCPP_DEPRECATED bool dcpp::gui::IGUITreeViewNode::hasChilds ( ) const
inline

returns true if this node has child nodes

Deprecated:
Deprecated in 1.8, use hasChildren() instead. This method may be removed by Duckcpp 1.9

◆ insertChildAfter()

virtual IGUITreeViewNode * dcpp::gui::IGUITreeViewNode::insertChildAfter ( IGUITreeViewNode other,
const wchar_t *  text,
const wchar_t *  icon = 0,
dcpp::int32_kt  imageIndex = -1,
dcpp::int32_kt  selectedImageIndex = -1,
void *  data = 0,
IReferenceCounted data2 = 0 
)
pure virtual

Adds a new node behind the other node.

The other node has also to be a child node from this node.

Parameters
otherNode to insert after
texttext of the new node
iconicon text of the new node
imageIndexindex of the image for the new node (-1 = none)
selectedImageIndexindex of the selected image for the new node (-1 = same as imageIndex)
datauser data (void*) of the new node
data2user data2 (IReferenceCounted*) of the new node
Returns
The new node or 0 if other is no child node from this

◆ insertChildBefore()

virtual IGUITreeViewNode * dcpp::gui::IGUITreeViewNode::insertChildBefore ( IGUITreeViewNode other,
const wchar_t *  text,
const wchar_t *  icon = 0,
dcpp::int32_kt  imageIndex = -1,
dcpp::int32_kt  selectedImageIndex = -1,
void *  data = 0,
IReferenceCounted data2 = 0 
)
pure virtual

Adds a new node before the other node.

The other node has also to be a child node from this node.

Parameters
otherNode to insert before
texttext of the new node
iconicon text of the new node
imageIndexindex of the image for the new node (-1 = none)
selectedImageIndexindex of the selected image for the new node (-1 = same as imageIndex)
datauser data (void*) of the new node
data2user data2 (IReferenceCounted*) of the new node
Returns
The new node or 0 if other is no child node from this

◆ moveChildDown()

virtual bool dcpp::gui::IGUITreeViewNode::moveChildDown ( IGUITreeViewNode child)
pure virtual

Moves a child node one position down.

Returns
True if the node was found as a child node and was not already the last child.

◆ moveChildUp()

virtual bool dcpp::gui::IGUITreeViewNode::moveChildUp ( IGUITreeViewNode child)
pure virtual

Moves a child node one position up.

Returns
True if the node was found as a child node and was not already the first child.

The documentation for this class was generated from the following file:

Duckcpp    @cppfx.xyz