Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
hdi::core::ColumnView Class Reference

Column view widget, much like a list view but allowing for entries with multiple columns. More...

#include <hdicoreColumnView.h>

Inheritance diagram for hdi::core::ColumnView:
Inheritance graph
[legend]
Collaboration diagram for hdi::core::ColumnView:
Collaboration graph
[legend]

Public Types

typedef std::vector< ColumnEntryEntryVector
 
typedef std::vector< std::string > ColumnNameVector
 
typedef std::vector< double > ColumnWidthVector
 
- 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

 ColumnView ()
 Constructs an empty ColumnView object.
 
 ColumnView (const ColumnView &colView_)
 Constructs a new ColumnView object from an existing ColumnView object (copy constructor)
 
 ColumnView (const Rect &frame_, const uint16_t numCols_)
 Constructs a column view with a frame only, no contents.
 
 ColumnView (const Rect &frame_, const ColumnNameVector &colNames_)
 Constructs a column view with a frame only, no contents.
 
 ColumnView (const Rect &frame_, const uint16_t numCols_, const EntryVector &entries_, const int32_t index_)
 Constructs a column view.
 
 ColumnView (const Rect &frame_, const ColumnNameVector &colNames_, const EntryVector &entries_, const int32_t index_)
 Constructs a column view.
 
 ColumnView (const Rect &frame_, const uint16_t numCols_, const EntryVector &entries_, const std::string &initialID_)
 Constructor for a column view with an initial ID selected.
 
 ColumnView (const Rect &frame_, const ColumnNameVector &colNames_, const EntryVector &entries_, const std::string &initialID_)
 Constructor for a column view with an initial ID selected.
 
virtual ColumnViewoperator= (const ColumnView &rhs_)
 Allows one ColumnView object to be assigned from another.
 
virtual ~ColumnView ()
 ColumnView destructor.
 
virtual ColumnViewclone () const
 Convenience method to clone a ColumnView object on the heap.
 
virtual ColumnViewduplicate () const
 Convenience method to duplicate a ColumnView 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 int32_t currentIndex () const
 Gets the index of the currently selected entry.
 
virtual bool setCurrentIndex (const int32_t index_)
 Sets the currently selected entry by index.
 
virtual std::string currentID () const
 Gets the ID of the currently selected entry.
 
virtual bool setCurrentID (const std::string &id_)
 Sets the currently selected entry by ID.
 
virtual std::unique_ptr< ColumnEntrycurrentEntry () const
 Gets the current entry object.
 
virtual const std::vector< std::shared_ptr< ColumnEntry > > *const entries () const
 Gets the entries vector.
 
virtual bool hasEntry (const std::string &id_) const
 Gets whether the entries vector already contains an entry, based on its ID.
 
virtual std::shared_ptr< ColumnEntryentryWithID (const std::string &id_) const
 Gets the entry with the given ID, provided it exists within the widget.
 
virtual void setEntries (const EntryVector &entries_)
 Allows the entries in a column view to be changed out entirely.
 
virtual bool pushEntry (const ColumnEntry &entry_)
 Pushes an entry onto the list (i.e. at the end)
 
virtual bool popEntry (ColumnEntry &entry__)
 Pops an entry off the list (i.e. from the end)
 
virtual bool insertEntry (const std::string &id_, const ColumnEntry &entry_)
 Inserts an entry into the list of entries at a given position.
 
virtual bool removeEntry (const std::string &id_, ColumnEntry &entry__)
 Removes a specific entry from the list of entries.
 
virtual bool reorderEntry (const std::string &targetID_, const std::string &positionID_)
 Reorders a target entry (based on ID) 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 void valueChanged ()
 Simulates the column view having its value changed.
 
virtual Callback *const valueChangedCallback () const
 Gets the value changed callback for the column view.
 
virtual void setValueChangedCallback (const Callback &callback_)
 Sets the value changed callback.
 
virtual void update ()
 Force the 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< ColumnEntryclickedEntry () 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 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< ColumnEntrychangedEntry () 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 Widgetclone () const =0
 Convenience method to clone a Widget object in memory, taking its subclass type into account.
 
virtual Widgetduplicate () 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< WidgetlastClickedWidget ()
 Gets the last widget that received a click event (either by the user or programmatically)
 
static std::unique_ptr< WidgetlastValueChangingWidget ()
 Gets the last widget that received a value changing event (either by the user or programmatically)
 
