CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FxUITreeView.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2025 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
19#include "FxUIBaseView.h"
22
26
27class CFxUIIcon;
28
29
31{
32public:
33
38 {
39 AlignLeft = 0x0001,
40 AlignRight = 0x0002,
41 AlignHCenter = 0x0004,
42 AlignTop = 0x0020,
43 AlignBottom = 0x0040,
44 AlignVCenter = 0x0080
45 };
46
56
71
83
88 NoUpdate = 0x0000,
89 Clear = 0x0001,
90 Select = 0x0002,
91 Deselect = 0x0004,
92 Rows = 0x0020,
93 Columns = 0x0040,
95 };
96
97public:
98
101
104
110 void setParentNodeIcon( const CFxUIIcon& icon );
111
117 void setChildNodeIcon( const CFxUIIcon & icon );
118
119 void setMoveCursorMode(bool bItemMode);
120
127
136
143
149 void setHeaderStretchLastSection( bool bEnable );
150
156 void setSortingEnabled( bool bEnable );
157
164
171
177 void setRootIsDecorated( bool bShow );
178
184 void setAlternatingRowColors( bool bEnable );
185
193 void setColumnWidth( int iColumn, int iWidth );
194
201
203
210
217
223 void setAutoScroll( bool bEnable );
224
231
238
246 void setColumnHidden( int iColumn, bool bHide );
247
256
261
265 void expandAll();
266
271
277 void setExpandsOnDoubleClick( bool bEnable );
278
283
288
293
297 CFxUISignal< void( int, int ) >& keyWentDown();
298
301
302 //...
303
304};
#define COMMONUI_API
CFxUISignal< void(const CFxUIModelIndex &)> & itemDoubleClicked()
void setCurrentIndex(CFxUIModelIndex index)
void selectRow(CFxUITreeView::UISelectionFlag flag, CFxUIModelIndex index)
void setSelectionMode(CFxUITreeView::UISelectionMode mode)
@ SelectColumns
This enum selects only the columns.
@ SelectRows
This enum selects only the rows.
@ SelectItems
This enum selects the single items.
CFxUISignal< void(const CFxUIModelIndex &)> & collapsed()
CFxUISignal< void(const CFxUIModelIndex &)> & itemClicked()
void setExpandsOnDoubleClick(bool bEnable)
void expandAll()
void setSelectionBehavior(CFxUITreeView::UISelectionBehavior behavior)
@ Stretch
HeaderView will automatically resize the section to fill the available space.
@ Custom
Use Fixed instead.
@ ResizeToContents
HeaderView will automatically resize the section to its optimal size based on the contents of the ent...
@ Fixed
The user cannot resize the section.
@ Interactive
The user can resize the section.
void setCollapse(CFxUIModelIndex index)
void clearSelection()
CFxUISignal< void(int, int) > & keyWentDown()
void setAlternatingRowColors(bool bEnable)
CFxUISignal< void(const CFxUIModelIndex &)> & expanded()
void setHeaderResizeSection(CFxUITreeView::UIHeaderResizeMode mode)
void setHeaderAlignment(CFxUITreeView::UIHeaderAlignment align)
void setExpand(CFxUIModelIndex index)
void setColumnWidth(int iColumn, int iWidth)
@ ContiguousSelection
If the user presses the Shift key while clicking on an item, all items between the current item and t...
@ MultiSelection
When the user selects an item in the usual way, the selection status of that item is toggled and the ...
@ NoSelection
Items cannot be selected.
@ SingleSelection
When the user selects an item, any already-selected item becomes unselected, and the user cannot unse...
CFxUIModelIndex currentIndex() const
void setParentNodeIcon(const CFxUIIcon &icon)
CFxUISignal< void(void)> & selectionChanged()
void setColumnHidden(int iColumn, bool bHide)
@ Rows
All indexes will be expanded to span rows.
@ Columns
All indexes will be expanded to span columns.
@ Clear
The complete selection will be cleared.
@ Deselect
All specified indexes will be deselected.
@ NoUpdate
No selection will be made.
@ ClearAndSelect
A combination of Clear and Select, provided for convenience.
@ Select
All specified indexes will be selected.
void setHeaderResizeSection(CFxUITreeView::UIHeaderResizeMode mode, int iColumn)
void setMoveCursorMode(bool bItemMode)
void setAutoScroll(bool bEnable)
void collapseAll()
void setChildNodeIcon(const CFxUIIcon &icon)
CFxUIAbstractItemModel * getModel()
void setRootIsDecorated(bool bShow)
void setHeaderStretchLastSection(bool bEnable)
@ AlignBottom
This enum aligns text with the bottom.
@ AlignVCenter
This enum centers vertically in the available space.
@ AlignHCenter
This enum centers horizontally in the available space.
@ AlignTop
This enum aligns text with the top.
@ AlignLeft
This enum aligns text with the left edge.
@ AlignRight
This enum aligns text with the right edge.
void setModel(CFxUIAbstractItemModel *model)
void setSortingEnabled(bool bEnable)
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)
GLuint index
Definition gles2_ext.h:265