30 #ifndef _CEGUIMultiColumnList_h_
31 #define _CEGUIMultiColumnList_h_
33 #include "../CEGUIBase.h"
34 #include "../CEGUIWindow.h"
35 #include "CEGUIListHeader.h"
36 #include "CEGUIMultiColumnListProperties.h"
40 # pragma warning(push)
41 # pragma warning(disable : 4251)
55 MCLGridRef(uint r, uint c) : row(r), column(c) {}
61 MCLGridRef& operator=(
const MCLGridRef& rhs);
62 bool operator<(
const MCLGridRef& rhs)
const;
64 bool operator>(
const MCLGridRef& rhs)
const;
92 virtual Rect getListRenderArea(
void)
const = 0;
196 NominatedColumnSingle,
197 NominatedColumnMultiple,
216 bool isUserSortControlEnabled(
void)
const;
226 bool isUserColumnSizingEnabled(
void)
const;
236 bool isUserColumnDraggingEnabled(
void)
const;
246 uint getColumnCount(
void)
const;
256 uint getRowCount(
void)
const;
269 uint getSortColumn(
void)
const;
284 uint getColumnWithID(uint col_id)
const;
299 uint getColumnWithHeaderText(
const String& text)
const;
309 UDim getTotalColumnHeadersWidth(
void)
const;
324 UDim getColumnHeaderWidth(uint col_idx)
const;
364 uint getItemRowIndex(
const ListboxItem* item)
const;
379 uint getItemColumnIndex(
const ListboxItem* item)
const;
428 bool isListboxItemInColumn(
const ListboxItem* item, uint col_idx)
const;
447 bool isListboxItemInRow(
const ListboxItem* item, uint row_idx)
const;
461 bool isListboxItemInList(
const ListboxItem* item)
const;
565 uint getSelectedCount(
void)
const;
581 bool isItemSelected(
const MCLGridRef& grid_ref)
const;
595 uint getNominatedSelectionColumnID(
void)
const;
606 uint getNominatedSelectionColumn(
void)
const;
617 uint getNominatedSelectionRow(
void)
const;
638 bool isVertScrollbarAlwaysShown(
void)
const;
649 bool isHorzScrollbarAlwaysShown(
void)
const;
664 uint getColumnID(uint col_idx)
const;
679 uint getRowID(uint row_idx)
const;
694 uint getRowWithID(uint row_id)
const;
706 Rect getListRenderArea(
void)
const;
752 float getTotalRowsHeight(
void)
const;
758 float getWidestColumnItemWidth(uint col_idx)
const;
764 float getHighestRowItemHeight(uint row_idx)
const;
779 virtual void initialiseComponents(
void);
788 void resetList(
void);
807 void addColumn(
const String& text, uint col_id,
const UDim& width);
830 void insertColumn(
const String& text, uint col_id,
const UDim& width, uint position);
845 void removeColumn(uint col_idx);
860 void removeColumnWithID(uint col_id);
878 void moveColumn(uint col_idx, uint position);
896 void moveColumnWithID(uint col_id, uint position);
913 uint addRow(uint row_id = 0);
938 uint addRow(
ListboxItem* item, uint col_id, uint row_id = 0);
959 uint insertRow(uint row_idx, uint row_id = 0);
988 uint insertRow(
ListboxItem* item, uint col_id, uint row_idx, uint row_id = 0);
1003 void removeRow(uint row_idx);
1042 void setItem(
ListboxItem* item, uint col_id, uint row_idx);
1072 void setNominatedSelectionColumnID(uint col_id);
1087 void setNominatedSelectionColumn(uint col_idx);
1102 void setNominatedSelectionRow(uint row_idx);
1130 void setSortColumn(uint col_idx);
1145 void setSortColumnByID(uint col_id);
1159 void setShowVertScrollbar(
bool setting);
1173 void setShowHorzScrollbar(
bool setting);
1183 void clearAllSelections(
void);
1206 void setItemSelectState(
ListboxItem* item,
bool state);
1229 void setItemSelectState(
const MCLGridRef& grid_ref,
bool state);
1240 void handleUpdatedItemData(
void);
1258 void setColumnHeaderWidth(uint col_idx,
const UDim& width);
1272 void setUserSortControlEnabled(
bool setting);
1286 void setUserColumnSizingEnabled(
bool setting);
1297 void setUserColumnDraggingEnabled(
bool setting);
1313 void autoSizeColumnHeader(uint col_idx);
1331 void setRowID(uint row_idx, uint row_id);
1374 void configureScrollbars(
void);
1391 bool clearAllSelections_impl(
void);
1411 bool setItemSelectState_impl(
const MCLGridRef grid_ref,
bool state);
1418 void setSelectForItemsInRow(uint row_idx,
bool state);
1425 void setSelectForItemsInColumn(uint col_idx,
bool state);
1435 void moveColumn_impl(uint col_idx, uint position);
1449 bool resetList_impl(
void);
1462 virtual bool testClassName_impl(
const String& class_name)
const
1464 if (class_name==
"MultiColumnList")
return true;
1470 virtual bool validateWindowRenderer(
const String& name)
const
1472 return (name ==
"MultiColumnList");
1576 bool handleHeaderScroll(
const EventArgs& e);
1577 bool handleHeaderSegMove(
const EventArgs& e);
1578 bool handleColumnSizeChange(
const EventArgs& e);
1579 bool handleHorzScrollbar(
const EventArgs& e);
1580 bool handleVertScrollbar(
const EventArgs& e);
1581 bool handleSortColumnChange(
const EventArgs& e);
1582 bool handleSortDirectionChange(
const EventArgs& e);
1583 bool handleHeaderSegDblClick(
const EventArgs& e);
1592 typedef std::vector<ListboxItem*> RowItems;
1598 ListboxItem*
const& operator[](uint idx)
const {
return d_items[idx];}
1599 ListboxItem*& operator[](uint idx) {
return d_items[idx];}
1633 typedef std::vector<ListRow> ListItemGrid;
1660 void addMultiColumnListProperties(
void);
1665 #if defined(_MSC_VER)
1666 # pragma warning(pop)
1669 #endif // end of guard _CEGUIMultiColumnList_h_