static std::unique_ptr< WidgetlastValueChangedWidget ()
 Gets the last widget that received a value changed event (either by the user or programmatically)
 
static std::unique_ptr< WidgetlastDropWidget ()
 Gets the last widget that received a drag-and-drop drop event (either by the user or programmatically)
 
static std::unique_ptr< WidgetlastPotentialReorderWidget ()
 Gets the last widget that received a potential-reorder event.
 
static std::unique_ptr< WidgetlastReorderWidget ()
 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 Widgetoperator= (const Widget &)
 Internal use only.
 
- Protected Attributes inherited from hdi::core::Widget
void * _data
 Private implementation data.
 

Detailed Description

Column view widget, much like a list view but allowing for entries with multiple columns.

Constructor & Destructor Documentation

◆ ColumnView() [1/8]

hdi::core::ColumnView::ColumnView ( )

Constructs an empty ColumnView object.

Author
GW
Date
01/2015
Note
To test if a ColumnView object is empty, call isEmpty() on it
Empty ColumnView objects do not relate to any actual UI widget; they are designed to be "receivers" of some other ColumnView object via the overloaded assignment operator. Empty ColumnView objects are useless until such time (though it is safe to call any of their methods).

◆ ColumnView() [2/8]

hdi::core::ColumnView::ColumnView ( const ColumnView colView_)

Constructs a new ColumnView object from an existing ColumnView object (copy constructor)

Author
GW
Date
01/2015
Parameters
colView_Existing ColumnView object

◆ ColumnView() [3/8]

hdi::core::ColumnView::ColumnView ( const Rect frame_,
const uint16_t  numCols_ 
)

Constructs a column view with a frame only, no contents.

Author
GW
Date
01/2015
Parameters
frame_Position and size of the list, in 1x resolution coordinates
numCols_The number of columns in the list

◆ ColumnView() [4/8]

hdi::core::ColumnView::ColumnView ( const Rect frame_,
const ColumnNameVector &  colNames_ 
)

Constructs a column view with a frame only, no contents.

Author
GW
Date
01/2015
Parameters
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

◆ ColumnView() [5/8]

hdi::core::ColumnView::ColumnView ( const Rect frame_,
const uint16_t  numCols_,
const EntryVector &  entries_,
const int32_t  index_ 
)

Constructs a column view.

Author
GW
Date
01/2015
Parameters
frame_Position and size of the list, in 1x resolution coordinates
numCols_The number of columns in the list
entries_Vector of entries
index_Initial index to select (must exist in entries_)

◆ ColumnView() [6/8]

hdi::core::ColumnView::ColumnView ( const Rect frame_,
const ColumnNameVector &  colNames_,
const EntryVector &  entries_,
const int32_t  index_ 
)

Constructs a column view.

Author
GW
Date
01/2015
Parameters
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
index_Initial index to select (must exist in entries_)

◆ ColumnView() [7/8]

hdi::core::ColumnView::ColumnView ( const Rect frame_,
const uint16_t  numCols_,
const EntryVector &  entries_,
const std::string &  initialID_ 
)

Constructor for a column view with an initial ID selected.

Author
GW
Date
01/2015
Parameters
frame_Position and size of the list, in 1x resolution coordinates
numCols_The number of columns in the list
entries_Vector of entries
initialID_Initial ID to select (must exist in entries_, and must not be a separator), as UTF-8

◆ ColumnView() [8/8]

hdi::core::ColumnView::ColumnView ( const Rect frame_,
const ColumnNameVector &  colNames_,
const EntryVector &  entries_,
const std::string &  initialID_ 
)

Constructor for a column view with an initial ID selected.

Author
GW
Date
01/2015
Parameters
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
initialID_Initial ID to select (must exist in entries_, and must not be a separator), as UTF-8

◆ ~ColumnView()

virtual hdi::core::ColumnView::~ColumnView ( )
virtual

ColumnView destructor.

Author
GW
Date
01/2015

Member Function Documentation

◆ cellChangedCallback()

virtual Callback *const hdi::core::ColumnView::cellChangedCallback ( ) const
virtual

Gets the callback for when a cell is modified via double-click inline editing.

Author
GW
Date
07/2022
Returns
A pointer to the currently registered cell modification callback

◆ cellClickCallback()

virtual Callback *const hdi::core::ColumnView::cellClickCallback ( ) const
virtual

Gets the callback set for when a cell is clicked.

