TreeViewCustomGui Class Reference

#include <customgui_listview.h>

Inheritance diagram for TreeViewCustomGui:

详细描述

The tree view custom GUI ( CUSTOMGUI_TREEVIEW ) is a very versatile list view interface.
Here are the settings: TREEVIEW_CUSTOMGUISETTINGS

公共成员函数

Bool   SetRoot (void *root, TreeViewFunctions *functions, void *userdata)
Bool   SetLayout ( Int32 columns, const BaseContainer &data)
Bool   SetHeaderText ( Int32 lColumnID, const maxon::String &str)
GeUserArea GetTreeViewArea ()
GeUserArea GetHeaderArea ()
void  Refresh ()
Int32   GetAutoColumnWidth ( Int32 lColID)
Int32   GetColumnWidthUser ( Int32 lColID)
Int32   GetRealColumnWidth ( Int32 lColID)
Bool   SetColumnWidthUser ( Int32 lColID, Int32 lWidth)
Bool   MakeVisible (void *pObj)
Bool   ShowObject (void *pObj)
Bool   GetCellPosition (void *pObj, Int32 lColID, GeUserArea *&pArea, Int32 &x, Int32 &y, Int32 &w, Int32 &h, Int32 &lTextOffset)
Bool   GetVisibleScrollArea ( Int32 &x1, Int32 &y1, Int32 &x2, Int32 &y2)
Int32   GetVisibleLineCount ()
Bool   IsFocusItem (void *pObj)
void *  GetFocusItem ()
void  SetFocusItem (void *pItem)
const BaseContainer GetLayout ()
void *  GetObject ( Int32 line, Int32 *level)
void *  GetSelectionItem ()
void  SetSelectionItem (void *pItem)
Bool   SetVisibleScrollArea ( Int32 x1, Int32 y1, Int32 x2, Int32 y2)
void  SetShowLines ( Bool show)
Bool   GetShowLines () const
-  Public Member Functions inherited from BaseCustomGui< 1000475 >
Int32   GetWidth ()
Int32   GetHeight ()
void  Redraw ()
Bool   LayoutChanged ()
Bool   激活 ()
Bool   SetDefaultForResEdit ()
Bool   SetData (const TriState < GeData > &tristate)
TriState < GeData GetData ()
void  SetLayoutMode ( Int32 mode)
Int32   GetLayoutMode ()
Bool   SupportLayoutSwitch ()
-  Public Member Functions inherited from _BaseCustomGui
Int32   GetWidth ( Int32 plugid)
Int32   GetHeight ( Int32 plugid)
void  Redraw ( Int32 plugid)
Bool   LayoutChanged ( Int32 plugid)
Bool   激活 ( Int32 plugid)
Bool   SetDefaultForResEdit ( Int32 plugid)
Bool   SetData ( Int32 plugid, const TriState < GeData > &tristate)
TriState < GeData GetData ( Int32 plugid)
void  SetLayoutMode ( Int32 plugid, Int32 mode)
Int32   GetLayoutMode ( Int32 plugid)
Bool   SupportLayoutSwitch ( Int32 plugid)

私有成员函数

  TreeViewCustomGui ()
  ~TreeViewCustomGui ()

构造函数 & 析构函数文档编制

◆  TreeViewCustomGui()

TreeViewCustomGui () private

◆  ~TreeViewCustomGui()

~ TreeViewCustomGui () private

成员函数文档编制

◆  SetRoot()

Bool SetRoot ( void *  root ,
TreeViewFunctions 函数 ,
void *  userdata  
)

Initializes the tree.

参数
[in] root The root object. The caller owns the pointed object.
[in] 函数 The tree view functions. The caller owns the pointed object.
[in] userdata The user data. The caller owns the pointed object.
返回
true if successful, otherwise false .

◆  SetLayout()

Bool SetLayout ( Int32   columns ,
const BaseContainer data  
)

Sets the layout of the tree view.

参数
[in] columns The number of columns.
[in] data The layout container, with one column type entry for each column: LV_COLUMN
返回
true if successful, otherwise false .

◆  SetHeaderText()

Bool SetHeaderText ( Int32   lColumnID ,
const maxon::String str  
)

Sets the header text for a column.

参数
[in] lColumnID The column index.
[in] str The header text.
返回
true if successful, otherwise false .

◆  GetTreeViewArea()

GeUserArea * GetTreeViewArea ( )

Gets the tree view user area.

返回
The tree view user area. The tree view owns the pointed user area.

◆  GetHeaderArea()

GeUserArea * GetHeaderArea ( )

Gets the header user area.

返回
The header user area. The tree view owns the pointed user area.

◆  Refresh()

void Refresh ( )

Refreshes the tree view.

◆  GetAutoColumnWidth()

