36 vector<TreeViewItem> _allItems;
37 vector<TreeViewItem> _visibleItems;
39 vector<TreeViewMenuItem> _contextMenuItems;
41 long _maxVisibleItems;
42 __int64 _firstVisibleItem;
43 __int64 _lastVisibleItem;
49 void ReloadVisibleItems();
85 long addItem(
const wstring& itemText,
const wstring& itemId = L
"",
const wstring& parentId = L
"",
const wstring& nodeType = L
"");
87 BOOL
updateItem(
const wstring& itemId,
const wstring& itemText);
91 long addPath(
const wstring& itemPath,
const wstring& parentId = L
"");
99 BOOL
getItem(
long itemIndex, wstring& itemText, wstring& itemId, wstring& parentId, wstring& itemPath);
105 long getSelectedItem(wstring& itemText, wstring& itemId, wstring& parentId, wstring& itemPath);
122 void onPageUp(BOOL shiftPressed, BOOL ctrlPressed);
125 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 onMouseReleased(WinHandle hWnd, int x, int y, BOOL shiftPressed, BOOL ctrlPressed)
Called when the mouse button is released within the component.
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 onMouseMoved(WinHandle hWnd, int x, int y, BOOL shiftPressed, BOOL ctrlPressed)
Called when the mouse is moved within the component.
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 scrollBarActivity(__int64 firstVisibleItem)
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 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:16
BOOL _isExpanded
Definition TreeView.h:19
Bounds _expandCollapseRect
Definition TreeView.h:14
BOOL _hasChildren
Definition TreeView.h:18
wstring _nodeType
Definition TreeView.h:13
wstring _text
Definition TreeView.h:12
long _indentLevel
Definition TreeView.h:17
wstring _parentId
Definition TreeView.h:10
wstring _id
Definition TreeView.h:11
Bounds _iconRect
Definition TreeView.h:15