Author
GW
Date
02/2015
Returns
A pointer to the currently registered cell click callback

◆ changedColumnIndex()

virtual int32_t hdi::core::ColumnView::changedColumnIndex ( ) const
virtual

Gets the column index of the cell in the entry that was last modified.

Author
GW
Date
07/2022
Returns
The column index of the changed cell, or -1 for none/error
Note
The return value of this method is only guaranteed to be valid during the execution of the cell changed callback.

◆ changedEntry()

virtual std::unique_ptr< ColumnEntry > hdi::core::ColumnView::changedEntry ( ) const
virtual

Gets the entry that was last modified via double-click inline editing.

Author
GW
Date
07/2022
Returns
The changed entry object
Note
The return value of this method is only guaranteed to be valid during the execution of the cell changed callback.

◆ clearEntries()

virtual void hdi::core::ColumnView::clearEntries ( )
virtual

Clears all entries contained by the widget.

Author
GW
Date
01/2015

◆ clickedColumnIndex()

virtual int32_t hdi::core::ColumnView::clickedColumnIndex ( ) const
virtual

Gets the column index of the cell in the entry that was last clicked.

Author
GW
Date
01/2015
Returns
The column index of the clicked cell, or -1 for none/error
Note
The return value of this method is only guaranteed to be valid during the execution of the cell click callback.

◆ clickedEntry()

virtual std::unique_ptr< ColumnEntry > hdi::core::ColumnView::clickedEntry ( ) const
virtual

Gets the entry of the cell that was last clicked.

Author
GW
Date
01/2015
Returns
The clicked entry object
Note
The return value of this method is only guaranteed to be valid during the execution of the cell click callback.

◆ clone()

virtual ColumnView * hdi::core::ColumnView::clone ( ) const
virtual

Convenience method to clone a ColumnView object on the heap.

Author
GW
Date
01/2015
Returns
A pointer to the new ColumnView object
Note
If you subclass ColumnView, you MUST overload this method yourself! If you don't and/or your clone() method does not return an instance of your ColumnView subclass, you will experience "object slicing" when adding the widget to a window.
Warning
The caller must manage the memory for the returned ColumnView object.

Implements hdi::core::Widget.

◆ columnCount()

virtual uint16_t hdi::core::ColumnView::columnCount ( ) const
virtual

Gets the number of columns in the widget.

Author
GW
Date
02/2015
Returns
The column count for the target widget, as defined when the widget was created

◆ columnNames()

virtual ColumnNameVector hdi::core::ColumnView::columnNames ( ) const
virtual

Gets the column names vector.

Author
GW
Date
12/2014
Returns
The column names vector for the target widget, containing all column names as defined when the widget was created
Note
If the hasHeader() method returns false, this method will return an empty vector.

◆ columnWidths()

virtual ColumnWidthVector hdi::core::ColumnView::columnWidths ( ) const
virtual

Gets the widths of each column in the view.

Author
GW
Date
01/2015
Returns
A vector populated with the pixels widths of each column, at 1x resolution

◆ columnWidthsLocked()

virtual bool hdi::core::ColumnView::columnWidthsLocked ( ) const
virtual

Gets whether the column widths are locked (i.e. the user cannot change them)

Author
GW
Date
02/2015
Returns
true for locked widths, false otherwise

◆ currentEntry()

virtual std::unique_ptr< ColumnEntry > hdi::core::ColumnView::currentEntry ( ) const
virtual

Gets the current entry object.

Author
GW
Date
01/2015
Returns
The ColumnEntry object for the currently selected item

◆ currentID()

virtual std::string hdi::core::ColumnView::currentID ( ) const
virtual

Gets the ID of the currently selected entry.

Author
GW
Date
01/2015
Returns
UTF-8 ID string of the currently selected entry, or "" if no entry is currently selected

◆ currentIndex()

virtual int32_t hdi::core::ColumnView::currentIndex ( ) const
virtual

Gets the index of the currently selected entry.

Author
GW
Date
01/2015
Returns
The index number of the currently selected entry, or -1 if no entry is selected

◆ deselectAll()

virtual void hdi::core::ColumnView::deselectAll ( )
virtual

Deselects all currently selected entries in the list.

Author
GW
Date
01/2015

◆ duplicate()

virtual ColumnView * hdi::core::ColumnView::duplicate ( ) const
virtual

Convenience method to duplicate a ColumnView object, creating a new and identical UI element to the target (but not belonging to the same containing window)

