#include <customgui_listview.h>
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 |
|
Bool | GetLineAndColumnHit (Int32 screenX, Int32 screenY, Int32 &lineHit, Int32 &columnHit) |
|
Int32 | GetWidth () |
|
Int32 | GetHeight () |
|
void | Redraw () |
|
Bool | LayoutChanged () |
|
Bool | Activate () |
|
Bool | SetDefaultForResEdit () |
|
Bool | SetData (const TriState< GeData > &tristate) |
|
TriState< GeData > | GetData () |
|
void | SetLayoutMode (Int32 mode) |
|
Int32 | GetLayoutMode () |
|
Bool | SupportLayoutSwitch () |
|
Int32 | GetWidth (Int32 plugid) |
|
Int32 | GetHeight (Int32 plugid) |
|
void | Redraw (Int32 plugid) |
|
Bool | LayoutChanged (Int32 plugid) |
|
Bool | Activate (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()
◆ SetRoot()
Initializes the tree.
- Parameters
-
[in] | root | The root object. The caller owns the pointed object. |
[in] | functions | The tree view functions. The caller owns the pointed object. |
[in] | userdata | The user data. The caller owns the pointed object. |
- Returns
- true if successful, otherwise false.
◆ SetLayout()
Sets the layout of the tree view.
- Parameters
-
[in] | columns | The number of columns. |
[in] | data | The layout container, with one column type entry for each column: LV_COLUMN |
- Returns
- true if successful, otherwise false.
◆ SetHeaderText()
Sets the header text for a column.
- Parameters
-
[in] | lColumnID | The column index. |
[in] | str | The header text. |
- Returns
- true if successful, otherwise false.
◆ GetTreeViewArea()
Gets the tree view user area.
- Returns
- The tree view user area. The tree view owns the pointed user area.
◆ GetHeaderArea()
Gets the header user area.
- Returns
- The header user area. The tree view owns the pointed user area.
◆ Refresh()
◆ GetAutoColumnWidth()
Gets the auto-width of the column.
- Parameters
-
[in] | lColID | The column index. |
- Returns
- The column auto width.
◆ GetColumnWidthUser()
Gets the size of the column the user has set.
- Parameters
-
[in] | lColID | The column index. |
- Returns
- The column user width.
◆ GetRealColumnWidth()
Gets the real column width.
- Parameters
-
[in] | lColID | The column index. |
- Returns
- The real column width.
◆ SetColumnWidthUser()
Sets the user column width.
- Parameters
-
[in] | lColID | The column index. |
[in] | lWidth | The column width to set. |
- Returns
- true if successful, otherwise false.
◆ MakeVisible()
Bool MakeVisible |
( |
void * |
pObj | ) |
|
Scrolls to pObj and expands the tree if necessary.
- Parameters
-
[in] | pObj | The object to scroll to. |
- Returns
- true if successful, otherwise false.
◆ ShowObject()
Bool ShowObject |
( |
void * |
pObj | ) |
|
Expands the tree to pObj.
- Parameters
-
[in] | pObj | The object to show. |
- Returns
- true if successful, otherwise false.
◆ GetCellPosition()
Gets the cell position of pObj.
- Parameters
-
[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. |
- Returns
- true if successful, otherwise false.
◆ GetVisibleScrollArea()
Queries the internal scroll group for its currently visible region, a rectangle between (x1,y1) and (x2,y2).
- Since
- R17.032
- Parameters
-
[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. |
- Returns
- 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.
- Since
- R17.032
- Returns
- The number of visible lines.
◆ IsFocusItem()
Bool IsFocusItem |
( |
void * |
pObj | ) |
|
Checks if pObj is the focus item.
- Parameters
-
[in] | pObj | The object to check. |
- Returns
- true if pObj is the focus item, otherwise false.
◆ GetFocusItem()
Retrieves the focus item.
- Returns
- The focus item.
◆ SetFocusItem()
void SetFocusItem |
( |
void * |
pItem | ) |
|
Sets the focus item.
- Parameters
-
[in] | pItem | The new focus item. |
◆ GetLayout()
Retrieves the layout container of the tree view.
- Returns
- The container of the tree view layout. Basically the same container passed in SetLayout() but reflecting any change of the column order.
◆ GetObject()
Gets the object for a line in the tree view.
- Parameters
-
[in] | line | The line in the tree view. |
[out] | level | Assigned the hierarchy level of the tree. |
- Returns
- The object, or nullptr if there is no object.
◆ GetSelectionItem()
void* GetSelectionItem |
( |
| ) |
|
Retrieves the selected item.
- Returns
- The selected item.
◆ SetSelectionItem()
void SetSelectionItem |
( |
void * |
pItem | ) |
|
Sets the selected item.
- Parameters
-
[in] | pItem | The new selected item. |
◆ SetVisibleScrollArea()
Sets the internal scroll group currently visible region, a rectangle between (x1,y1) and (x2,y2).
- Since
- R18
- Parameters
-
[in] | x1 | The left x value. |
[in] | y1 | The top y value. |
[in] | x2 | The right x value. |
[in] | y2 | The bottom y value. |
- Returns
- true if it succeeds, false if it fails.
◆ SetShowLines()
void SetShowLines |
( |
Bool |
show | ) |
|
Shows/hides the hierarchical tree lines.
- Parameters
-
[in] | show | Set to true to show the lines, to false to hide them. |
◆ GetShowLines()
Bool GetShowLines |
( |
| ) |
const |
Shows/hides the tree hierarchical lines.
- Returns
- true if lines are visible, false if are hidden.
◆ GetLineAndColumnHit()
Gets the line and column hit at coordinates. Input coordinates must be on screen space.
- Parameters
-
[in] | screenX | The x coordinate in screen space. |
[in] | screenY | The y coordinate in screen space. |
[in] | lineHit | The line hit. |
[in] | columnHit | The column hit. |
- Returns
- true if a valid element is hit, otherwise false.