Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
|
Hierarchical column view widget, much like a list view but allowing for entries with multiple columns presented in a hierarchical fashion. More...
#include <hdicoreHierarchicalColumnView.h>
Public Types | |
typedef std::vector< TreeColumnEntry > | EntryVector |
typedef std::vector< std::string > | ColumnNameVector |
typedef std::vector< double > | ColumnWidthVector |
typedef std::vector< int32_t > | IndexVector |
typedef std::vector< std::string > | IDVector |
typedef std::vector< std::string > | ValueVector |
Public Types inherited from hdi::core::Widget | |
enum | Type { UnknownType = 0 , BoxType = 10 , ButtonType = 20 , CheckboxType = 30 , ColumnViewType = 40 , ComboBoxType = 50 , ColorWellType = 60 , CustomType = 70 , DividerType = 80 , HierarchicalColumnViewType = 85 , HierarchicalViewType = 90 , LabelType = 100 , ListViewType = 110 , PopupMenuType = 120 , RadioButtonType = 130 , SliderType = 140 , StepperType = 150 , TextFieldType = 160 , TextViewType = 170 , WebViewType = 180 } |
Supported widget types. | |
Public Member Functions | |
HierarchicalColumnView () | |
Constructs an empty HierarchicalColumnView object. | |
HierarchicalColumnView (const HierarchicalColumnView &hcView_) | |
Constructs a new HierarchicalColumnView object from an existing HierarchicalColumnView object (copy constructor) | |
HierarchicalColumnView (const Rect &frame_, const uint16_t numCols_) | |
Constructs a hierarchical column view with a frame only, no contents. | |
HierarchicalColumnView (const Rect &frame_, const ColumnNameVector &colNames_) | |
Constructs a hierarchical column view with a frame only, no contents. | |
HierarchicalColumnView (const Rect &frame_, const uint16_t numCols_, const EntryVector &entries_, const IndexVector &indexPath_) | |
Constructs a hierarchical column view. | |
HierarchicalColumnView (const Rect &frame_, const ColumnNameVector &colNames_, const EntryVector &entries_, const IndexVector &indexPath_) | |
Constructs a hierarchical column view. | |
HierarchicalColumnView (const Rect &frame_, const uint16_t numCols_, const EntryVector &entries_, const IDVector &idPath_) | |
Constructor for a hierarchical column view with an initial ID selected. | |
HierarchicalColumnView (const Rect &frame_, const ColumnNameVector &colNames_, const EntryVector &entries_, const IDVector &idPath_) | |
Constructor for a hierarchical column view with an initial ID selected. | |
virtual HierarchicalColumnView & | operator= (const HierarchicalColumnView &rhs_) |
Allows one HierarchicalColumnView object to be assigned from another. | |
virtual | ~HierarchicalColumnView () |
HierarchicalColumnView destructor. | |
virtual HierarchicalColumnView * | clone () const |
Convenience method to clone a HierarchicalColumnView object on the heap. | |
virtual HierarchicalColumnView * | duplicate () const |
Convenience method to duplicate a HierarchicalColumnView object, creating a new and identical UI element to the target (but not belonging to the same containing window) | |
virtual void | deselectAll () |
Deselects all currently selected entries in the list. | |
virtual std::string | text () const |
Gets the current text value of the list. | |
virtual void | setText (const std::string &) |
Does nothing. | |
virtual IndexVector | currentIndexPath () const |
Gets the index path of the currently selected entry. | |
virtual bool | setCurrentIndexPath (const IndexVector &indexPath_) |
Sets the currently selected entry by index path. | |
virtual IDVector | currentIDPath () const |
Gets the ID path of the currently selected entry. | |
virtual bool | setCurrentIDPath (const IDVector &idPath_) |
Sets the currently selected entry by ID path. | |
virtual std::unique_ptr< TreeColumnEntry > | currentEntry () const |
Gets the current entry object. | |
virtual const std::vector< std::shared_ptr< TreeColumnEntry > > *const | entries () const |
Gets the entries vector. | |
virtual bool | hasEntry (const IDVector &idPath_) const |
Gets whether the entries vector already contains an entry, based on its ID path. | |
virtual std::shared_ptr< TreeColumnEntry > | entryWithIDPath (const IDVector &idPath_) const |
Gets the entry with the given ID path, provided it exists within the widget. | |
virtual void | setEntries (const EntryVector &entries_) |
Allows the entries in a hierarchical column view to be changed out entirely. | |
virtual bool | insertEntry (const TreeColumnEntry &entry_, const IDVector &idPath_) |
Inserts an entry into the list of entries at a given position. | |
virtual std::shared_ptr< TreeColumnEntry > | removeEntry (const IDVector &idPath_) |
Removes a specific entry from the list of entries. | |
virtual bool | reorderEntry (const IDVector &targetID_, const IDVector &positionID_) |
Reorders a target entry (based on ID path) to be newly located just after another existing entry in the list. | |
virtual void | clearEntries () |
Clears all entries contained by the widget. | |
virtual bool | hasHeader () const |
Gets whether the widget has a header component to show the names of the columns. | |
virtual uint16_t | columnCount () const |
Gets the number of columns in the widget. | |
virtual ColumnNameVector | columnNames () const |
Gets the column names vector. | |
virtual ColumnWidthVector | columnWidths () const |
Gets the widths of each column in the view. | |
virtual void | setColumnWidths (const ColumnWidthVector &widths_) |
Sets the widths of each column in the view. | |
virtual bool | columnWidthsLocked () const |
Gets whether the column widths are locked (i.e. the user cannot change them) | |
virtual void | setColumnWidthsLocked (const bool locked_) |
Sets whether the column widths are locked (i.e. the user cannot change them) | |
virtual uint16_t | outlineColumnIndex () const |
Gets which column is the outline column (shows disclosure triangles) | |
virtual void | setOutlineColumnIndex (const uint16_t oc_) |
Sets which column is the outline column (shows disclosure triangles) | |
virtual bool | outlineColumnExpands () const |
Gets whether the outline column automatically expands in width when its children are shown. | |
virtual void | setOutlineColumnExpands (const bool exp_) |
Sets whether the outline column automatically expands in width when its children are shown. | |
virtual void | valueChanged () |
Simulates the hierarchical column view having its value changed. | |
virtual Callback *const | valueChangedCallback () const |
Gets the value changed callback for the hierarchical column view. | |
virtual void | setValueChangedCallback (const Callback &callback_) |
Sets the value changed callback. | |
virtual void | update () |
Force the hierarchical column view to update its entries. | |
virtual Callback *const | cellClickCallback () const |
Gets the callback set for when a cell is clicked. | |
virtual void | setCellClickCallback (const Callback &callback_) |
Sets/updates the callback for when a cell is clicked. | |
virtual std::unique_ptr< TreeColumnEntry > | clickedEntry () const |
Gets the entry of the cell that was last clicked. | |
virtual int32_t | clickedColumnIndex () const |
Gets the column index of the cell in the entry that was last clicked. | |
virtual Callback *const | expansionCallback () const |
Gets the callback set for when an entry is expanded/collapsed. | |
virtual void | setExpansionCallback (const Callback &callback_) |
Sets/updates the callback for when an entry is expanded/collapsed. | |
virtual std::unique_ptr< TreeColumnEntry > | expansionEntry () const |
Gets the entry that was last expanded/collapsed. | |
virtual Callback *const | cellChangedCallback () const |
Gets the callback for when a cell is modified via double-click inline editing. | |
virtual void | setCellChangedCallback (const Callback &callback_) |
Sets the callback for when a cell is modified via double-click inline editing. | |
virtual std::unique_ptr< TreeColumnEntry > | changedEntry () const |
Gets the entry that was last modified via double-click inline editing. | |
virtual int32_t | changedColumnIndex () const |
Gets the column index of the cell in the entry that was last modified. | |
virtual bool | reorderable () const |
Gets whether reordering support for the list is enabled. | |
virtual void | setReorderable (const bool enable_) |
Sets whether reordering support for the list is enabled. | |
virtual Callback *const | potentialReorderCallback () const |
Gets the current potential-reorder callback for the list. | |
virtual void | setPotentialReorderCallback (const Callback &callback_) |
Sets the potential-reorder callback for the widget. | |
virtual std::vector< std::string > | potentialReorderSource () const |
Gets the source item involved in the potential reorder, i.e. the entry being dragged. | |
virtual std::vector< std::string > | potentialReorderPosition () const |
Gets the position for the reorder, i.e. the entry just before the proposed reposition. | |
virtual bool | potentialReorderGood () const |
Gets whether the potential reorder is acceptable; if not, the drag cursor will indicate the proposed drop position is not allowed. | |
virtual void | setPotentialReorderGood (const bool good_) |
Sets whether the potential reorder is acceptable; if not, the drag cursor will indicate the proposed drop position is not allowed. | |
virtual Callback *const | reorderCallback () const |
Gets the current reorder callback for the widget. | |
virtual void | setReorderCallback (const Callback &callback_) |
Sets the reorder callback for the widget. | |
virtual std::vector< std::string > | reorderSource () const |
Gets the source item involved in the reorder, i.e. the entry being dropped. | |
virtual std::vector< std::string > | reorderPosition () const |
Gets the position for the reorder, i.e. the entry just before the reposition. | |
Public Member Functions inherited from hdi::core::Widget | |
virtual | ~Widget () |
Destructs a Widget. | |
virtual Widget * | clone () const =0 |
Convenience method to clone a Widget object in memory, taking its subclass type into account. | |
virtual Widget * | duplicate () const =0 |
Convenience method to duplicate a Widget object, creating a new and identical UI element to the target (but not belonging to the same containing window) | |
virtual PlatformWidgetPtr | platformWidget () const |
Gets the platform-specific widget, around which the target object is wrapped. | |
virtual bool | isEmpty () const |
Gets whether the target Widget object is empty (constructed with the default ctor) | |
virtual bool | operator== (const Widget &rhs_) const |
Tests whether a given Widget object is the same as another. | |
virtual bool | operator!= (const Widget &rhs_) const |
Tests whether a given Widget object is not the same as another. | |
virtual Type | type () const |
Gets the type of the widget. | |
virtual Window *const | window () const |
Gets the parent window of the widget. | |
virtual Rect | frame () const |
Gets the widget frame. | |
virtual void | setFrame (const Rect &frame_) |
Sets the widget frame. | |
virtual void | offset (const double x_, const double y_) |
Offsets the widget from its current location by the given amounts, in 1x resolution coordinates. | |
virtual std::string | text () const |
Gets the current text value of the widget. | |
virtual void | setText (const std::string &text_) |
Sets the current text value of the widget. | |
virtual bool | enabled () |
Gets whether the widget is enabled. | |
virtual void | setEnabled (const bool enable_) |
Enables or disables the widget. | |
virtual bool | visible () |
Gets whether the widget is visible. | |
virtual void | setVisible (const bool visible_) |
Shows or hides the widget. | |
virtual void | setOrigin (const Point &p_) |
Convenience method to set just the origin of the target widget's frame. | |
virtual void | setSize (const Size &s_) |
Convenience method to set just the size of the target widget's frame. | |
virtual void | setWidth (const double w_) |
Convenience method to set just the width of the target widget's frame. | |
virtual void | setHeight (const double h_) |
Convenience method to set just the height of the target widget's frame. | |
virtual bool | hasFocus () const |
Gets whether the widget currently has focus. | |
virtual void | focus () const |
Forces the widget to have focus, taking it from any other focused widget of the same window. | |
virtual Callback *const | focusCallback () const |
Gets the current focus callback for the widget. | |
virtual void | setFocusCallback (const Callback &callback_) |
Sets the focus callback for the widget. | |
virtual void | blur () const |
Removes focus from the widget. | |
virtual Callback *const | blurCallback () const |
Gets the current blur callback for the widget. | |
virtual void | setBlurCallback (const Callback &callback_) |
Sets the blur callback for the widget. | |
virtual std::string | tooltip () const |
Gets the tool tip string for the widget. | |
virtual void | setTooltip (const std::string &tip_) |
Sets the tool tip string for the widget. | |
virtual void | update () |
Force the widget to update (i.e. cause it to redraw) | |
Additional Inherited Members | |
Static Public Member Functions inherited from hdi::core::Widget | |
static bool | isCoreWidget (const PlatformWidgetPtr widget_) |
Gets whether the given platform widget is a hdi_core widget. | |
static std::unique_ptr< Widget > | lastClickedWidget () |
Gets the last widget that received a click event (either by the user or programmatically) | |
static std::unique_ptr< Widget > | lastValueChangingWidget () |
Gets the last widget that received a value changing event (either by the user or programmatically) | |
static std::unique_ptr< Widget > | lastValueChangedWidget () |
Gets the last widget that received a value changed event (either by the user or programmatically) | |
static std::unique_ptr< Widget > | lastDropWidget () |
Gets the last widget that received a drag-and-drop drop event (either by the user or programmatically) | |
static std::unique_ptr< Widget > | lastPotentialReorderWidget () |
Gets the last widget that received a potential-reorder event. | |
static std::unique_ptr< Widget > | lastReorderWidget () |
Gets the last widget that received a reorder event. | |
Protected Member Functions inherited from hdi::core::Widget | |
void * | _impl () const |
Internal use only. | |
Widget () | |
Constructs an empty Widget object. | |
Widget (const Widget &w_) | |
Constructs a new Widget object from an existing Widget object (copy constructor) | |
Widget (pui::Widget *&) | |
Internal use only. | |
virtual Widget & | operator= (const Widget &) |
Internal use only. | |
Protected Attributes inherited from hdi::core::Widget | |
void * | _data |
Private implementation data. | |
Hierarchical column view widget, much like a list view but allowing for entries with multiple columns presented in a hierarchical fashion.
hdi::core::HierarchicalColumnView::HierarchicalColumnView | ( | ) |
Constructs an empty HierarchicalColumnView object.
hdi::core::HierarchicalColumnView::HierarchicalColumnView | ( | const HierarchicalColumnView & | hcView_ | ) |
Constructs a new HierarchicalColumnView object from an existing HierarchicalColumnView object (copy constructor)
hcView_ | Existing HierarchicalColumnView object |
hdi::core::HierarchicalColumnView::HierarchicalColumnView | ( | const Rect & | frame_, |
const uint16_t | numCols_ | ||
) |
Constructs a hierarchical column view with a frame only, no contents.
frame_ | Position and size of the list, in 1x resolution coordinates |
numCols_ | The number of columns in the list |
hdi::core::HierarchicalColumnView::HierarchicalColumnView | ( | const Rect & | frame_, |
const ColumnNameVector & | colNames_ | ||
) |
Constructs a hierarchical column view with a frame only, no contents.
frame_ | Position and size of the list, in 1x resolution coordinates |
colNames_ | Names of each of the columns - also controls the number of columns in the list |
hdi::core::HierarchicalColumnView::HierarchicalColumnView | ( | const Rect & | frame_, |
const uint16_t | numCols_, | ||
const EntryVector & | entries_, | ||
const IndexVector & | indexPath_ | ||
) |
Constructs a hierarchical column view.
frame_ | Position and size of the list, in 1x resolution coordinates |
numCols_ | The number of columns in the list |
entries_ | Vector of entries |
indexPath_ | Initial index path to select (must exist in entries_, or be an empty vector) |
hdi::core::HierarchicalColumnView::HierarchicalColumnView | ( | const Rect & | frame_, |
const ColumnNameVector & | colNames_, | ||
const EntryVector & | entries_, | ||
const IndexVector & | indexPath_ | ||
) |
Constructs a hierarchical column view.
frame_ | Position and size of the list, in 1x resolution coordinates |
colNames_ | Names of each of the columns - also controls the number of columns in the list |
entries_ | Vector of entries |
indexPath_ | Initial index path to select (must exist in entries_, or be an empty vector) |
hdi::core::HierarchicalColumnView::HierarchicalColumnView | ( | const Rect & | frame_, |
const uint16_t | numCols_, | ||
const EntryVector & | entries_, | ||
const IDVector & | idPath_ | ||
) |
Constructor for a hierarchical column view with an initial ID selected.
frame_ | Position and size of the list, in 1x resolution coordinates |
numCols_ | The number of columns in the list |
entries_ | Vector of entries |
idPath_ | Initial ID path to select, as UTF-8 (must exist in entries_, or be an empty vector) |
hdi::core::HierarchicalColumnView::HierarchicalColumnView | ( | const Rect & | frame_, |
const ColumnNameVector & | colNames_, | ||
const EntryVector & | entries_, | ||
const IDVector & | idPath_ | ||
) |
Constructor for a hierarchical column view with an initial ID selected.
frame_ | Position and size of the list, in 1x resolution coordinates |
colNames_ | Names of each of the columns - also controls the number of columns in the list |
entries_ | Vector of entries |
idPath_ | Initial ID path to select, as UTF-8 (must exist in entries_, or be an empty vector) |
|
virtual |
HierarchicalColumnView destructor.
|
virtual |
Gets the callback for when a cell is modified via double-click inline editing.
|
virtual |
Gets the callback set for when a cell is clicked.
|
virtual |
Gets the column index of the cell in the entry that was last modified.
|
virtual |
Gets the entry that was last modified via double-click inline editing.
|
virtual |
Clears all entries contained by the widget.
|
virtual |
Gets the column index of the cell in the entry that was last clicked.
|
virtual |
Gets the entry of the cell that was last clicked.
|
virtual |
Convenience method to clone a HierarchicalColumnView object on the heap.
Implements hdi::core::Widget.
|
virtual |
Gets the number of columns in the widget.
|
virtual |
Gets the column names vector.
|
virtual |
Gets the widths of each column in the view.
|
virtual |
Gets whether the column widths are locked (i.e. the user cannot change them)
|
virtual |
Gets the current entry object.
|
virtual |
Gets the ID path of the currently selected entry.
|
virtual |
Gets the index path of the currently selected entry.
|
virtual |
Deselects all currently selected entries in the list.
|
virtual |
Convenience method to duplicate a HierarchicalColumnView object, creating a new and identical UI element to the target (but not belonging to the same containing window)
Implements hdi::core::Widget.
|
virtual |
Gets the entries vector.
|
virtual |
Gets the entry with the given ID path, provided it exists within the widget.
idPath_ | ID path of the entry to search for |
|
virtual |
Gets the callback set for when an entry is expanded/collapsed.
|
virtual |
Gets the entry that was last expanded/collapsed.
|
virtual |
Gets whether the entries vector already contains an entry, based on its ID path.
idPath_ | ID path of the entry to search for, as UTF-8 |
|
virtual |
Gets whether the widget has a header component to show the names of the columns.
|
virtual |
Inserts an entry into the list of entries at a given position.
entry_ | New entry object to insert into the list of entries |
idPath_ | Existing entry immediately before the position at which the new entry will be inserted; if the passed value is an empty string, or the leaf is an empty string, the new entry object will be inserted first at the root level or first within the penultimate container ID, respectively |
|
virtual |
Allows one HierarchicalColumnView object to be assigned from another.
rhs_ | Righthand side of the = operator; the object to copy values from |
|
virtual |
Gets whether the outline column automatically expands in width when its children are shown.
|
virtual |
Gets which column is the outline column (shows disclosure triangles)
|
virtual |
Gets the current potential-reorder callback for the list.
|
virtual |
Gets whether the potential reorder is acceptable; if not, the drag cursor will indicate the proposed drop position is not allowed.
|
virtual |
Gets the position for the reorder, i.e. the entry just before the proposed reposition.
|
virtual |
Gets the source item involved in the potential reorder, i.e. the entry being dragged.
|
virtual |
Removes a specific entry from the list of entries.
idPath_ | ID path of the entry to be removed |
|
virtual |
Gets whether reordering support for the list is enabled.
|
virtual |
Gets the current reorder callback for the widget.
|
virtual |
Reorders a target entry (based on ID path) to be newly located just after another existing entry in the list.
targetID_ | ID path of an existing entry in the list to be relocated |
positionID_ | ID path of an existing entry immediately before the position at which targetID_ should be moved; if the passed value is an empty string, or the leaf is an empty string, the target entry will be placed first at the root level or first within the penultimate container ID, respectively |
|
virtual |
Gets the position for the reorder, i.e. the entry just before the reposition.
|
virtual |
Gets the source item involved in the reorder, i.e. the entry being dropped.
|
virtual |
Sets the callback for when a cell is modified via double-click inline editing.
callback_ | New callback for a user modifying a cell via inline editing |
|
virtual |
Sets/updates the callback for when a cell is clicked.
callback_ | New callback for a user clicking a cell |
|
virtual |
Sets the widths of each column in the view.
widths_ | Vector of new column widths to set, at 1x resolution |
|
virtual |
Sets whether the column widths are locked (i.e. the user cannot change them)
locked_ | true to lock widths, false otherwise |
|
virtual |
Sets the currently selected entry by ID path.
idPath_ | ID path of new value to select in the hierarchical column view, as UTF-8 |
|
virtual |
Sets the currently selected entry by index path.
indexPath_ | New index path to select |
|
virtual |
Allows the entries in a hierarchical column view to be changed out entirely.
entries_ | New set of entries that the widget will contain |
|
virtual |
Sets/updates the callback for when an entry is expanded/collapsed.
callback_ | New callback for a user expanding/collapsing an entry |
|
virtual |
Sets whether the outline column automatically expands in width when its children are shown.
exp_ | true if the outline column should expand in width, false otherwise |
|
virtual |
Sets which column is the outline column (shows disclosure triangles)
oc_ | New outline column index |
|
virtual |
Sets the potential-reorder callback for the widget.
callback_ | New callback (target and action) for each time the potential reorder target changes |
|
virtual |
Sets whether the potential reorder is acceptable; if not, the drag cursor will indicate the proposed drop position is not allowed.
good_ | Whether the potential reorder position is acceptable |
|
virtual |
Sets whether reordering support for the list is enabled.
enable_ | true to enable drag-and-drop reordering support, false otherwise |
|
virtual |
Sets the reorder callback for the widget.
callback_ | New callback (target and action) for when a reorder is finalized (via dropping) |
|
virtual |
Does nothing.
Reimplemented from hdi::core::Widget.
|
virtual |
Sets the value changed callback.
callback_ | New callback for when the hierarchical column view's value has changed |
|
virtual |
Gets the current text value of the list.
Reimplemented from hdi::core::Widget.
|
virtual |
Force the hierarchical column view to update its entries.
Reimplemented from hdi::core::Widget.
|
virtual |
Simulates the hierarchical column view having its value changed.
|
virtual |
Gets the value changed callback for the hierarchical column view.