Loading...
Searching...
No Matches
IGUITreeView.h
Go to the documentation of this file.
// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_GUI_TREE_VIEW_H_INCLUDED__
#define __I_GUI_TREE_VIEW_H_INCLUDED__
#include "IGUIElement.h"
#include "IGUIImageList.h"
#include "irrTypes.h"
namespace irr
{
namespace gui
{
class IGUIFont;
class IGUITreeView;
class IGUITreeViewNode : public IReferenceCounted
{
public:
virtual IGUITreeView* getOwner() const = 0;
virtual IGUITreeViewNode* getParent() const = 0;
virtual const wchar_t* getText() const = 0;
virtual void setText( const wchar_t* text ) = 0;
virtual const wchar_t* getIcon() const = 0;
virtual void setIcon( const wchar_t* icon ) = 0;
virtual u32 getImageIndex() const = 0;
virtual void setImageIndex( u32 imageIndex ) = 0;
virtual u32 getSelectedImageIndex() const = 0;
virtual void setSelectedImageIndex( u32 imageIndex ) = 0;
virtual void* getData() const = 0;
virtual void setData( void* data ) = 0;
virtual IReferenceCounted* getData2() const = 0;
virtual void setData2( IReferenceCounted* data ) = 0;
virtual u32 getChildCount() const = 0;
virtual void clearChildren() = 0;
_IRR_DEPRECATED_ void clearChilds()
{
return clearChildren();
}
virtual bool hasChildren() const = 0;
_IRR_DEPRECATED_ bool hasChilds() const
{
return hasChildren();
}
virtual IGUITreeViewNode* addChildBack(
const wchar_t* text, const wchar_t* icon = 0,
s32 imageIndex=-1, s32 selectedImageIndex=-1,
void* data=0, IReferenceCounted* data2=0) =0;
virtual IGUITreeViewNode* addChildFront(
const wchar_t* text, const wchar_t* icon = 0,
s32 imageIndex=-1, s32 selectedImageIndex=-1,
void* data=0, IReferenceCounted* data2=0 ) =0;
virtual IGUITreeViewNode* insertChildAfter(
IGUITreeViewNode* other,
const wchar_t* text, const wchar_t* icon = 0,
s32 imageIndex=-1, s32 selectedImageIndex=-1,
void* data=0, IReferenceCounted* data2=0) =0;
virtual IGUITreeViewNode* insertChildBefore(
IGUITreeViewNode* other,
const wchar_t* text, const wchar_t* icon = 0,
s32 imageIndex=-1, s32 selectedImageIndex=-1,
void* data=0, IReferenceCounted* data2=0) = 0;
virtual IGUITreeViewNode* getFirstChild() const = 0;
virtual IGUITreeViewNode* getLastChild() const = 0;
virtual IGUITreeViewNode* getPrevSibling() const = 0;
virtual IGUITreeViewNode* getNextSibling() const = 0;
virtual IGUITreeViewNode* getNextVisible() const = 0;
virtual bool deleteChild( IGUITreeViewNode* child ) = 0;
virtual bool moveChildUp( IGUITreeViewNode* child ) = 0;
virtual bool moveChildDown( IGUITreeViewNode* child ) = 0;
virtual bool getExpanded() const = 0;
virtual void setExpanded( bool expanded ) = 0;
virtual bool getSelected() const = 0;
virtual void setSelected( bool selected ) = 0;
virtual bool isRoot() const = 0;
virtual s32 getLevel() const = 0;
virtual bool isVisible() const = 0;
};
class IGUITreeView : public IGUIElement
{
public:
IGUITreeView(IGUIEnvironment* environment, IGUIElement* parent,
s32 id, core::rect<s32> rectangle)
: IGUIElement( EGUIET_TREE_VIEW, environment, parent, id, rectangle ) {}
virtual IGUITreeViewNode* getRoot() const = 0;
virtual IGUITreeViewNode* getSelected() const = 0;
virtual bool getLinesVisible() const = 0;
virtual void setLinesVisible( bool visible ) = 0;
virtual void setIconFont( IGUIFont* font ) = 0;
virtual void setImageList( IGUIImageList* imageList ) = 0;
virtual IGUIImageList* getImageList() const = 0;
virtual void setImageLeftOfIcon( bool bLeftOf ) = 0;
virtual bool getImageLeftOfIcon() const = 0;
virtual IGUITreeViewNode* getLastEventNode() const = 0;
};
} // end namespace gui
} // end namespace irr
#endif
IGUIElement.h
IGUIImageList.h
irr::IReferenceCounted::IReferenceCounted
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:46
irr::core::rect
Rectangle template.
Definition rect.h:27
irr::gui::IGUIElement::IGUIElement
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)
Constructor.
Definition IGUIElement.h:30
irr::gui::IGUIEnvironment
GUI Environment. Used as factory and manager of all other GUI elements.
Definition IGUIEnvironment.h:71
irr::gui::IGUIFont
Font interface.
Definition IGUIFont.h:40
irr::gui::IGUIImageList
Font interface.
Definition IGUIImageList.h:18
irr::gui::IGUITreeView
Default tree view GUI element.
Definition IGUITreeView.h:226
irr::gui::IGUITreeView::setIconFont
virtual void setIconFont(IGUIFont *font)=0
Sets the font which should be used as icon font.
irr::gui::IGUITreeView::getLastEventNode
virtual IGUITreeViewNode * getLastEventNode() const =0
Returns the node which is associated to the last event.
irr::gui::IGUITreeView::getImageLeftOfIcon
virtual bool getImageLeftOfIcon() const =0
Returns if the Image is left of the icon. Default is true.
irr::gui::IGUITreeView::IGUITreeView
IGUITreeView(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
constructor
Definition IGUITreeView.h:229
irr::gui::IGUITreeView::getLinesVisible
virtual bool getLinesVisible() const =0
returns true if the tree lines are visible
irr::gui::IGUITreeView::setLinesVisible
virtual void setLinesVisible(bool visible)=0
sets if the tree lines are visible
irr::gui::IGUITreeView::getImageList
virtual IGUIImageList * getImageList() const =0
Returns the image list which is used for the nodes.
irr::gui::IGUITreeView::setImageList
virtual void setImageList(IGUIImageList *imageList)=0
Sets the image list which should be used for the image and selected image of every node.
irr::gui::IGUITreeView::getRoot
virtual IGUITreeViewNode * getRoot() const =0
returns the root node (not visible) from the tree.
irr::gui::IGUITreeView::getSelected
virtual IGUITreeViewNode * getSelected() const =0
returns the selected node of the tree or 0 if none is selected
irr::gui::IGUITreeView::setImageLeftOfIcon
virtual void setImageLeftOfIcon(bool bLeftOf)=0
Sets if the image is left of the icon. Default is true.
irr::gui::IGUITreeViewNode
Node for gui tree view.
Definition IGUITreeView.h:28
irr::gui::IGUITreeViewNode::clearChildren
virtual void clearChildren()=0
removes all children (recursive) from this node
irr::gui::IGUITreeViewNode::setIcon
virtual void setIcon(const wchar_t *icon)=0
sets the icon text of the node
irr::gui::IGUITreeViewNode::getExpanded
virtual bool getExpanded() const =0
Returns true if the node is expanded (children are visible).
irr::gui::IGUITreeViewNode::setExpanded
virtual void setExpanded(bool expanded)=0
Sets if the node is expanded.
irr::gui::IGUITreeViewNode::setSelectedImageIndex
virtual void setSelectedImageIndex(u32 imageIndex)=0
sets the image index of the node
irr::gui::IGUITreeViewNode::deleteChild
virtual bool deleteChild(IGUITreeViewNode *child)=0
Deletes a child node.
irr::gui::IGUITreeViewNode::setData
virtual void setData(void *data)=0
sets the user data (void*) of this node
irr::gui::IGUITreeViewNode::getImageIndex
virtual u32 getImageIndex() const =0
returns the image index of the node
irr::gui::IGUITreeViewNode::moveChildDown
virtual bool moveChildDown(IGUITreeViewNode *child)=0
Moves a child node one position down.
irr::gui::IGUITreeViewNode::getPrevSibling
virtual IGUITreeViewNode * getPrevSibling() const =0
Returns the previous sibling node from this node.
irr::gui::IGUITreeViewNode::getData2
virtual IReferenceCounted * getData2() const =0
returns the user data2 (IReferenceCounted) of this node
irr::gui::IGUITreeViewNode::addChildFront
virtual IGUITreeViewNode * addChildFront(const wchar_t *text, const wchar_t *icon=0, s32 imageIndex=-1, s32 selectedImageIndex=-1, void *data=0, IReferenceCounted *data2=0)=0
Adds a new node before the first child node.
irr::gui::IGUITreeViewNode::getOwner
virtual IGUITreeView * getOwner() const =0
returns the owner (tree view) of this node
irr::gui::IGUITreeViewNode::setText
virtual void setText(const wchar_t *text)=0
sets the text of the node
irr::gui::IGUITreeViewNode::hasChildren
virtual bool hasChildren() const =0
returns true if this node has child nodes
irr::gui::IGUITreeViewNode::getText
virtual const wchar_t * getText() const =0
returns the text of the node
irr::gui::IGUITreeViewNode::clearChilds
_IRR_DEPRECATED_ void clearChilds()
removes all children (recursive) from this node
Definition IGUITreeView.h:82
irr::gui::IGUITreeViewNode::getParent
virtual IGUITreeViewNode * getParent() const =0
Returns the parent node of this node.
irr::gui::IGUITreeViewNode::getSelectedImageIndex
virtual u32 getSelectedImageIndex() const =0
returns the image index of the node
irr::gui::IGUITreeViewNode::getLastChild
virtual IGUITreeViewNode * getLastChild() const =0
Return the last child node from this node.
irr::gui::IGUITreeViewNode::insertChildBefore
virtual IGUITreeViewNode * insertChildBefore(IGUITreeViewNode *other, const wchar_t *text, const wchar_t *icon=0, s32 imageIndex=-1, s32 selectedImageIndex=-1, void *data=0, IReferenceCounted *data2=0)=0
Adds a new node before the other node.
irr::gui::IGUITreeViewNode::hasChilds
_IRR_DEPRECATED_ bool hasChilds() const
returns true if this node has child nodes
Definition IGUITreeView.h:93
irr::gui::IGUITreeViewNode::setImageIndex
virtual void setImageIndex(u32 imageIndex)=0
sets the image index of the node
irr::gui::IGUITreeViewNode::getNextSibling
virtual IGUITreeViewNode * getNextSibling() const =0
Returns the next sibling node from this node.
irr::gui::IGUITreeViewNode::isVisible
virtual bool isVisible() const =0
Returns true if this node is visible (all parents are expanded).
irr::gui::IGUITreeViewNode::getChildCount
virtual u32 getChildCount() const =0
returns the child item count
irr::gui::IGUITreeViewNode::isRoot
virtual bool isRoot() const =0
Returns true if this node is the root node.
irr::gui::IGUITreeViewNode::insertChildAfter
virtual IGUITreeViewNode * insertChildAfter(IGUITreeViewNode *other, const wchar_t *text, const wchar_t *icon=0, s32 imageIndex=-1, s32 selectedImageIndex=-1, void *data=0, IReferenceCounted *data2=0)=0
Adds a new node behind the other node.
irr::gui::IGUITreeViewNode::moveChildUp
virtual bool moveChildUp(IGUITreeViewNode *child)=0
Moves a child node one position up.
irr::gui::IGUITreeViewNode::getSelected
virtual bool getSelected() const =0
Returns true if the node is currently selected.
irr::gui::IGUITreeViewNode::getLevel
virtual s32 getLevel() const =0
Returns the level of this node.
irr::gui::IGUITreeViewNode::getIcon
virtual const wchar_t * getIcon() const =0
returns the icon text of the node
irr::gui::IGUITreeViewNode::setData2
virtual void setData2(IReferenceCounted *data)=0
sets the user data2 (IReferenceCounted) of this node
irr::gui::IGUITreeViewNode::setSelected
virtual void setSelected(bool selected)=0
Sets this node as selected.
irr::gui::IGUITreeViewNode::getData
virtual void * getData() const =0
returns the user data (void*) of this node
irr::gui::IGUITreeViewNode::addChildBack
virtual IGUITreeViewNode * addChildBack(const wchar_t *text, const wchar_t *icon=0, s32 imageIndex=-1, s32 selectedImageIndex=-1, void *data=0, IReferenceCounted *data2=0)=0
Adds a new node behind the last child node.
irr::gui::IGUITreeViewNode::getFirstChild
virtual IGUITreeViewNode * getFirstChild() const =0
Return the first child node from this node.
irr::gui::IGUITreeViewNode::getNextVisible
virtual IGUITreeViewNode * getNextVisible() const =0
Returns the next visible (expanded, may be out of scrolling) node from this node.
irrTypes.h
_IRR_DEPRECATED_
#define _IRR_DEPRECATED_
Defines a deprecated macro which generates a warning at compile time.
Definition irrTypes.h:195
irr::gui
The gui namespace contains useful classes for easy creation of a graphical user interface.
Definition EGUIAlignment.h:11
irr::gui::EGUIET_TREE_VIEW
@ EGUIET_TREE_VIEW
A Tree View.
Definition EGUIElementTypes.h:83
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::u32
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
irr::s32
signed int s32
32 bit signed variable.
Definition irrTypes.h:66
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0