33 vector<TreeViewItem> _allItems;
34 vector<TreeViewItem> _visibleItems;
36 vector<TreeViewMenuItem> _contextMenuItems;
38 long _maxVisibleItems;
39 long _firstVisibleItem;
40 long _lastVisibleItem;
46 void ReloadVisibleItems();
82 long addItem(
const wstring& itemText,
const wstring& itemId = L
"",
const wstring& parentId = L
"",
const wstring& nodeType = L
"");
84 BOOL
updateItem(
const wstring& itemId,
const wstring& itemText);
88 long addPath(
const wstring& itemPath,
const wstring& parentId = L
"");
96 BOOL
getItem(
long itemIndex, wstring& itemText, wstring& itemId, wstring& parentId, wstring& itemPath);
102 long getSelectedItem(wstring& itemText, wstring& itemId, wstring& parentId, wstring& itemPath);
119 void onPageUp(BOOL shiftPressed, BOOL ctrlPressed);
122 void onKeyEnd(BOOL shiftPressed, BOOL ctrlPressed);
HWND WinHandle
Definition Common.h:16
Definition EventListeners.h:46
Component()
Constructs a new Component instance.
Definition Graphics.h:171
Definition EventListeners.h:31
void setTitle(const wstring &title)
Sets the title of the TreeView.
void clear()
Clears all items from the TreeView.
void setScrollbarTopOffset(__int64 firstVisibleRow)
Sets the scroll position based on the top visible row index.
void addContextMenuItem(long actionId, const wstring &text, const wstring &nodeType=L"")
Adds an item to the context menu.
void onKeyHome(BOOL shiftPressed, BOOL ctrlPressed)
void onPaint(Graphics *g)
Called to paint the component's client area.
BOOL updateItem(const wstring &itemId, const wstring &itemText)
void onMousePressed(WinHandle hWnd, int x, int y, int clickCount, BOOL shiftPressed, BOOL ctrlPressed)
Called when the mouse is pressed within the component.
void windowCreated()
Abstract method called after the window has been created.
long getItemCount()
Gets the total count of items in the TreeView.
void addActionListener(ActionListener *l)
Adds an action listener to respond to user interactions.
void onPageUp(BOOL shiftPressed, BOOL ctrlPressed)
BOOL deleteItem(const wstring &itemId)
void onKeyEnd(BOOL shiftPressed, BOOL ctrlPressed)
void onWindowResized()
Called when the component's window is resized.
void addSelectionChangedListener(SelectionChangeListener *l)
Adds a listener for selection changes.
void onPageDown(BOOL shiftPressed, BOOL ctrlPressed)
void onMouseRightClicked(WinHandle hWnd, int x, int y, BOOL shiftPressed, BOOL ctrlPressed)
Called when the right mouse button is clicked within the component.
void onArrowUp(BOOL shiftPressed, BOOL ctrlPressed)
long addPath(const wstring &itemPath, const wstring &parentId=L"")
void onArrowDown(BOOL shiftPressed, BOOL ctrlPressed)
long addItem(const wstring &itemText, const wstring &itemId=L"", const wstring &parentId=L"", const wstring &nodeType=L"")
Adds a new item to the TreeView.
BOOL getItem(long itemIndex, wstring &itemText, wstring &itemId, wstring &parentId, wstring &itemPath)
TreeView()
Constructs a new TreeView object.
BOOL getScrollingInfo(__int64 &scrollMin, __int64 &scrollMax, __int64 &pageSize)
Provides information for scrollbar rendering.
BOOL onMouseWheel(WinHandle hWnd, int x, int y, int delta)
Called when the mouse wheel is used over the component.
BOOL getCreateWindowOptions(wstring &title, UINT &widownStyles, wstring &wndClassName, BOOL &isCustomWndProc)
Abstract method to get window creation options.
virtual ~TreeView()
Destructor.
long getSelectedItem(wstring &itemText, wstring &itemId, wstring &parentId, wstring &itemPath)
Gets the index of the currently selected item.
Bounds _textRect
Definition TreeView.h:15
BOOL _isExpanded
Definition TreeView.h:18
Bounds _expandCollapseRect
Definition TreeView.h:13
BOOL _hasChildren
Definition TreeView.h:17
wstring _nodeType
Definition TreeView.h:12
wstring _text
Definition TreeView.h:11
long _indentLevel
Definition TreeView.h:16
wstring _parentId
Definition TreeView.h:9
wstring _id
Definition TreeView.h:10
Bounds _iconRect
Definition TreeView.h:14