Author
GW
Date
01/2015
Returns
A pointer to the new ColumnView object (and new UI element)
Note
The new column view will have copies of all entries present in the target, but be aware that copies of the user data in each entry cannot be made (because they are simply void* variables). As such, the user data in the copies will simply be set to NULL by this method.
Warning
The caller must manage the memory for the returned ColumnView object.

Implements hdi::core::Widget.

◆ entries()

virtual const std::vector< std::shared_ptr< ColumnEntry > > *const hdi::core::ColumnView::entries ( ) const
virtual

Gets the entries vector.

Author
GW
Date
01/2015
Returns
The entries vector for the target widget, containing all currently known entries
Note
Modifying any value in an entry will not cause the widget to update automatically; call update() to update the UI for changes made to entry data.

◆ entryWithID()

virtual std::shared_ptr< ColumnEntry > hdi::core::ColumnView::entryWithID ( const std::string &  id_) const
virtual

Gets the entry with the given ID, provided it exists within the widget.

Author
GW
Date
12/2022
Parameters
id_ID of the entry to search for
Returns
The entry with the given ID, or NULL if not found

◆ hasEntry()

virtual bool hdi::core::ColumnView::hasEntry ( const std::string &  id_) const
virtual

Gets whether the entries vector already contains an entry, based on its ID.

Author
GW
Date
01/2015
Parameters
id_ID of the entry to search for, as UTF-8
Returns
true if the widget already contains an entry with the given ID, false otherwise

◆ hasHeader()

virtual bool hdi::core::ColumnView::hasHeader ( ) const
virtual

Gets whether the widget has a header component to show the names of the columns.

Author
GW
Date
02/2015
Returns
true if the widget was constructed with a header, false otherwise

◆ insertEntry()

virtual bool hdi::core::ColumnView::insertEntry ( const std::string &  id_,
const ColumnEntry entry_ 
)
virtual

Inserts an entry into the list of entries at a given position.

Author
GW
Date
12/2022
Parameters
id_Existing entry immediately before the position at which the new entry will be inserted, as UTF-8
entry_New entry object to insert into the list of entries
Returns
true if the entry is inserted successfully, false otherwise
Note
If the entry for id_ doesn't exist in the list, the new entry will not be inserted.
If the passed entry is already present in the list (based on its ID), it will not be inserted.

◆ operator=()

virtual ColumnView & hdi::core::ColumnView::operator= ( const ColumnView rhs_)
virtual

Allows one ColumnView object to be assigned from another.

Author
GW
Date
01/2015
Parameters
rhs_Righthand side of the = operator; the object to copy values from
Returns
The target ColumnView object, but with its value updated to match that of rhs_

◆ popEntry()

virtual bool hdi::core::ColumnView::popEntry ( ColumnEntry entry__)
virtual

Pops an entry off the list (i.e. from the end)

Author
GW
Date
12/2022
Parameters
entry__Return-by-reference for the popped entry, so the caller can inspect which one was removed
Returns
true if an entry was popped and acquired, false otherwise

◆ potentialReorderCallback()

virtual Callback *const hdi::core::ColumnView::potentialReorderCallback ( ) const
virtual

Gets the current potential-reorder callback for the list.

Author
GW
Date
12/2022
Returns
A pointer to the currently registered potential-reorder callback

◆ potentialReorderGood()

virtual bool hdi::core::ColumnView::potentialReorderGood ( ) const
virtual

Gets whether the potential reorder is acceptable; if not, the drag cursor will indicate the proposed drop position is not allowed.

Author
GW
Date
12/2022
Returns
true if the specific reorder drop position is allowed, false otherwise
Note
The return value of this method is only guaranteed to be valid during the execution of the potential-reorder callback.

◆ potentialReorderPosition()

virtual std::vector< std::string > hdi::core::ColumnView::potentialReorderPosition ( ) const
virtual

Gets the position for the reorder, i.e. the entry just before the proposed reposition.

Author
GW
Date
12/2022
Returns
The ID path of the entry just before the potential drop point for a reposition; if the returned vector contains only an empty string, this refers to the proposed drop position being the first at the root level.
Note
The return value of this method is only guaranteed to be valid during the execution of the potential-reorder callback.

◆ potentialReorderSource()

virtual std::vector< std::string > hdi::core::ColumnView::potentialReorderSource ( ) const
virtual