Int32 GetAutoColumnWidth ( Int32   lColID )

Gets the auto-width of the column.

参数
[in] lColID The column index.
返回
The column auto width.

◆  GetColumnWidthUser()

Int32 GetColumnWidthUser ( Int32   lColID )

Gets the size of the column the user has set.

参数
[in] lColID The column index.
返回
The column user width.

◆  GetRealColumnWidth()

Int32 GetRealColumnWidth ( Int32   lColID )

Gets the real column width.

参数
[in] lColID The column index.
返回
The real column width.

◆  SetColumnWidthUser()

Bool SetColumnWidthUser ( Int32   lColID ,
Int32   lWidth  
)

Sets the user column width.

参数
[in] lColID The column index.
[in] lWidth The column width to set.
返回
true if successful, otherwise false .

◆  MakeVisible()

Bool MakeVisible ( void *  pObj )

Scrolls to pObj and expands the tree if necessary.

参数
[in] pObj The object to scroll to.
返回
true if successful, otherwise false .

◆  ShowObject()

Bool ShowObject ( void *  pObj )

Expands the tree to pObj .

参数
[in] pObj The object to show.
返回
true if successful, otherwise false .

◆  GetCellPosition()

Bool GetCellPosition ( void *  pObj ,
Int32   lColID ,
GeUserArea *&  pArea ,
Int32 x ,
Int32 y ,
Int32 w ,
Int32 h ,
Int32 lTextOffset  
)

Gets the cell position of pObj .

参数
[in] pObj The object to get the cell position for.
[in] lColID The column index.
[out] pArea Assigned the user area pointer.
[out] x Assigned the left X coordinate.
[out] y Assigned the left Y coordinate.
[out] w Assigned the width.
[out] h Assigned the height.
[out] lTextOffset Assigned the text offset.
返回
true if successful, otherwise false .

◆  GetVisibleScrollArea()

Bool GetVisibleScrollArea ( Int32 x1 ,
Int32 y1 ,
Int32 x2 ,
Int32 y2  
)

Queries the internal scroll group for its currently visible region, a rectangle between ( x1 , y1 ) and ( x2 , y2 ).

由于
R17.032
参数
[out] x1 Assigned the X coordinate of the top left visible corner.
[out] y1 Assigned the Y coordinate of the top left visible corner.
[out] x2 Assigned the X coordinate of the bottom right visible corner.
[out] y2 Assigned the Y coordinate of the bottom right visible corner.
返回
true if the visible area could be retrieved, otherwise false .

◆  GetVisibleLineCount()

Int32 GetVisibleLineCount ( )

Gets the number of currently visible lines related to folded and unfolded items of the tree.

由于
R17.032
返回
The number of visible lines.

◆  IsFocusItem()

Bool IsFocusItem ( void *  pObj )

Checks if pObj is the focus item.

参数
[in] pObj The object to check.
返回
true if pObj is the focus item, otherwise false .

◆  GetFocusItem()

void* GetFocusItem ( )

Retrieves the focus item.

返回
The focus item.

◆  SetFocusItem()

void SetFocusItem ( void *  pItem )

Sets the focus item.

参数
[in] pItem The new focus item.

◆  GetLayout()

const BaseContainer * GetLayout ( )

Retrieves the layout container of the tree view.

返回
The container of the tree view layout. Basically the same container passed in SetLayout() but reflecting any change of the column order.

◆  GetObject()

void* GetObject ( Int32   line ,
Int32 level  
)

Gets the object for a line in the tree view.

参数
[in] line The line in the tree view.
[out] level Assigned the hierarchy level of the tree.
返回
The object, or nullptr if there is no object.

◆  GetSelectionItem()

void* GetSelectionItem ( )

Retrieves the selected item.

返回
The selected item.

◆  SetSelectionItem()

void SetSelectionItem ( void *  pItem )

Sets the selected item.

参数
[in] pItem The new selected item.

◆  SetVisibleScrollArea()

Bool SetVisibleScrollArea ( Int32   x1 ,
Int32   y1 ,
Int32   x2 ,
Int32   y2  
)

Sets the internal scroll group currently visible region, a rectangle between ( x1 , y1 ) and ( x2 , y2 ).

由于
R18
参数
[in] x1 The left x value.
[in] y1 The top y value.
[in] x2 The right x value.
[in] y2 The bottom y value.
返回
true if it succeeds, false if it fails.

◆  SetShowLines()

void SetShowLines ( Bool   show )

Shows/hides the hierarchical tree lines.

参数
[in] show Set to true to show the lines, to false to hide them.

◆  GetShowLines()

Bool GetShowLines ( ) const

Shows/hides the tree hierarchical lines.

返回
True if lines are visible, false if are hidden.