Crazy Eddie's GUI System  0.8.7
widgets/MultiColumnList.h
1 /***********************************************************************
2  created: 13/4/2004
3  author: Paul D Turner
4 
5  purpose: Interface to base class for MultiColumnList widget
6 *************************************************************************/
7 /***************************************************************************
8  * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining
11  * a copy of this software and associated documentation files (the
12  * "Software"), to deal in the Software without restriction, including
13  * without limitation the rights to use, copy, modify, merge, publish,
14  * distribute, sublicense, and/or sell copies of the Software, and to
15  * permit persons to whom the Software is furnished to do so, subject to
16  * the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be
19  * included in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
25  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27  * OTHER DEALINGS IN THE SOFTWARE.
28  ***************************************************************************/
29 #ifndef _CEGUIMultiColumnList_h_
30 #define _CEGUIMultiColumnList_h_
31 
32 #include "../Base.h"
33 #include "../Window.h"
34 #include "./ListHeader.h"
35 
36 #if defined(_MSC_VER)
37 # pragma warning(push)
38 # pragma warning(disable : 4251)
39 #endif
40 
41 
42 // Start of CEGUI namespace section
43 namespace CEGUI
44 {
45 
50 struct CEGUIEXPORT MCLGridRef
51 {
52  MCLGridRef(uint r, uint c) : row(r), column(c) {}
53 
54  uint row;
55  uint column;
56 
57  // operators
58  MCLGridRef& operator=(const MCLGridRef& rhs);
59  bool operator<(const MCLGridRef& rhs) const;
60  bool operator<=(const MCLGridRef& rhs) const;
61  bool operator>(const MCLGridRef& rhs) const;
62  bool operator>=(const MCLGridRef& rhs) const;
63  bool operator==(const MCLGridRef& rhs) const;
64  bool operator!=(const MCLGridRef& rhs) const;
65 };
66 
72 {
73 public:
79 
89  virtual Rectf getListRenderArea(void) const = 0;
90 };
91 
96 class CEGUIEXPORT MultiColumnList : public Window
97 {
98 public:
99  static const String EventNamespace;
100  static const String WidgetTypeName;
101 
102  /*************************************************************************
103  Constants
104  *************************************************************************/
105  // Event names
172 
173  /*************************************************************************
174  Child Widget name constants
175  *************************************************************************/
176  static const String VertScrollbarName;
177  static const String HorzScrollbarName;
178  static const String ListHeaderName;
179 
180  /*************************************************************************
181  Enumerations
182  *************************************************************************/
188  {
189  RowSingle, // Any single row may be selected. All items in the row are selected.
190  RowMultiple, // Multiple rows may be selected. All items in the row are selected.
191  CellSingle, // Any single cell may be selected.
192  CellMultiple, // Multiple cells bay be selected.
193  NominatedColumnSingle, // Any single item in a nominated column may be selected.
194  NominatedColumnMultiple, // Multiple items in a nominated column may be selected.
195  ColumnSingle, // Any single column may be selected. All items in the column are selected.
196  ColumnMultiple, // Multiple columns may be selected. All items in the column are selected.
197  NominatedRowSingle, // Any single item in a nominated row may be selected.
198  NominatedRowMultiple // Multiple items in a nominated row may be selected.
199  };
200 
201 
202  /*************************************************************************
203  Accessor Methods
204  *************************************************************************/
213  bool isUserSortControlEnabled(void) const;
214 
215 
223  bool isUserColumnSizingEnabled(void) const;
224 
225 
233  bool isUserColumnDraggingEnabled(void) const;
234 
235 
243  uint getColumnCount(void) const;
244 
245 
253  uint getRowCount(void) const;
254 
255 
266  uint getSortColumn(void) const;
267  uint getSortColumnID(void) const;
268 
281  uint getColumnWithID(uint col_id) const;
282 
283 
296  uint getColumnWithHeaderText(const String& text) const;
297 
298 
307 
308 
321  UDim getColumnHeaderWidth(uint col_idx) const;
322 
323 
332 
333 
347 
348 
361  uint getItemRowIndex(const ListboxItem* item) const;
362 
363 
376  uint getItemColumnIndex(const ListboxItem* item) const;
377 
378 
392 
393 
407 
408 
425  bool isListboxItemInColumn(const ListboxItem* item, uint col_idx) const;
426 
427 
444  bool isListboxItemInRow(const ListboxItem* item, uint row_idx) const;
445 
446 
458  bool isListboxItemInList(const ListboxItem* item) const;
459 
460 
479  ListboxItem* findColumnItemWithText(const String& text, uint col_idx, const ListboxItem* start_item) const;
480 
481 
500  ListboxItem* findRowItemWithText(const String& text, uint row_idx, const ListboxItem* start_item) const;
501 
502 
521  ListboxItem* findListItemWithText(const String& text, const ListboxItem* start_item) const;
522 
523 
535 
536 
552  ListboxItem* getNextSelected(const ListboxItem* start_item) const;
553 
554 
562  uint getSelectedCount(void) const;
563 
564 
578  bool isItemSelected(const MCLGridRef& grid_ref) const;
579 
580 
593 
594 
603  uint getNominatedSelectionColumn(void) const;
604 
605 
614  uint getNominatedSelectionRow(void) const;
615 
616 
625 
626 
635  bool isVertScrollbarAlwaysShown(void) const;
636 
637 
646  bool isHorzScrollbarAlwaysShown(void) const;
647 
648 
661  uint getColumnID(uint col_idx) const;
662 
663 
676  uint getRowID(uint row_idx) const;
677 
678 
691  uint getRowWithID(uint row_id) const;
692 
693 
704 
705 
718 
731 
744 
749  float getTotalRowsHeight(void) const;
750 
755  float getWidestColumnItemWidth(uint col_idx) const;
756 
761  float getHighestRowItemHeight(uint row_idx) const;
762 
773 
774  /*************************************************************************
775  Manipulator Methods
776  *************************************************************************/
787  virtual void initialiseComponents(void);
788 
789 
796  void resetList(void);
797 
798 
815  void addColumn(const String& text, uint col_id, const UDim& width);
816  void addColumn(const String& value);
817 
838  void insertColumn(const String& text, uint col_id, const UDim& width, uint position);
839 
840 
853  void removeColumn(uint col_idx);
854 
855 
868  void removeColumnWithID(uint col_id);
869 
870 
886  void moveColumn(uint col_idx, uint position);
887 
888 
904  void moveColumnWithID(uint col_id, uint position);
905 
906 
921  uint addRow(uint row_id = 0);
922 
923 
946  uint addRow(ListboxItem* item, uint col_id, uint row_id = 0);
947 
948 
967  uint insertRow(uint row_idx, uint row_id = 0);
968 
969 
996  uint insertRow(ListboxItem* item, uint col_id, uint row_idx, uint row_id = 0);
997 
998 
1011  void removeRow(uint row_idx);
1012 
1013 
1029  void setItem(ListboxItem* item, const MCLGridRef& position);
1030 
1031 
1050  void setItem(ListboxItem* item, uint col_id, uint row_idx);
1051 
1052 
1066 
1067 
1081 
1082 
1095  void setNominatedSelectionColumn(uint col_idx);
1096 
1097 
1110  void setNominatedSelectionRow(uint row_idx);
1111 
1112 
1124 
1125 
1138  void setSortColumn(uint col_idx);
1139 
1140 
1153  void setSortColumnByID(uint col_id);
1154 
1155 
1167  void setShowVertScrollbar(bool setting);
1168 
1169 
1181  void setShowHorzScrollbar(bool setting);
1182 
1183 
1192 
1193 
1214  void setItemSelectState(ListboxItem* item, bool state);
1215 
1216 
1237  void setItemSelectState(const MCLGridRef& grid_ref, bool state);
1238 
1239 
1249 
1250 
1266  void setColumnHeaderWidth(uint col_idx, const UDim& width);
1267 
1268 
1280  void setUserSortControlEnabled(bool setting);
1281 
1282 
1294  void setUserColumnSizingEnabled(bool setting);
1295 
1296 
1305  void setUserColumnDraggingEnabled(bool setting);
1306 
1307 
1321  void autoSizeColumnHeader(uint col_idx);
1322 
1323 
1339  void setRowID(uint row_idx, uint row_id);
1340 
1357 
1370  void ensureItemIsVisible(const MCLGridRef& grid_ref);
1371 
1388 
1405 
1417  void ensureRowIsVisible(uint row_idx);
1418 
1430  void ensureColumnIsVisible(uint column_idx);
1431 
1444  void setAutoSizeColumnUsesHeader(bool include_header);
1445 
1446 
1447  /*************************************************************************
1448  Construction and Destruction
1449  *************************************************************************/
1454  MultiColumnList(const String& type, const String& name);
1455 
1456 
1461  virtual ~MultiColumnList(void);
1462 
1463 
1464 protected:
1465  /*************************************************************************
1466  Implementation Functions (abstract interface)
1467  *************************************************************************/
1477  //virtual Rect getListRenderArea_impl(void) const = 0;
1478 
1479 
1480  /*************************************************************************
1481  Implementation Functions
1482  *************************************************************************/
1488 
1489 
1494  bool selectRange(const MCLGridRef& start, const MCLGridRef& end);
1495 
1496 
1505 
1506 
1516 
1517 
1524  bool setItemSelectState_impl(const MCLGridRef grid_ref, bool state);
1525 
1526 
1531  void setSelectForItemsInRow(uint row_idx, bool state);
1532 
1533 
1538  void setSelectForItemsInColumn(uint col_idx, bool state);
1539 
1540 
1548  void moveColumn_impl(uint col_idx, uint position);
1549 
1550 
1562  bool resetList_impl(void);
1563 
1564  // overrides function in base class.
1565  virtual bool validateWindowRenderer(const WindowRenderer* renderer) const;
1566 
1567  // overrides function in base class.
1568  int writePropertiesXML(XMLSerializer& xml_stream) const;
1569 
1574  void resortList();
1575 
1576  /*************************************************************************
1577  New event handlers for multi column list
1578  *************************************************************************/
1584 
1585 
1591 
1592 
1598 
1599 
1605 
1606 
1612 
1613 
1619 
1620 
1626 
1627 
1633 
1634 
1640 
1641 
1647 
1648 
1654 
1655 
1656  /*************************************************************************
1657  Overridden Event handlers
1658  *************************************************************************/
1659  virtual void onFontChanged(WindowEventArgs& e);
1660  virtual void onSized(ElementEventArgs& e);
1662  virtual void onMouseWheel(MouseEventArgs& e);
1663 
1664 
1665  /*************************************************************************
1666  Handlers for subscribed events
1667  *************************************************************************/
1668  bool handleHeaderScroll(const EventArgs& e);
1669  bool handleHeaderSegMove(const EventArgs& e);
1670  bool handleColumnSizeChange(const EventArgs& e);
1671  bool handleHorzScrollbar(const EventArgs& e);
1672  bool handleVertScrollbar(const EventArgs& e);
1673  bool handleSortColumnChange(const EventArgs& e);
1674  bool handleSortDirectionChange(const EventArgs& e);
1675  bool handleHeaderSegDblClick(const EventArgs& e);
1676 
1682  struct ListRow
1683  {
1684  typedef std::vector<ListboxItem*
1685  CEGUI_VECTOR_ALLOC(ListboxItem*)> RowItems;
1686  RowItems d_items;
1687  uint d_sortColumn;
1688  uint d_rowID;
1689 
1690  // operators
1691  ListboxItem* const& operator[](uint idx) const {return d_items[idx];}
1692  ListboxItem*& operator[](uint idx) {return d_items[idx];}
1693  bool operator<(const ListRow& rhs) const;
1694  bool operator>(const ListRow& rhs) const;
1695  };
1696 
1697 
1702  static bool pred_descend(const ListRow& a, const ListRow& b);
1703 
1704 
1705  /*************************************************************************
1706  Implementation Data
1707  *************************************************************************/
1708  // scrollbar settings.
1711 
1712  // selection abilities.
1722 
1724 
1725  // storage of items in the list box.
1726  typedef std::vector<ListRow
1727  CEGUI_VECTOR_ALLOC(ListRow)> ListItemGrid;
1728  ListItemGrid d_grid;
1729 
1732 
1733  friend class MultiColumnListWindowRenderer;
1734 
1735 
1736 private:
1737  /*************************************************************************
1738  Private methods
1739  *************************************************************************/
1740  void addMultiColumnListProperties(void);
1741 };
1742 
1743 
1744 template<>
1745 class PropertyHelper<MultiColumnList::SelectionMode>
1746 {
1747 public:
1751  typedef String string_return_type;
1752 
1753  static const String& getDataTypeName()
1754  {
1755  static String type("SelectionMode");
1756 
1757  return type;
1758  }
1759 
1760  static return_type fromString(const String& str)
1761  {
1763 
1764  if (str == "RowMultiple")
1765  {
1766  mode = MultiColumnList::RowMultiple;
1767  }
1768  else if (str == "ColumnSingle")
1769  {
1770  mode = MultiColumnList::ColumnSingle;
1771  }
1772  else if (str == "ColumnMultiple")
1773  {
1774  mode = MultiColumnList::ColumnMultiple;
1775  }
1776  else if (str == "CellSingle")
1777  {
1778  mode = MultiColumnList::CellSingle;
1779  }
1780  else if (str == "CellMultiple")
1781  {
1782  mode = MultiColumnList::CellMultiple;
1783  }
1784  else if (str == "NominatedColumnSingle")
1785  {
1786  mode = MultiColumnList::NominatedColumnSingle;
1787  }
1788  else if (str == "NominatedColumnMultiple")
1789  {
1790  mode = MultiColumnList::NominatedColumnMultiple;
1791  }
1792  else if (str == "NominatedRowSingle")
1793  {
1794  mode = MultiColumnList::NominatedRowSingle;
1795  }
1796  else if (str == "NominatedRowMultiple")
1797  {
1798  mode = MultiColumnList::NominatedRowMultiple;
1799  }
1800  else
1801  {
1802  mode = MultiColumnList::RowSingle;
1803  }
1804  return mode;
1805  }
1806 
1807  static string_return_type toString(pass_type val)
1808  {
1809  switch(val)
1810  {
1811  case MultiColumnList::RowMultiple:
1812  return String("RowMultiple");
1813  break;
1814 
1815  case MultiColumnList::ColumnSingle:
1816  return String("ColumnSingle");
1817  break;
1818 
1819  case MultiColumnList::ColumnMultiple:
1820  return String("ColumnMultiple");
1821  break;
1822 
1823  case MultiColumnList::CellSingle:
1824  return String("CellSingle");
1825  break;
1826 
1827  case MultiColumnList::CellMultiple:
1828  return String("CellMultiple");
1829  break;
1830 
1831  case MultiColumnList::NominatedColumnSingle:
1832  return String("NominatedColumnSingle");
1833  break;
1834 
1835  case MultiColumnList::NominatedColumnMultiple:
1836  return String("NominatedColumnMultiple");
1837  break;
1838 
1839  case MultiColumnList::NominatedRowSingle:
1840  return String("NominatedRowSingle");
1841  break;
1842 
1843  case MultiColumnList::NominatedRowMultiple:
1844  return String("NominatedRowMultiple");
1845  break;
1846 
1847  default:
1848  return String("RowSingle");
1849  break;
1850  }
1851  }
1852 };
1853 
1854 
1855 } // End of CEGUI namespace section
1856 
1857 #if defined(_MSC_VER)
1858 # pragma warning(pop)
1859 #endif
1860 
1861 #endif // end of guard _CEGUIMultiColumnList_h_
CEGUI::MultiColumnList::validateWindowRenderer
virtual bool validateWindowRenderer(const WindowRenderer *renderer) const
Function used in checking if a WindowRenderer is valid for this window.
CEGUI::MultiColumnList::EventNamespace
static const String EventNamespace
Namespace for global events.
Definition: widgets/MultiColumnList.h:99
CEGUI::MultiColumnList::configureScrollbars
void configureScrollbars(void)
Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used fo...
CEGUI::MultiColumnList::getWidestColumnItemWidth
float getWidestColumnItemWidth(uint col_idx) const
Return the pixel width of the widest item in the given column.
CEGUI::MultiColumnList::setNominatedSelectionColumn
void setNominatedSelectionColumn(uint col_idx)
Set the column to be used for the NominatedColumn* selection modes.
CEGUI::MultiColumnList::onMouseButtonDown
virtual void onMouseButtonDown(MouseEventArgs &e)
Handler called when a mouse button has been depressed within this window's area.
CEGUI::MultiColumnList::isHorzScrollbarAlwaysShown
bool isHorzScrollbarAlwaysShown(void) const
Return whether the horizontal scroll bar is always shown.
CEGUI::MultiColumnList::d_lastSelected
ListboxItem * d_lastSelected
holds pointer to the last selected item (used in range selections)
Definition: widgets/MultiColumnList.h:1721
CEGUI::MultiColumnList::EventNominatedSelectColumnChanged
static const String EventNominatedSelectColumnChanged
Definition: widgets/MultiColumnList.h:117
CEGUI::MultiColumnList::getTotalColumnHeadersWidth
UDim getTotalColumnHeadersWidth(void) const
Return the total width of all column headers.
CEGUI::MultiColumnList::getNominatedSelectionColumn
uint getNominatedSelectionColumn(void) const
Return the index of the currently set nominated selection column to be used when in one of the Nomina...
CEGUI::MultiColumnList::getItemAtPoint
ListboxItem * getItemAtPoint(const Vector2f &pt) const
Return the ListboxItem under the given window local pixel co-ordinate.
CEGUI::MultiColumnList::getTotalRowsHeight
float getTotalRowsHeight(void) const
Return the sum of all row heights in pixels.
CEGUI::MultiColumnList::WidgetTypeName
static const String WidgetTypeName
Window factory name.
Definition: widgets/MultiColumnList.h:100
CEGUI::Scrollbar
Base scroll bar class.
Definition: widgets/Scrollbar.h:90
CEGUI::MultiColumnList::onSelectionModeChanged
virtual void onSelectionModeChanged(WindowEventArgs &e)
Handler called when the selection mode of the list box changes.
CEGUI::MultiColumnList::setRowID
void setRowID(uint row_idx, uint row_id)
Set the ID code assigned to a given row.
CEGUI::MultiColumnList::addColumn
void addColumn(const String &text, uint col_id, const UDim &width)
Add a column to the list box.
CEGUI::MultiColumnList::onHorzScrollbarModeChanged
virtual void onHorzScrollbarModeChanged(WindowEventArgs &e)
Handler called when the horizontal scroll bar 'force' mode is changed.
CEGUI::MultiColumnList::d_fullRowSelect
bool d_fullRowSelect
All items in a row are selected.
Definition: widgets/MultiColumnList.h:1717
CEGUI::MultiColumnList::d_autoSizeColumnUsesHeader
bool d_autoSizeColumnUsesHeader
whether header size will be considered when auto-sizing columns.
Definition: widgets/MultiColumnList.h:1731
CEGUI::MultiColumnList::getItemColumnIndex
uint getItemColumnIndex(const ListboxItem *item) const
Return the current zero based index of the column that contains item.
CEGUI::MultiColumnList::ensureRowIsVisible
void ensureRowIsVisible(uint row_idx)
Ensure that the row with index row_idx is visible within the multi-column listbox.
CEGUI::MultiColumnList::ensureItemIsVisible
void ensureItemIsVisible(const MCLGridRef &grid_ref)
Ensure the item at the specified grid coordinate is visible within the multi-column listbox.
CEGUI::MultiColumnList::insertRow
uint insertRow(ListboxItem *item, uint col_id, uint row_idx, uint row_id=0)
Insert a row into the list box, and set the item in the column with ID col_id to item.
CEGUI::MultiColumnList::onSortColumnChanged
virtual void onSortColumnChanged(WindowEventArgs &e)
Handler called when the sort column changes.
CEGUI::MultiColumnList::d_selectMode
SelectionMode d_selectMode
Holds selection mode (represented by settings below).
Definition: widgets/MultiColumnList.h:1713
CEGUI::MultiColumnList::getNominatedSelectionRow
uint getNominatedSelectionRow(void) const
Return the index of the currently set nominated selection row to be used when in one of the Nominated...
CEGUI::MultiColumnList::d_nominatedSelectRow
uint d_nominatedSelectRow
Nominated row for single row selection.
Definition: widgets/MultiColumnList.h:1715
CEGUI::MultiColumnList::ListRow
Struct used internally to represent a row in the list and also to ease sorting of the rows.
Definition: widgets/MultiColumnList.h:1683
CEGUI::MultiColumnList::isUserColumnDraggingEnabled
bool isUserColumnDraggingEnabled(void) const
Return whether the user may modify the order of the columns.
CEGUI::MultiColumnList::isItemSelected
bool isItemSelected(const MCLGridRef &grid_ref) const
Return whether the ListboxItem at grid_ref is selected.
CEGUI::MultiColumnList::getColumnCount
uint getColumnCount(void) const
Return the number of columns in the multi-column list.
CEGUI::MultiColumnList::d_useNominatedRow
bool d_useNominatedRow
true if we use a nominated row to select.
Definition: widgets/MultiColumnList.h:1719
CEGUI::MultiColumnList::ensureItemColumnIsVisible
void ensureItemColumnIsVisible(const ListboxItem *item)
Ensure that the column of item is visible within the multi-column listbox.
CEGUI::MultiColumnList::setShowVertScrollbar
void setShowVertScrollbar(bool setting)
Set whether the vertical scroll bar should always be shown, or just when needed.
CEGUI::ElementEventArgs
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: Element.h:211
CEGUI::MultiColumnList::setAutoSizeColumnUsesHeader
void setAutoSizeColumnUsesHeader(bool include_header)
Instruct column auto-sizing (autoSizeColumnHeader()) to also use the list header segment size.
CEGUI::MultiColumnList::getItemAtGridReference
ListboxItem * getItemAtGridReference(const MCLGridRef &grid_ref) const
Return a pointer to the ListboxItem at the specified grid reference.
CEGUI::operator!=
bool CEGUIEXPORT operator!=(const String &str1, const String &str2)
Return true if String str1 is not equal to String str2.
CEGUI::MultiColumnList::isUserColumnSizingEnabled
bool isUserColumnSizingEnabled(void) const
Return whether the user may size column segments.
CEGUI::MultiColumnList::onListColumnSized
virtual void onListColumnSized(WindowEventArgs &e)
Handler called when a column is sized.
CEGUI::MultiColumnList::onNominatedSelectColumnChanged
virtual void onNominatedSelectColumnChanged(WindowEventArgs &e)
Handler called when the nominated selection column changes.
CEGUI::MultiColumnList::moveColumn
void moveColumn(uint col_idx, uint position)
Move the column at index col_idx so it is at index position.
CEGUI::XMLSerializer
Class used to create XML Document.
Definition: XMLSerializer.h:87
CEGUI::MultiColumnList::d_grid
ListItemGrid d_grid
Holds the list box data.
Definition: widgets/MultiColumnList.h:1728
CEGUI::MultiColumnList::autoSizeColumnHeader
void autoSizeColumnHeader(uint col_idx)
Automatically determines the "best fit" size for the specified column and sets the column width to th...
CEGUI::MultiColumnList::EventSelectionModeChanged
static const String EventSelectionModeChanged
Definition: widgets/MultiColumnList.h:111
CEGUI::MultiColumnList::EventListColumnMoved
static const String EventListColumnMoved
Definition: widgets/MultiColumnList.h:171
CEGUI::MultiColumnList::d_multiSelect
bool d_multiSelect
Allow multiple selections.
Definition: widgets/MultiColumnList.h:1716
CEGUI::MultiColumnList::setSortColumn
void setSortColumn(uint col_idx)
Set the column to be used as the sort key.
CEGUI::MultiColumnList::onSized
virtual void onSized(ElementEventArgs &e)
Handler called when the window's size changes.
CEGUI::MCLGridRef::column
uint column
Zero based column index.
Definition: widgets/MultiColumnList.h:55
CEGUI::MultiColumnList::EventListColumnSized
static const String EventListColumnSized
Definition: widgets/MultiColumnList.h:165
CEGUI
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
CEGUI::operator>
bool CEGUIEXPORT operator>(const String &str1, const String &str2)
Return true if String str1 is lexicographically greater than String str2.
CEGUI::MultiColumnList::ensureColumnIsVisible
void ensureColumnIsVisible(uint column_idx)
Ensure that the column with ID column_idx is visible within the multi-column listbox.
CEGUI::MultiColumnList::getColumnWithHeaderText
uint getColumnWithHeaderText(const String &text) const
Return the zero based index of the column whos header text matches the specified text.
CEGUI::MultiColumnList::findListItemWithText
ListboxItem * findListItemWithText(const String &text, const ListboxItem *start_item) const
Return the ListboxItem that has the text string text.
CEGUI::MultiColumnList::insertColumn
void insertColumn(const String &text, uint col_id, const UDim &width, uint position)
Insert a new column in the list.
CEGUI::MouseEventArgs
EventArgs based class that is used for objects passed to input event handlers concerning mouse input.
Definition: InputEvent.h:281
CEGUI::MultiColumnList::onVertScrollbarModeChanged
virtual void onVertScrollbarModeChanged(WindowEventArgs &e)
Handler called when the vertical scroll bar 'force' mode is changed.
CEGUI::MultiColumnList::getAutoSizeColumnUsesHeader
bool getAutoSizeColumnUsesHeader() const
Get whether or not column auto-sizing (autoSizeColumnHeader()) will use the list header segment size.
CEGUI::MultiColumnList::setItemSelectState_impl
bool setItemSelectState_impl(const MCLGridRef grid_ref, bool state)
Set select state for the given item. This appropriately selects other items depending upon the select...
CEGUI::MultiColumnListWindowRenderer
Base class for the multi column list window renderer.
Definition: widgets/MultiColumnList.h:72
CEGUI::MultiColumnList::~MultiColumnList
virtual ~MultiColumnList(void)
Destructor for the multi-column list base class.
CEGUI::MultiColumnList::insertRow
uint insertRow(uint row_idx, uint row_id=0)
Insert an empty row into the list box.
CEGUI::MultiColumnList::getSelectionMode
MultiColumnList::SelectionMode getSelectionMode(void) const
Return the currently set selection mode.
CEGUI::MultiColumnList::selectRange
bool selectRange(const MCLGridRef &start, const MCLGridRef &end)
select all strings between positions start and end. (inclusive). Returns true if something was modifi...
CEGUI::MCLGridRef
Simple grid index structure.
Definition: widgets/MultiColumnList.h:51
CEGUI::MultiColumnList::getFirstSelectedItem
ListboxItem * getFirstSelectedItem(void) const
Return a pointer to the first selected ListboxItem attached to this list box.
CEGUI::MultiColumnList::removeColumnWithID
void removeColumnWithID(uint col_id)
Removes a column from the list box. This will cause any ListboxItem using the autoDelete option in th...
CEGUI::MultiColumnList::d_nominatedSelectCol
uint d_nominatedSelectCol
Nominated column for single column selection.
Definition: widgets/MultiColumnList.h:1714
CEGUI::Vector2< float >
CEGUI::MultiColumnList::clearAllSelections_impl
bool clearAllSelections_impl(void)
Clear the selected state for all items (implementation)
CEGUI::MultiColumnList::onFontChanged
virtual void onFontChanged(WindowEventArgs &e)
Handler called when the window's font is changed.
CEGUI::MultiColumnList::isUserSortControlEnabled
bool isUserSortControlEnabled(void) const
Return whether user manipulation of the sort column and direction are enabled.
CEGUI::MultiColumnList::getColumnWithID
uint getColumnWithID(uint col_id) const
Return the zero based column index of the column with the specified ID.
CEGUI::MultiColumnList::ensureItemRowIsVisible
void ensureItemRowIsVisible(const ListboxItem *item)
Ensure that the row of the item is visible within the multi-column listbox.
CEGUI::WindowEventArgs
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: InputEvent.h:252
CEGUI::MultiColumnList::EventSelectionChanged
static const String EventSelectionChanged
Definition: widgets/MultiColumnList.h:141
CEGUI::MultiColumnListWindowRenderer::MultiColumnListWindowRenderer
MultiColumnListWindowRenderer(const String &name)
Constructor.
CEGUI::MultiColumnList::isListboxItemInColumn
bool isListboxItemInColumn(const ListboxItem *item, uint col_idx) const
return whether ListboxItem item is attached to the column at index col_idx.
CEGUI::MultiColumnList::getSortColumn
uint getSortColumn(void) const
Return the zero based index of the current sort column. There must be at least one column to successf...
CEGUI::MultiColumnList::EventSortDirectionChanged
static const String EventSortDirectionChanged
Definition: widgets/MultiColumnList.h:159
CEGUI::MultiColumnList::setNominatedSelectionRow
void setNominatedSelectionRow(uint row_idx)
Set the row to be used for the NominatedRow* selection modes.
CEGUI::MultiColumnList::addRow
uint addRow(uint row_id=0)
Add an empty row to the list box.
CEGUI::MultiColumnList::onListContentsChanged
virtual void onListContentsChanged(WindowEventArgs &e)
Handler called when the list contents is changed.
CEGUI::MultiColumnList::d_forceVertScroll
bool d_forceVertScroll
true if vertical scrollbar should always be displayed
Definition: widgets/MultiColumnList.h:1709
CEGUI::MultiColumnList::pred_descend
static bool pred_descend(const ListRow &a, const ListRow &b)
std algorithm predicate used for sorting in descending order
CEGUI::MultiColumnList::d_fullColSelect
bool d_fullColSelect
All items in a column are selected.
Definition: widgets/MultiColumnList.h:1718
CEGUI::MultiColumnList::setItem
void setItem(ListboxItem *item, const MCLGridRef &position)
Set the ListboxItem for grid reference position.
CEGUI::operator<
bool CEGUIEXPORT operator<(const String &str1, const String &str2)
Return true if String str1 is lexicographically less than String str2.
CEGUI::MultiColumnList::EventListContentsChanged
static const String EventListContentsChanged
Definition: widgets/MultiColumnList.h:147
CEGUI::MultiColumnList::setSelectForItemsInRow
void setSelectForItemsInRow(uint row_idx, bool state)
Set select state for all items in the given row.
CEGUI::MultiColumnList::setUserColumnSizingEnabled
void setUserColumnSizingEnabled(bool setting)
Set whether the user may size column segments.
CEGUI::MultiColumnList::moveColumn_impl
void moveColumn_impl(uint col_idx, uint position)
Move the column at index col_idx so it is at index position. Implementation version which does not mo...
CEGUI::MultiColumnList::clearAllSelections
void clearAllSelections(void)
Removed the selected state from any currently selected ListboxItem attached to the list.
CEGUI::MultiColumnList::setSortColumnByID
void setSortColumnByID(uint col_id)
Set the column to be used as the sort key.
CEGUI::MultiColumnList::VertScrollbarName
static const String VertScrollbarName
Widget name for the vertical scrollbar component.
Definition: widgets/MultiColumnList.h:176
CEGUI::MultiColumnList::getHeaderSegmentForColumn
ListHeaderSegment & getHeaderSegmentForColumn(uint col_idx) const
Return the ListHeaderSegment object for the specified column.
CEGUI::MultiColumnList::setItemSelectState
void setItemSelectState(const MCLGridRef &grid_ref, bool state)
Sets or clears the selected state of the ListboxItem at the given grid reference.
CEGUI::MCLGridRef::row
uint row
Zero based row index.
Definition: widgets/MultiColumnList.h:54
CEGUI::MultiColumnList::EventNominatedSelectRowChanged
static const String EventNominatedSelectRowChanged
Definition: widgets/MultiColumnList.h:123
CEGUI::MultiColumnList::EventVertScrollbarModeChanged
static const String EventVertScrollbarModeChanged
Definition: widgets/MultiColumnList.h:129
CEGUI::MultiColumnList::getListRenderArea
Rectf getListRenderArea(void) const
Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used fo...
CEGUI::MultiColumnList::removeColumn
void removeColumn(uint col_idx)
Removes a column from the list box. This will cause any ListboxItem using the autoDelete option in th...
CEGUI::MultiColumnList::getItemRowIndex
uint getItemRowIndex(const ListboxItem *item) const
Return the zero based index of the Row that contains item.
CEGUI::MultiColumnList::SelectionMode
SelectionMode
Enumerated values for the selection modes possible with a Multi-column list.
Definition: widgets/MultiColumnList.h:188
CEGUI::MultiColumnList::HorzScrollbarName
static const String HorzScrollbarName
Widget name for the horizontal scrollbar component.
Definition: widgets/MultiColumnList.h:177
CEGUI::MultiColumnList::getRowID
uint getRowID(uint row_idx) const
Return the ID code assigned to the requested row.
CEGUI::MultiColumnList::initialiseComponents
virtual void initialiseComponents(void)
Initialise the Window based object ready for use.
CEGUI::MultiColumnList::setSortDirection
void setSortDirection(ListHeaderSegment::SortDirection direction)
Set the sort direction to be used.
CEGUI::MultiColumnList::setUserSortControlEnabled
void setUserSortControlEnabled(bool setting)
Set whether user manipulation of the sort column and direction are enabled.
CEGUI::MultiColumnList::setSelectionMode
void setSelectionMode(MultiColumnList::SelectionMode sel_mode)
Set the selection mode for the list box.
CEGUI::MultiColumnList::isListboxItemInList
bool isListboxItemInList(const ListboxItem *item) const
return whether ListboxItem item is attached to the list box.
CEGUI::MultiColumnList::moveColumnWithID
void moveColumnWithID(uint col_id, uint position)
Move the column with ID col_id so it is at index position.
CEGUI::operator==
bool CEGUIEXPORT operator==(const String &str1, const String &str2)
Return true if String str1 is equal to String str2.
CEGUI::MultiColumnList::EventSortColumnChanged
static const String EventSortColumnChanged
Definition: widgets/MultiColumnList.h:153
CEGUI::MultiColumnList::getNextSelected
ListboxItem * getNextSelected(const ListboxItem *start_item) const
Return a pointer to the next selected ListboxItem after start_item.
CEGUI::MultiColumnList::setNominatedSelectionColumnID
void setNominatedSelectionColumnID(uint col_id)
Set the column to be used for the NominatedColumn* selection modes.
CEGUI::MultiColumnList::ListHeaderName
static const String ListHeaderName
Widget name for the list header component.
Definition: widgets/MultiColumnList.h:178
CEGUI::MultiColumnList::onSelectionChanged
virtual void onSelectionChanged(WindowEventArgs &e)
Handler called when the current selection changes.
CEGUI::MultiColumnList::setItem
void setItem(ListboxItem *item, uint col_id, uint row_idx)
Set the ListboxItem for the column with ID col_id in row row_idx.
CEGUI::MultiColumnList::addRow
uint addRow(ListboxItem *item, uint col_id, uint row_id=0)
Add a row to the list box, and set the item in the column with ID col_id to item.
CEGUI::MultiColumnList::setShowHorzScrollbar
void setShowHorzScrollbar(bool setting)
Set whether the horizontal scroll bar should always be shown, or just when needed.
CEGUI::MultiColumnList::findRowItemWithText
ListboxItem * findRowItemWithText(const String &text, uint row_idx, const ListboxItem *start_item) const
Return the ListboxItem in row row_idx that has the text string text.
CEGUI::MultiColumnList::onListColumnMoved
virtual void onListColumnMoved(WindowEventArgs &e)
Handler called when the column order is changed.
CEGUI::MultiColumnList::getColumnHeaderWidth
UDim getColumnHeaderWidth(uint col_idx) const
Return the width of the specified column header (and therefore the column itself).
CEGUI::MultiColumnList::ensureItemIsVisible
void ensureItemIsVisible(const ListboxItem *item)
Ensure the specified item is made visible within the multi-column listbox.
CEGUI::Window
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: Window.h:151
CEGUI::MultiColumnList::getHorzScrollbar
Scrollbar * getHorzScrollbar() const
Return a pointer to the horizontal scrollbar component widget for this MultiColumnList.
CEGUI::MultiColumnList::getNominatedSelectionColumnID
uint getNominatedSelectionColumnID(void) const
Return the ID of the currently set nominated selection column to be used when in one of the Nominated...
CEGUI::operator>=
bool CEGUIEXPORT operator>=(const String &str1, const String &str2)
Return true if String str1 is lexicographically greater than or equal to String str2.
CEGUI::MultiColumnList::isVertScrollbarAlwaysShown
bool isVertScrollbarAlwaysShown(void) const
Return whether the vertical scroll bar is always shown.
CEGUI::MultiColumnList::getListHeader
ListHeader * getListHeader() const
Return a pointer to the list header component widget for this MultiColumnList.
CEGUI::WindowRenderer
Base-class for the assignable WindowRenderer object.
Definition: WindowRenderer.h:52
CEGUI::MultiColumnList::onMouseWheel
virtual void onMouseWheel(MouseEventArgs &e)
Handler called when the mouse wheel (z-axis) position changes within this window's area.
CEGUI::MultiColumnList::MultiColumnList
MultiColumnList(const String &type, const String &name)
Constructor for the Multi-column list base class.
CEGUI::MultiColumnList::resortList
void resortList()
Causes the internal list to be (re)sorted.
CEGUI::MultiColumnList::d_columnCount
uint d_columnCount
keeps track of the number of columns.
Definition: widgets/MultiColumnList.h:1723
CEGUI::ListHeaderSegment::SortDirection
SortDirection
Enumeration of possible values for sorting direction used with ListHeaderSegment classes.
Definition: widgets/ListHeaderSegment.h:133
CEGUI::ListHeaderSegment
Base class for list header segment window.
Definition: widgets/ListHeaderSegment.h:50
CEGUI::MultiColumnList::d_useNominatedCol
bool d_useNominatedCol
true if we use a nominated col to select.
Definition: widgets/MultiColumnList.h:1720
CEGUI::MultiColumnList::getColumnID
uint getColumnID(uint col_idx) const
Return the ID code assigned to the requested column.
CEGUI::String
String class used within the GUI system.
Definition: String.h:64
CEGUI::MultiColumnList::getRowWithID
uint getRowWithID(uint row_id) const
Return the zero based row index of the row with the specified ID.
CEGUI::MultiColumnList::resetList
void resetList(void)
Remove all items from the list.
CEGUI::ListHeader
Base class for the multi column list header widget.
Definition: widgets/ListHeader.h:104
CEGUI::MultiColumnList::getVertScrollbar
Scrollbar * getVertScrollbar() const
Return a pointer to the vertical scrollbar component widget for this MultiColumnList.
CEGUI::MultiColumnList::onSortDirectionChanged
virtual void onSortDirectionChanged(WindowEventArgs &e)
Handler called when the sort direction changes.
CEGUI::MultiColumnList::resetList_impl
bool resetList_impl(void)
Remove all items from the list.
CEGUI::MultiColumnList::onNominatedSelectRowChanged
virtual void onNominatedSelectRowChanged(WindowEventArgs &e)
Handler called when the nominated selection row changes.
CEGUI::MultiColumnList::getHighestRowItemHeight
float getHighestRowItemHeight(uint row_idx) const
Return, in pixels, the height of the highest item in the given row.
CEGUI::MultiColumnList::d_forceHorzScroll
bool d_forceHorzScroll
true if horizontal scrollbar should always be displayed
Definition: widgets/MultiColumnList.h:1710
CEGUI::MultiColumnList::isListboxItemInRow
bool isListboxItemInRow(const ListboxItem *item, uint row_idx) const
return whether ListboxItem item is attached to the row at index row_idx.
CEGUI::MultiColumnList::removeRow
void removeRow(uint row_idx)
Remove the list box row with index row_idx. Any ListboxItem in row row_idx using autoDelete mode will...
CEGUI::Rect< float >
CEGUI::MultiColumnList::setColumnHeaderWidth
void setColumnHeaderWidth(uint col_idx, const UDim &width)
Set the width of the specified column header (and therefore the column itself).
CEGUI::MultiColumnList::findColumnItemWithText
ListboxItem * findColumnItemWithText(const String &text, uint col_idx, const ListboxItem *start_item) const
Return the ListboxItem in column col_idx that has the text string text.
CEGUI::MultiColumnList::handleUpdatedItemData
void handleUpdatedItemData(void)
Inform the list box that one or more attached ListboxItems have been externally modified,...
CEGUI::MultiColumnList::getItemGridReference
MCLGridRef getItemGridReference(const ListboxItem *item) const
Return the grid reference for item.
CEGUI::MultiColumnList
Base class for the multi column list widget.
Definition: widgets/MultiColumnList.h:97
CEGUI::MultiColumnList::setUserColumnDraggingEnabled
void setUserColumnDraggingEnabled(bool setting)
Set whether the user may modify the order of the columns.
CEGUI::MultiColumnList::getSortDirection
ListHeaderSegment::SortDirection getSortDirection(void) const
Return the currently set sort direction.
CEGUI::MultiColumnList::getRowCount
uint getRowCount(void) const
Return the number of rows in the multi-column list.
CEGUI::PropertyHelper
Helper class used to convert various data types to and from the format expected in Property strings.
Definition: ForwardRefs.h:84
CEGUI::MultiColumnList::setSelectForItemsInColumn
void setSelectForItemsInColumn(uint col_idx, bool state)
Set select state for all items in the given column.
CEGUI::MultiColumnList::EventHorzScrollbarModeChanged
static const String EventHorzScrollbarModeChanged
Definition: widgets/MultiColumnList.h:135
CEGUI::operator<=
bool CEGUIEXPORT operator<=(const String &str1, const String &str2)
Return true if String str1 is lexicographically less than or equal to String str2.
CEGUI::MultiColumnListWindowRenderer::getListRenderArea
virtual Rectf getListRenderArea(void) const =0
Return a Rect object describing, in un-clipped pixels, the window relative area that is to be used fo...
CEGUI::EventArgs
Base class used as the argument to all subscribers Event object.
Definition: EventArgs.h:51
CEGUI::MultiColumnList::getSelectedCount
uint getSelectedCount(void) const
Return the number of selected ListboxItems attached to this list box.
CEGUI::UDim
Dimension that has both a relative 'scale' portion and and absolute 'offset' portion.
Definition: UDim.h:94
CEGUI::ListboxItem
Base class for list box items.
Definition: ListboxItem.h:53
CEGUI::MultiColumnList::setItemSelectState
void setItemSelectState(ListboxItem *item, bool state)
Sets or clears the selected state of the given ListboxItem which must be attached to the list.