Gets the source item involved in the potential reorder, i.e. the entry being dragged.

Author
GW
Date
12/2022
Returns
The ID path of the entry that might be reordered
Note
The return value of this method is only guaranteed to be valid during the execution of the potential-reorder callback.

◆ pushEntry()

virtual bool hdi::core::ColumnView::pushEntry ( const ColumnEntry entry_)
virtual

Pushes an entry onto the list (i.e. at the end)

Author
GW
Date
12/2022
Parameters
entry_New entry object to insert into the list of entries
Returns
true if the entry is pushed successfully, false otherwise
Note
If the entry is already present in the list (based on its ID), it will not be inserted.

◆ removeEntry()

virtual bool hdi::core::ColumnView::removeEntry ( const std::string &  id_,
ColumnEntry entry__ 
)
virtual

Removes a specific entry from the list of entries.

Author
GW
Date
12/2022
Parameters
id_ID of the entry to be removed, as UTF-8
entry__Return-by-reference for the removed entry, so the caller can inspect which one was removed
Returns
true if an entry was removed and acquired, false otherwise

◆ reorderable()

virtual bool hdi::core::ColumnView::reorderable ( ) const
virtual

Gets whether reordering support for the list is enabled.

Author
GW
Date
12/2022
Returns
true if drag-and-drop reordering support is enabled, false otherwise

◆ reorderCallback()

virtual Callback *const hdi::core::ColumnView::reorderCallback ( ) const
virtual

Gets the current reorder callback for the widget.

Author
GW
Date
12/2022
Returns
A pointer to the currently registered reorder callback

◆ reorderEntry()

virtual bool hdi::core::ColumnView::reorderEntry ( const std::string &  targetID_,
const std::string &  positionID_ 
)
virtual

Reorders a target entry (based on ID) to be newly located just after another existing entry in the list.

Author
GW
Date
12/2022
Parameters
targetID_ID of an existing entry in the list to be relocated
positionID_ID of an existing entry immediately before the position at which targetID_ should be moved; if the passed value is an empty string, targetID_ will be repositioned at the beginning
Returns
true if the entry is repositioned successfully, false otherwise
Note
If the entry for targetID_ or for positionID_ doesn't exist in the list, this method will bail.

◆ reorderPosition()

virtual std::vector< std::string > hdi::core::ColumnView::reorderPosition ( ) const
virtual

Gets the position for the reorder, i.e. the entry just before the reposition.

Author
GW
Date
12/2022
Returns
The ID path of the entry just before the drop point for a reposition; if the returned vector contains only an empty string, this refers to the drop position being the first at the root level.
Note
The return value of this method is only guaranteed to be valid during the execution of the reorder callback.

◆ reorderSource()

virtual std::vector< std::string > hdi::core::ColumnView::reorderSource ( ) const
virtual

Gets the source item involved in the reorder, i.e. the entry being dropped.

Author
GW
Date
12/2022
Returns
The ID path of the entry that was reordered
Note
The return value of this method is only guaranteed to be valid during the execution of the reorder callback.

◆ setCellChangedCallback()

virtual void hdi::core::ColumnView::setCellChangedCallback ( const Callback callback_)
virtual

Sets the callback for when a cell is modified via double-click inline editing.

Author
GW
Date
07/2022
Parameters
callback_New callback for a user modifying a cell via inline editing
Note
When your callback is executed, you can determine which entry was clicked by calling the changedEntry() method.

◆ setCellClickCallback()

virtual void hdi::core::ColumnView::setCellClickCallback ( const Callback callback_)
virtual

Sets/updates the callback for when a cell is clicked.

Author
GW
Date
01/2015
Parameters
callback_New callback for a user clicking a cell
Note
When your callback is executed, you can determine which entry was clicked by calling the clickedEntry() method and which column by calling the clickedColumnIndex() method.

◆ setColumnWidths()

virtual void hdi::core::ColumnView::setColumnWidths ( const ColumnWidthVector &  widths_)
virtual

Sets the widths of each column in the view.

Author
GW
Date
01/2015
Parameters
widths_Vector of new column widths to set, at 1x resolution

◆ setColumnWidthsLocked()

virtual void hdi::core::ColumnView::setColumnWidthsLocked ( const bool  locked_)
virtual

Sets whether the column widths are locked (i.e. the user cannot change them)

Author
GW
Date
02/2015
Parameters
locked_true to lock widths, false otherwise

