1
0

Merging r6250 through r6254 from trunk to ogl-es branch

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6255 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2021-08-27 19:14:39 +00:00
parent 21302d038a
commit ee3579015b
275 changed files with 4166 additions and 3846 deletions

View File

@@ -1,8 +1,8 @@
// This file is part of the "Irrlicht Engine".
// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de
#ifndef __C_GUI_TREE_VIEW_H_INCLUDED__
#define __C_GUI_TREE_VIEW_H_INCLUDED__
#ifndef IRR_C_GUI_TREE_VIEW_H_INCLUDED
#define IRR_C_GUI_TREE_VIEW_H_INCLUDED
#include "IGUITreeView.h"
#include "irrList.h"
@@ -30,55 +30,55 @@ namespace gui
~CGUITreeViewNode();
//! returns the owner (tree view) of this node
virtual IGUITreeView* getOwner() const _IRR_OVERRIDE_;
virtual IGUITreeView* getOwner() const IRR_OVERRIDE;
//! Returns the parent node of this node.
virtual IGUITreeViewNode* getParent() const _IRR_OVERRIDE_;
virtual IGUITreeViewNode* getParent() const IRR_OVERRIDE;
//! returns the text of the node
virtual const wchar_t* getText() const _IRR_OVERRIDE_
virtual const wchar_t* getText() const IRR_OVERRIDE
{ return Text.c_str(); }
//! sets the text of the node
virtual void setText( const wchar_t* text ) _IRR_OVERRIDE_;
virtual void setText( const wchar_t* text ) IRR_OVERRIDE;
//! returns the icon text of the node
virtual const wchar_t* getIcon() const _IRR_OVERRIDE_
virtual const wchar_t* getIcon() const IRR_OVERRIDE
{ return Icon.c_str(); }
//! sets the icon text of the node
virtual void setIcon( const wchar_t* icon ) _IRR_OVERRIDE_;
virtual void setIcon( const wchar_t* icon ) IRR_OVERRIDE;
//! returns the image index of the node
virtual u32 getImageIndex() const _IRR_OVERRIDE_
virtual u32 getImageIndex() const IRR_OVERRIDE
{ return ImageIndex; }
//! sets the image index of the node
virtual void setImageIndex( u32 imageIndex ) _IRR_OVERRIDE_
virtual void setImageIndex( u32 imageIndex ) IRR_OVERRIDE
{ ImageIndex = imageIndex; }
//! returns the image index of the node
virtual u32 getSelectedImageIndex() const _IRR_OVERRIDE_
virtual u32 getSelectedImageIndex() const IRR_OVERRIDE
{ return SelectedImageIndex; }
//! sets the image index of the node
virtual void setSelectedImageIndex( u32 imageIndex ) _IRR_OVERRIDE_
virtual void setSelectedImageIndex( u32 imageIndex ) IRR_OVERRIDE
{ SelectedImageIndex = imageIndex; }
//! returns the user data (void*) of this node
virtual void* getData() const _IRR_OVERRIDE_
virtual void* getData() const IRR_OVERRIDE
{ return Data; }
//! sets the user data (void*) of this node
virtual void setData( void* data ) _IRR_OVERRIDE_
virtual void setData( void* data ) IRR_OVERRIDE
{ Data = data; }
//! returns the user data2 (IReferenceCounted) of this node
virtual IReferenceCounted* getData2() const _IRR_OVERRIDE_
virtual IReferenceCounted* getData2() const IRR_OVERRIDE
{ return Data2; }
//! sets the user data2 (IReferenceCounted) of this node
virtual void setData2( IReferenceCounted* data ) _IRR_OVERRIDE_
virtual void setData2( IReferenceCounted* data ) IRR_OVERRIDE
{
if( Data2 )
{
@@ -92,14 +92,14 @@ namespace gui
}
//! returns the child item count
virtual u32 getChildCount() const _IRR_OVERRIDE_
virtual u32 getChildCount() const IRR_OVERRIDE
{ return Children.getSize(); }
//! removes all children (recursive) from this node
virtual void clearChildren() _IRR_OVERRIDE_;
virtual void clearChildren() IRR_OVERRIDE;
//! returns true if this node has child nodes
virtual bool hasChildren() const _IRR_OVERRIDE_
virtual bool hasChildren() const IRR_OVERRIDE
{ return !Children.empty(); }
//! Adds a new node behind the last child node.
@@ -117,7 +117,7 @@ namespace gui
s32 imageIndex = -1,
s32 selectedImageIndex = -1,
void* data = 0,
IReferenceCounted* data2 = 0) _IRR_OVERRIDE_;
IReferenceCounted* data2 = 0) IRR_OVERRIDE;
//! Adds a new node before the first child node.
//! \param text text of the new node
@@ -134,7 +134,7 @@ namespace gui
s32 imageIndex = -1,
s32 selectedImageIndex = -1,
void* data = 0,
IReferenceCounted* data2 = 0 ) _IRR_OVERRIDE_;
IReferenceCounted* data2 = 0 ) IRR_OVERRIDE;
//! Adds a new node behind the other node.
//! The other node has also te be a child node from this node.
@@ -153,7 +153,7 @@ namespace gui
s32 imageIndex = -1,
s32 selectedImageIndex = -1,
void* data = 0,
IReferenceCounted* data2 = 0 ) _IRR_OVERRIDE_;
IReferenceCounted* data2 = 0 ) IRR_OVERRIDE;
//! Adds a new node before the other node.
//! The other node has also te be a child node from this node.
@@ -172,53 +172,53 @@ namespace gui
s32 imageIndex = -1,
s32 selectedImageIndex = -1,
void* data = 0,
IReferenceCounted* data2 = 0 ) _IRR_OVERRIDE_;
IReferenceCounted* data2 = 0 ) IRR_OVERRIDE;
//! Return the first child note from this node.
virtual IGUITreeViewNode* getFirstChild() const _IRR_OVERRIDE_;
virtual IGUITreeViewNode* getFirstChild() const IRR_OVERRIDE;
//! Return the last child note from this node.
virtual IGUITreeViewNode* getLastChild() const _IRR_OVERRIDE_;
virtual IGUITreeViewNode* getLastChild() const IRR_OVERRIDE;
//! Returns the preverse sibling node from this node.
virtual IGUITreeViewNode* getPrevSibling() const _IRR_OVERRIDE_;
virtual IGUITreeViewNode* getPrevSibling() const IRR_OVERRIDE;
//! Returns the next sibling node from this node.
virtual IGUITreeViewNode* getNextSibling() const _IRR_OVERRIDE_;
virtual IGUITreeViewNode* getNextSibling() const IRR_OVERRIDE;
//! Returns the next visible (expanded, may be out of scrolling) node from this node.
virtual IGUITreeViewNode* getNextVisible() const _IRR_OVERRIDE_;
virtual IGUITreeViewNode* getNextVisible() const IRR_OVERRIDE;
//! Deletes a child node.
virtual bool deleteChild( IGUITreeViewNode* child ) _IRR_OVERRIDE_;
virtual bool deleteChild( IGUITreeViewNode* child ) IRR_OVERRIDE;
//! Moves a child node one position up.
virtual bool moveChildUp( IGUITreeViewNode* child ) _IRR_OVERRIDE_;
virtual bool moveChildUp( IGUITreeViewNode* child ) IRR_OVERRIDE;
//! Moves a child node one position down.
virtual bool moveChildDown( IGUITreeViewNode* child ) _IRR_OVERRIDE_;
virtual bool moveChildDown( IGUITreeViewNode* child ) IRR_OVERRIDE;
//! Returns true if the node is expanded (children are visible).
virtual bool getExpanded() const _IRR_OVERRIDE_
virtual bool getExpanded() const IRR_OVERRIDE
{ return Expanded; }
//! Sets if the node is expanded.
virtual void setExpanded( bool expanded ) _IRR_OVERRIDE_;
virtual void setExpanded( bool expanded ) IRR_OVERRIDE;
//! Returns true if the node is currently selected.
virtual bool getSelected() const _IRR_OVERRIDE_;
virtual bool getSelected() const IRR_OVERRIDE;
//! Sets this node as selected.
virtual void setSelected( bool selected ) _IRR_OVERRIDE_;
virtual void setSelected( bool selected ) IRR_OVERRIDE;
//! Returns true if this node is the root node.
virtual bool isRoot() const _IRR_OVERRIDE_;
virtual bool isRoot() const IRR_OVERRIDE;
//! Returns the level of this node.
virtual s32 getLevel() const _IRR_OVERRIDE_;
virtual s32 getLevel() const IRR_OVERRIDE;
//! Returns true if this node is visible (all parents are expanded).
virtual bool isVisible() const _IRR_OVERRIDE_;
virtual bool isVisible() const IRR_OVERRIDE;
private:
@@ -250,71 +250,71 @@ namespace gui
virtual ~CGUITreeView();
//! returns the root node (not visible) from the tree.
virtual IGUITreeViewNode* getRoot() const _IRR_OVERRIDE_
virtual IGUITreeViewNode* getRoot() const IRR_OVERRIDE
{ return Root; }
//! returns the selected node of the tree or 0 if none is selected
virtual IGUITreeViewNode* getSelected() const _IRR_OVERRIDE_
virtual IGUITreeViewNode* getSelected() const IRR_OVERRIDE
{ return Selected; }
//! returns true if the tree lines are visible
virtual bool getLinesVisible() const _IRR_OVERRIDE_
virtual bool getLinesVisible() const IRR_OVERRIDE
{ return LinesVisible; }
//! sets if the tree lines are visible
virtual void setLinesVisible( bool visible ) _IRR_OVERRIDE_
virtual void setLinesVisible( bool visible ) IRR_OVERRIDE
{ LinesVisible = visible; }
//! called if an event happened.
virtual bool OnEvent( const SEvent &event ) _IRR_OVERRIDE_;
virtual bool OnEvent( const SEvent &event ) IRR_OVERRIDE;
//! draws the element and its children
virtual void draw() _IRR_OVERRIDE_;
virtual void draw() IRR_OVERRIDE;
//! Sets the font which should be used as icon font. This font is set to the Irrlicht engine
//! built-in-font by default. Icons can be displayed in front of every list item.
//! An icon is a string, displayed with the icon font. When using the build-in-font of the
//! Irrlicht engine as icon font, the icon strings defined in GUIIcons.h can be used.
virtual void setIconFont( IGUIFont* font ) _IRR_OVERRIDE_;
virtual void setIconFont( IGUIFont* font ) IRR_OVERRIDE;
//! Sets a skin independent font.
/** \param font: New font to set or 0 to use the skin-font. */
virtual void setOverrideFont(IGUIFont* font=0) _IRR_OVERRIDE_;
virtual void setOverrideFont(IGUIFont* font=0) IRR_OVERRIDE;
//! Gets the override font (if any)
/** \return The override font (may be 0) */
virtual IGUIFont* getOverrideFont(void) const _IRR_OVERRIDE_;
virtual IGUIFont* getOverrideFont(void) const IRR_OVERRIDE;
//! Get the font which is used for drawing
/** This is the override font when one is set and the
font of the skin otherwise. */
virtual IGUIFont* getActiveFont() const _IRR_OVERRIDE_;
virtual IGUIFont* getActiveFont() const IRR_OVERRIDE;
//! Sets the image list which should be used for the image and selected image of every node.
//! The default is 0 (no images).
virtual void setImageList( IGUIImageList* imageList ) _IRR_OVERRIDE_;
virtual void setImageList( IGUIImageList* imageList ) IRR_OVERRIDE;
//! Returns the image list which is used for the nodes.
virtual IGUIImageList* getImageList() const _IRR_OVERRIDE_
virtual IGUIImageList* getImageList() const IRR_OVERRIDE
{ return ImageList; }
//! Sets if the image is left of the icon. Default is true.
virtual void setImageLeftOfIcon( bool bLeftOf ) _IRR_OVERRIDE_
virtual void setImageLeftOfIcon( bool bLeftOf ) IRR_OVERRIDE
{ ImageLeftOfIcon = bLeftOf; }
//! Returns if the Image is left of the icon. Default is true.
virtual bool getImageLeftOfIcon() const _IRR_OVERRIDE_
virtual bool getImageLeftOfIcon() const IRR_OVERRIDE
{ return ImageLeftOfIcon; }
//! Returns the node which is associated to the last event.
virtual IGUITreeViewNode* getLastEventNode() const _IRR_OVERRIDE_
virtual IGUITreeViewNode* getLastEventNode() const IRR_OVERRIDE
{ return LastEventNode; }
//! Access the vertical scrollbar
virtual IGUIScrollBar* getVerticalScrollBar() const _IRR_OVERRIDE_;
virtual IGUIScrollBar* getVerticalScrollBar() const IRR_OVERRIDE;
//! Access the horizontal scrollbar
virtual IGUIScrollBar* getHorizontalScrollBar() const _IRR_OVERRIDE_;
virtual IGUIScrollBar* getHorizontalScrollBar() const IRR_OVERRIDE;
private:
//! calculates the heigth of an node and of all visible nodes.
@@ -352,4 +352,3 @@ namespace gui
} // end namespace irr
#endif