Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreHierarchicalColumnView.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_HIERARCHICAL_COLUMN_VIEW__
8 #define __HDI_CORE_HIERARCHICAL_COLUMN_VIEW__
9 
10 #include <vector>
11 
12 #include "hdicoreMacros.h"
13 
14 #include "hdicoreWidget.h"
15 
16 namespace hdi
17 {
18  namespace core
19  {
20  class Callback;
21  class TreeColumnEntry;
22 
28  {
29  public:
30  typedef std::vector<TreeColumnEntry> EntryVector;
31  typedef std::vector<std::string> ColumnNameVector;
32  typedef std::vector<double> ColumnWidthVector;
33  typedef std::vector<int32_t> IndexVector;
34  typedef std::vector<std::string> IDVector;
35  typedef std::vector<std::string> ValueVector;
36 
49 
59 
68  HierarchicalColumnView(const Rect& frame_, const uint16_t numCols_);
69 
78  HierarchicalColumnView(const Rect& frame_, const ColumnNameVector& colNames_);
79 
91  const Rect& frame_,
92  const uint16_t numCols_,
93  const EntryVector& entries_,
94  const IndexVector& indexPath_
95  );
96 
108  const Rect& frame_,
109  const ColumnNameVector& colNames_,
110  const EntryVector& entries_,
111  const IndexVector& indexPath_
112  );
113 
126  const Rect& frame_,
127  const uint16_t numCols_,
128  const EntryVector& entries_,
129  const IDVector& idPath_
130  );
131 
144  const Rect& frame_,
145  const ColumnNameVector& colNames_,
146  const EntryVector& entries_,
147  const IDVector& idPath_
148  );
149 
159 
165  virtual ~HierarchicalColumnView();
166 
181  virtual HierarchicalColumnView* clone() const;
182 
198  virtual HierarchicalColumnView* duplicate() const;
199 
205  virtual void deselectAll();
206 
214  virtual std::string text() const;
215 
225  virtual void setText(const std::string&);
226 
234  virtual IndexVector currentIndexPath() const;
235 
244  virtual bool setCurrentIndexPath(const IndexVector& indexPath_);
245 
253  virtual IDVector currentIDPath() const;
254 
263  virtual bool setCurrentIDPath(const IDVector& idPath_);
264 
272  virtual std::auto_ptr<TreeColumnEntry> currentEntry() const;
273 
284  virtual const std::vector< TreeColumnEntry* >* const entries() const;
285 
294  virtual bool hasEntry(const IDVector& idPath_) const;
295 
303  virtual void setEntries(const EntryVector& entries_);
304 
310  virtual void clearEntries();
311 
319  virtual bool hasHeader() const;
320 
328  virtual uint16_t columnCount() const;
329 
340  virtual ColumnNameVector columnNames() const;
341 
349  virtual ColumnWidthVector columnWidths() const;
350 
358  virtual void setColumnWidths(const ColumnWidthVector& widths_);
359 
367  virtual bool columnWidthsLocked() const;
368 
376  virtual void setColumnWidthsLocked(const bool locked_);
377 
387  virtual uint16_t outlineColumnIndex() const;
388 
398  virtual void setOutlineColumnIndex(const uint16_t oc_);
399 
410  virtual bool outlineColumnExpands() const;
411 
422  virtual void setOutlineColumnExpands(const bool exp_);
423 
429  virtual void valueChanged();
430 
438  virtual Callback* const valueChangedCallback() const;
439 
447  virtual void setValueChangedCallback(const Callback& callback_);
448 
454  virtual void update();
455 
463  virtual Callback* const imageClickCallback() const;
464 
475  virtual void setImageClickCallback(const Callback& callback_);
476 
487  virtual std::auto_ptr<TreeColumnEntry> clickedImageEntry() const;
488 
499  virtual int32_t clickedImageColumnIndex() const;
500 
508  virtual Callback* const expansionCallback() const;
509 
520  virtual void setExpansionCallback(const Callback& callback_);
521 
532  virtual std::auto_ptr<TreeColumnEntry> expansionEntry() const;
533  };
534 
535  typedef std::auto_ptr<HierarchicalColumnView> HierarchicalColumnViewAP;
536  }
537 }
538 
539 #endif
540 // __HDI_CORE_HIERARCHICAL_COLUMN_VIEW__
virtual void setImageClickCallback(const Callback &callback_)
Sets/updates the callback for when an image entry is clicked.
virtual void setOutlineColumnExpands(const bool exp_)
Sets whether the outline column automatically expands in width when its children are shown...
Base class for all interface widgets; handles many common needs, e.g. text, position, size, etc.
Definition: hdicoreWidget.h:39
virtual void setColumnWidths(const ColumnWidthVector &widths_)
Sets the widths of each column in the view.
virtual std::string text() const
Gets the current text value of the list.
virtual bool setCurrentIDPath(const IDVector &idPath_)
Sets the currently selected entry by ID path.
virtual void setOutlineColumnIndex(const uint16_t oc_)
Sets which column is the outline column (shows disclosure triangles)
virtual ~HierarchicalColumnView()
HierarchicalColumnView destructor.
virtual void clearEntries()
Clears all entries contained by the widget.
virtual void valueChanged()
Simulates the hierarchical column view having its value changed.
HierarchicalColumnView()
Constructs an empty HierarchicalColumnView object.
virtual ColumnNameVector columnNames() const
Gets the column names vector.
virtual void setExpansionCallback(const Callback &callback_)
Sets/updates the callback for when an entry is expanded/collapsed.
virtual void setText(const std::string &)
Does nothing.
Contains Point and Size objects to describe a rectangle that exists at a specific point of given dime...
Definition: hdicoreRect.h:26
virtual bool outlineColumnExpands() const
Gets whether the outline column automatically expands in width when its children are shown...
virtual int32_t clickedImageColumnIndex() const
Gets the column index of the image in the entry that was last clicked.
virtual const std::vector< TreeColumnEntry * > *const entries() const
Gets the entries vector.
virtual Callback *const expansionCallback() const
Gets the callback set for when an entry is expanded/collapsed.
virtual uint16_t outlineColumnIndex() const
Gets which column is the outline column (shows disclosure triangles)
virtual std::auto_ptr< TreeColumnEntry > currentEntry() const
Gets the current entry object.
Base class for templated __Callback class.
Definition: hdicoreCallback.h:67
virtual HierarchicalColumnView * duplicate() const
Convenience method to duplicate a HierarchicalColumnView object, creating a new and identical UI elem...
virtual HierarchicalColumnView & operator=(const HierarchicalColumnView &rhs_)
Allows one HierarchicalColumnView object to be assigned from another.
virtual void setValueChangedCallback(const Callback &callback_)
Sets the value changed callback.
virtual Callback *const imageClickCallback() const
Gets the callback set for when an image entry is clicked.
virtual std::auto_ptr< TreeColumnEntry > expansionEntry() const
Gets the entry that was last expanded/collapsed.
Header file for a variety of Illustrator plugin convenience macros.
virtual ColumnWidthVector columnWidths() const
Gets the widths of each column in the view.
virtual uint16_t columnCount() const
Gets the number of columns in the widget.
virtual void update()
Force the hierarchical column view to update its entries.
Definition: hdicoreaiArray.h:12
virtual bool hasEntry(const IDVector &idPath_) const
Gets whether the entries vector already contains an entry, based on its ID path.
Header file for Illustrator user interface widgets.
virtual bool setCurrentIndexPath(const IndexVector &indexPath_)
Sets the currently selected entry by index path.
virtual std::auto_ptr< TreeColumnEntry > clickedImageEntry() const
Gets the image entry that was last clicked.
virtual void setColumnWidthsLocked(const bool locked_)
Sets whether the column widths are locked (i.e. the user cannot change them)
virtual bool columnWidthsLocked() const
Gets whether the column widths are locked (i.e. the user cannot change them)
virtual HierarchicalColumnView * clone() const
Convenience method to clone a HierarchicalColumnView object on the heap.
virtual void setEntries(const EntryVector &entries_)
Allows the entries in a hierarchical column view to be changed out entirely.
virtual bool hasHeader() const
Gets whether the widget has a header component to show the names of the columns.
virtual Callback *const valueChangedCallback() const
Gets the value changed callback for the hierarchical column view.
virtual IndexVector currentIndexPath() const
Gets the index path of the currently selected entry.
Hierarchical column view widget, much like a list view but allowing for entries with multiple columns...
Definition: hdicoreHierarchicalColumnView.h:27
virtual IDVector currentIDPath() const
Gets the ID path of the currently selected entry.
virtual void deselectAll()
Deselects all currently selected entries in the list.