◆ setCurrentID()

virtual bool hdi::core::ColumnView::setCurrentID ( const std::string &  id_)
virtual

Sets the currently selected entry by ID.

Author
GW
Date
01/2015
Parameters
id_ID of new value to select in the column view, as UTF-8
Returns
true if the entry with the given ID was selected, or false if invalid

◆ setCurrentIndex()

virtual bool hdi::core::ColumnView::setCurrentIndex ( const int32_t  index_)
virtual

Sets the currently selected entry by index.

Author
GW
Date
01/2015
Parameters
index_New index to select
Returns
true if the selection occurred successfully, or false if e.g. out of range

◆ setEntries()

virtual void hdi::core::ColumnView::setEntries ( const EntryVector &  entries_)
virtual

Allows the entries in a column view to be changed out entirely.

Author
GW
Date
01/2015
Parameters
entries_New set of entries that the widget will contain

◆ setPotentialReorderCallback()

virtual void hdi::core::ColumnView::setPotentialReorderCallback ( const Callback callback_)
virtual

Sets the potential-reorder callback for the widget.

Author
GW
Date
12/2022
Parameters
callback_New callback (target and action) for each time the potential reorder target changes
Note
When your callback is executed, you can determine which entry is being proposed for reorder and its proposed new position by calling the potentialReorderSource() and potentialReorderPosition() methods, respectively.

◆ setPotentialReorderGood()

virtual void hdi::core::ColumnView::setPotentialReorderGood ( const bool  good_)
virtual

Sets whether the potential reorder is acceptable; if not, the drag cursor will indicate the proposed drop position is not allowed.

Author
GW
Date
12/2022
Parameters
good_Whether the potential reorder position is acceptable
Note
This method will have no effect if it is called any other time than from within a potential- reorder callback.
A potential reorder is always assumed to be good, so the true/false nature of a potential reorder will always be true unless you have called this method within your callback and passed false.
Calling this method and passing false will not stop a potential reorder from occurring altogether; rather, it merely indicates whether a specific reorder proposed drop position is acceptable. It is still up to you whether the entries, and any underlying associated data, is actually reordered once your reorder callback is executed.

◆ setReorderable()

virtual void hdi::core::ColumnView::setReorderable ( const bool  enable_)
virtual

Sets whether reordering support for the list is enabled.

Author
GW
Date
12/2022
Parameters
enable_true to enable drag-and-drop reordering support, false otherwise

◆ setReorderCallback()

virtual void hdi::core::ColumnView::setReorderCallback ( const Callback callback_)
virtual

Sets the reorder callback for the widget.

Author
GW
Date
12/2022
Parameters
callback_New callback (target and action) for when a reorder is finalized (via dropping)
Note
When your callback is executed, you can determine which entry is being reordered and its new position by calling the reorderSource() and reorderPosition() methods, respectively.

◆ setText()

virtual void hdi::core::ColumnView::setText ( const std::string &  )
virtual

Does nothing.

Author
GW
Date
01/2015
Note
Since a ColumnView inherently stores multiple text values per row, setting the text value has potentially no meaning or an ambiguous meaning. Therefore, this method performs no action.

Reimplemented from hdi::core::Widget.

◆ setValueChangedCallback()

virtual void hdi::core::ColumnView::setValueChangedCallback ( const Callback callback_)
virtual

Sets the value changed callback.

Author
GW
Date
01/2015
Parameters
callback_New callback for when the column view's value has changed
Note
In this context, "value" refers to the selected index/ID changing.

◆ text()

virtual std::string hdi::core::ColumnView::text ( ) const
virtual

Gets the current text value of the list.

Author
GW
Date
01/2015
Returns
"", as a multi-column list has no specific text value

Reimplemented from hdi::core::Widget.

◆ update()

virtual void hdi::core::ColumnView::update ( )
virtual

Force the column view to update its entries.

Author
GW
Date
01/2015

Reimplemented from hdi::core::Widget.

◆ valueChanged()

virtual void hdi::core::ColumnView::valueChanged ( )
virtual

Simulates the column view having its value changed.

Author
GW
Date
01/2015

◆ valueChangedCallback()

virtual Callback *const hdi::core::ColumnView::valueChangedCallback ( ) const
virtual

Gets the value changed callback for the column view.

Author
GW
Date
01/2015
Returns
A pointer to the currently registered value changed callback
Note
In this context, "value" refers to the selected index/ID changing.