TreeWidgetBase

Abstract tree widget

class TreeWidgetBase : ScrollWidget , OnTreeContentChangeListener , OnTreeStateChangeListener , OnTreeSelectionChangeListener , OnTreeExpandedStateListener , OnKeyHandler {}

Constructors

this
this()

empty parameter list constructor - for usage by factory

this
this(string ID, ScrollBarMode hscrollbarMode, ScrollBarMode vscrollbarMode)

create with ID parameter

Destructor

~this
~this()
Undocumented in source.

Members

Functions

addWidgets
void addWidgets(TreeItem item)
Undocumented in source. Be warned that the author may not have intended to support it.
clearAllItems
void clearAllItems()
Undocumented in source. Be warned that the author may not have intended to support it.
clearSelection
void clearSelection()
Undocumented in source. Be warned that the author may not have intended to support it.
createItemWidget
Widget createItemWidget(TreeItem item)

Override to use custom tree item widgets.

findItemById
TreeItem findItemById(string id)

returns item by id, null if not found

findItemWidget
TreeItemWidget findItemWidget(TreeItem item)
Undocumented in source. Be warned that the author may not have intended to support it.
fullContentSize
Point fullContentSize()

calculate full content size in pixels

handleAction
bool handleAction(Action a)
Undocumented in source. Be warned that the author may not have intended to support it.
layout
void layout(Rect rc)

Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

makeItemVisible
void makeItemVisible(TreeItem item)
Undocumented in source. Be warned that the author may not have intended to support it.
measure
void measure(int parentWidth, int parentHeight)

Measure widget according to desired width and height constraints. (Step 1 of two phase layout).

minimumVisibleContentSize
Point minimumVisibleContentSize()
Undocumented in source. Be warned that the author may not have intended to support it.
onKey
bool onKey(Widget source, KeyEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onTreeContentChange
void onTreeContentChange(TreeItems source)

listener

onTreeExpandedStateChange
void onTreeExpandedStateChange(TreeItems source, TreeItem item)
Undocumented in source. Be warned that the author may not have intended to support it.
onTreeItemPopupMenu
MenuItem onTreeItemPopupMenu(TreeItems source, TreeItem selectedItem)
Undocumented in source. Be warned that the author may not have intended to support it.
onTreeItemSelected
void onTreeItemSelected(TreeItems source, TreeItem selectedItem, bool activated)
Undocumented in source. Be warned that the author may not have intended to support it.
onTreeStateChange
void onTreeStateChange(TreeItems source)
Undocumented in source. Be warned that the author may not have intended to support it.
selectItem
void selectItem(TreeItem item, bool makeVisible)
Undocumented in source. Be warned that the author may not have intended to support it.
selectItem
void selectItem(string itemId, bool makeVisible)
Undocumented in source. Be warned that the author may not have intended to support it.
updateWidgetStates
void updateWidgetStates()
Undocumented in source. Be warned that the author may not have intended to support it.
updateWidgets
void updateWidgets()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

items
TreeItems items [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
noCollapseForSingleTopLevelItem
bool noCollapseForSingleTopLevelItem [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
noCollapseForSingleTopLevelItem
bool noCollapseForSingleTopLevelItem [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_needUpdateWidgetStates
bool _needUpdateWidgetStates;
Undocumented in source.
_needUpdateWidgets
bool _needUpdateWidgets;
Undocumented in source.
_noCollapseForSingleTopLevelItem
bool _noCollapseForSingleTopLevelItem;
Undocumented in source.
_tree
TreeItems _tree;
Undocumented in source.
expandedChange
Signal!OnTreeExpandedStateListener expandedChange;
Undocumented in source.
popupMenu
Listener!OnTreePopupMenuListener popupMenu;

allows to provide individual popup menu for items

selectionChange
Signal!OnTreeSelectionChangeListener selectionChange;
Undocumented in source.

Inherited Members

From ScrollWidget

_contentWidget
Widget _contentWidget;
Undocumented in source.
contentWidget
Widget contentWidget [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
contentWidget
Widget contentWidget [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
fullContentSize
Point fullContentSize()

calculate full content size in pixels

updateScrollBars
void updateScrollBars()

update scrollbar positions

drawClient
void drawClient(DrawBuf buf)
Undocumented in source. Be warned that the author may not have intended to support it.
scrollPos
Point scrollPos [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
scrollTo
void scrollTo(int x, int y)
Undocumented in source. Be warned that the author may not have intended to support it.
onHScroll
bool onHScroll(ScrollEvent event)

process horizontal scrollbar event

onVScroll
bool onVScroll(ScrollEvent event)

process vertical scrollbar event

makeWidgetVisible
void makeWidgetVisible(Widget widget, bool alignHorizontally, bool alignVertically)
Undocumented in source. Be warned that the author may not have intended to support it.

From OnTreeContentChangeListener

onTreeContentChange
void onTreeContentChange(TreeItems source)
Undocumented in source.

From OnTreeStateChangeListener

onTreeStateChange
void onTreeStateChange(TreeItems source)
Undocumented in source.

From OnTreeSelectionChangeListener

onTreeItemSelected
void onTreeItemSelected(TreeItems source, TreeItem selectedItem, bool activated)
Undocumented in source.

From OnTreeExpandedStateListener

onTreeExpandedStateChange
void onTreeExpandedStateChange(TreeItems source, TreeItem item)
Undocumented in source.

From OnKeyHandler

onKey
bool onKey(Widget source, KeyEvent event)
Undocumented in source.

Meta