TGUI  1.3-dev
Loading...
Searching...
No Matches
ListView.hpp
1
2//
3// TGUI - Texus' Graphical User Interface
4// Copyright (C) 2012-2024 Bruno Van de Velde (vdv_b@tgui.eu)
5//
6// This software is provided 'as-is', without any express or implied warranty.
7// In no event will the authors be held liable for any damages arising from the use of this software.
8//
9// Permission is granted to anyone to use this software for any purpose,
10// including commercial applications, and to alter it and redistribute it freely,
11// subject to the following restrictions:
12//
13// 1. The origin of this software must not be misrepresented;
14// you must not claim that you wrote the original software.
15// If you use this software in a product, an acknowledgment
16// in the product documentation would be appreciated but is not required.
17//
18// 2. Altered source versions must be plainly marked as such,
19// and must not be misrepresented as being the original software.
20//
21// 3. This notice may not be removed or altered from any source distribution.
22//
24
25#ifndef TGUI_LIST_VIEW_HPP
26#define TGUI_LIST_VIEW_HPP
27
28#include <TGUI/CopiedSharedPtr.hpp>
29#include <TGUI/Widgets/Scrollbar.hpp>
30#include <TGUI/Renderers/ListViewRenderer.hpp>
31#include <TGUI/Text.hpp>
32
33#if !TGUI_EXPERIMENTAL_USE_STD_MODULE
34 #include <set>
35 #include <limits>
36#endif
37
39
40TGUI_MODULE_EXPORT namespace tgui
41{
47 class TGUI_API ListView : public Widget
48 {
49 public:
50
51 using Ptr = std::shared_ptr<ListView>;
52 using ConstPtr = std::shared_ptr<const ListView>;
53
54 static constexpr const char StaticWidgetType[] = "ListView";
55
59 enum class ColumnAlignment
60 {
61 Left,
62 Center,
63 Right
64 };
65
66 struct Item
67 {
68 std::vector<Text> texts;
69 Any data;
70 Sprite icon;
71 };
72
73 struct Column
74 {
75 float width = 0;
76 float designWidth = 0;
77 float widestItemWidth = 0;
78 std::size_t widestItemIndex = std::numeric_limits<std::size_t>::max();
79 Text text;
80 ColumnAlignment alignment = ColumnAlignment::Left;
81 bool autoResize = false;
82 bool expanded = false;
83 };
84
92 ListView(const char* typeName = StaticWidgetType, bool initRenderer = true);
93
98 TGUI_NODISCARD static ListView::Ptr create();
99
107 TGUI_NODISCARD static ListView::Ptr copy(const ListView::ConstPtr& listView);
108
113 TGUI_NODISCARD ListViewRenderer* getSharedRenderer() override;
114 TGUI_NODISCARD const ListViewRenderer* getSharedRenderer() const override;
115
121 TGUI_NODISCARD ListViewRenderer* getRenderer() override;
122
128 void setSize(const Layout2d& size) override;
129 using Widget::setSize;
130
140 std::size_t addColumn(const String& text, float width = 0, ColumnAlignment alignment = ColumnAlignment::Left);
141
148 void setColumnText(std::size_t index, const String& text);
149
157 TGUI_NODISCARD String getColumnText(std::size_t index) const;
158
165 void setColumnWidth(std::size_t index, float width);
166
179 TGUI_NODISCARD float getColumnWidth(std::size_t index) const;
180
192 TGUI_NODISCARD float getColumnDesignWidth(std::size_t index) const;
193
200 void setColumnAlignment(std::size_t columnIndex, ColumnAlignment alignment);
201
209 TGUI_NODISCARD ColumnAlignment getColumnAlignment(std::size_t columnIndex) const;
210
225 void setColumnAutoResize(std::size_t index, bool autoResize);
226
236 TGUI_NODISCARD bool getColumnAutoResize(std::size_t index) const;
237
254 void setColumnExpanded(std::size_t index, bool expand);
255
265 TGUI_NODISCARD bool getColumnExpanded(std::size_t index) const;
266
271
277 TGUI_NODISCARD std::size_t getColumnCount() const;
278
284 void setHeaderHeight(float height);
285
291 TGUI_NODISCARD float getHeaderHeight() const;
292
298 TGUI_NODISCARD float getCurrentHeaderHeight() const;
299
305 void setHeaderVisible(bool showHeader);
306
312 TGUI_NODISCARD bool getHeaderVisible() const;
313
324 std::size_t addItem(const String& text);
325
338 std::size_t addItem(const std::vector<String>& item);
339
345 void addMultipleItems(const std::vector<std::vector<String>>& items);
346
353 void insertItem(std::size_t index, const String& text);
354
361 void insertItem(std::size_t index, const std::vector<String>& item);
362
369 void insertMultipleItems(std::size_t index, const std::vector<std::vector<String>>& items);
370
379 bool changeItem(std::size_t index, const std::vector<String>& item);
380
390 bool changeSubItem(std::size_t index, std::size_t column, const String& item);
391
399 bool removeItem(std::size_t index);
400
405
411 void setSelectedItem(std::size_t index);
412
418 void setSelectedItems(const std::set<std::size_t>& indices);
419
424
431
437 TGUI_NODISCARD std::set<std::size_t> getSelectedItemIndices() const;
438
444 void setMultiSelect(bool multiSelect);
445
451 TGUI_NODISCARD bool getMultiSelect() const;
452
465 void setItemData(std::size_t index, Any data);
466
473 template <typename DataType>
474 TGUI_NODISCARD DataType getItemData(std::size_t index) const
475 {
476 if (index < m_items.size())
477 return AnyCast<DataType>(m_items[index].data);
478 else
479 throw std::bad_cast();
480 }
481
488 void setItemIcon(std::size_t index, const Texture& texture);
489
497 TGUI_NODISCARD Texture getItemIcon(std::size_t index) const;
498
504 TGUI_NODISCARD std::size_t getItemCount() const;
505
513 TGUI_NODISCARD String getItem(std::size_t index) const;
514
524 TGUI_NODISCARD std::vector<String> getItemRow(std::size_t index) const;
525
534 TGUI_NODISCARD String getItemCell(std::size_t rowIndex, std::size_t columnIndex) const;
535
541 TGUI_NODISCARD std::vector<String> getItems() const;
542
548 TGUI_NODISCARD std::vector<std::vector<String>> getItemRows() const;
549
561 void sort(std::size_t index, const std::function<bool(const String&, const String&)>& cmp);
562
568 void setItemHeight(unsigned int itemHeight);
569
575 TGUI_NODISCARD unsigned int getItemHeight() const;
576
584 void setHeaderTextSize(unsigned int textSize);
585
591 TGUI_NODISCARD unsigned int getHeaderTextSize() const;
592
598 void setSeparatorWidth(unsigned int width);
599
605 TGUI_NODISCARD unsigned int getSeparatorWidth() const;
606
612 void setHeaderSeparatorHeight(unsigned int height);
613
619 TGUI_NODISCARD unsigned int getHeaderSeparatorHeight() const;
620
626 void setGridLinesWidth(unsigned int width);
627
633 TGUI_NODISCARD unsigned int getGridLinesWidth() const;
634
642 void setAutoScroll(bool autoScroll);
643
649 TGUI_NODISCARD bool getAutoScroll() const;
650
658 void setShowVerticalGridLines(bool showGridLines);
659
665 TGUI_NODISCARD bool getShowVerticalGridLines() const;
666
674 void setShowHorizontalGridLines(bool showGridLines);
675
681 TGUI_NODISCARD bool getShowHorizontalGridLines() const;
682
690 TGUI_DEPRECATED("Use setColumnAutoExpanded and setColumnAutoResize instead") void setExpandLastColumn(bool expand);
691
699 TGUI_DEPRECATED("Use ColumnAutoExpanded and ColumnAutoResize setters and getters instead") TGUI_NODISCARD bool getExpandLastColumn() const;
700
705 void setVerticalScrollbarPolicy(Scrollbar::Policy policy);
706
711 TGUI_NODISCARD Scrollbar::Policy getVerticalScrollbarPolicy() const;
712
717 void setHorizontalScrollbarPolicy(Scrollbar::Policy policy);
718
723 TGUI_NODISCARD Scrollbar::Policy getHorizontalScrollbarPolicy() const;
724
730 void setVerticalScrollbarValue(unsigned int value);
731
737 TGUI_NODISCARD unsigned int getVerticalScrollbarValue() const;
738
744 void setHorizontalScrollbarValue(unsigned int value);
745
751 TGUI_NODISCARD unsigned int getHorizontalScrollbarValue() const;
752
761 void setFixedIconSize(Vector2f iconSize);
762
770 TGUI_NODISCARD Vector2f getFixedIconSize() const;
771
779 void setResizableColumns(bool resizable);
780
788 TGUI_NODISCARD bool getResizableColumns() const;
789
794 TGUI_NODISCARD bool isMouseOnWidget(Vector2f pos) const override;
795
799 bool leftMousePressed(Vector2f pos) override;
800
804 void leftMouseReleased(Vector2f pos) override;
805
809 void rightMousePressed(Vector2f pos) override;
810
814 void mouseMoved(Vector2f pos) override;
815
819 bool scrolled(float delta, Vector2f pos, bool touch) override;
820
824 void mouseNoLongerOnWidget() override;
825
829 void leftMouseButtonNoLongerDown() override;
830
834 void keyPressed(const Event::KeyEvent& event) override;
835
845 bool canHandleKeyPress(const Event::KeyEvent& event) override;
846
853 void draw(BackendRenderTarget& target, RenderStates states) const override;
854
856 protected:
857
867 TGUI_NODISCARD Signal& getSignal(String signalName) override;
868
874 void rendererChanged(const String& property) override;
875
879 TGUI_NODISCARD std::unique_ptr<DataIO::Node> save(SavingRenderersMap& renderers) const override;
880
884 void load(const std::unique_ptr<DataIO::Node>& node, const LoadingRenderersMap& renderers) override;
885
889 void mouseEnteredWidget() override;
890
894 void mouseLeftWidget() override;
895
899 void updateTextSize() override;
900
902 // Returns the size without the borders
904 TGUI_NODISCARD Vector2f getInnerSize() const;
905
907 // Create a Text object for an item from the given caption, using the preset color, font, text size and opacity
909 TGUI_NODISCARD Text createText(const String& caption);
910
912 // Create a Text object for a header text from the given caption, using the preset color, font, text size and opacity
914 TGUI_NODISCARD Text createHeaderText(const String& caption);
915
917 // Changes the color of all Text objects in an item
919 virtual void setItemColor(std::size_t index, const Color& color);
920
922 // Calculate the width of the column based on its caption when no column width was provided
924 TGUI_NODISCARD float calculateAutoColumnWidth(const Text& text);
925
927 // Update the colors of the selected and hovered items
929 void updateSelectedAndhoveredItemColors();
930
932 // Update the color of all the items
934 void updateItemColors();
935
937 // Changes the color of all header texts
939 void updateHeaderTextsColor();
940
942 // Update on which item the mouse is standing
944 void updateHoveredItem(int item);
945
947 // Update which item is selected
949 void updateSelectedItem(int item);
950
952 // Selects multiple items when multi-select is on and the user selects an item while the shift key is held down
954 void selectRangeFromEvent(std::size_t item);
955
957 // Updates which item is the widest in the given column, by calculating the width of each item
959 bool updateWidestItemInColumn(std::size_t columnIndex);
960
962 // Updates which item is the widest in the given column, when only one item has changed in width
964 bool updateWidestItemInColumn(std::size_t columnIndex, std::size_t itemIndex);
965
967 // Updates which item is the widest in all columns, by calculating the width of each item
969 bool updateWidestItem();
970
972 // Updates which item is the widest in all columns, when only one item has changed in width
974 bool updateWidestItem(std::size_t itemIndex);
975
977 // This function needs to be called when items are inserted into the list. If the widest item for each column is located
978 // below the inserted item then it's index needs to be updated.
980 void incrementWidestItemIndices(std::size_t itemIndex);
981
983 // Recalculates the width of each column if they don't have a fixed width. For auto-resized columns, the widest item
984 // should have already been updated in each column before this function is called.
986 void updateColumnWidths();
987
989 // Returns whether at least one column potentially has its width expanded to fill the list view
991 bool hasExpandedColumn() const;
992
994 // Add item to selected set
996 void addSelectedItem(int item);
997
999 // Remove item from selected set
1001 void removeSelectedItem(std::size_t item);
1002
1004 // Update on which item the mouse is standing, given the current mouse position
1006 void updateHoveredItemByMousePos(Vector2f mousePos);
1007
1009 // Returns either the configured separator width or the width of vertical grid lines, whichever is larger.
1011 TGUI_NODISCARD unsigned int getTotalSeparatorWidth() const;
1012
1014 // Returns the total width an Item takes up at some column, assuming it will not be cut off by the column.
1016 TGUI_NODISCARD float getItemTotalWidth(const Item& item, std::size_t columnIndex) const;
1017
1019 // Found out which column is located below the mouse. The mouseLeft is relative to the widget position.
1020 // This function should only be called after checking that the mouse is positioned on top of the header.
1022 TGUI_NODISCARD int getColumnIndexBelowMouse(float mouseLeft);
1023
1025 // Returns whether the mouse is standing between two columns.
1026 // If true then columnIndex is set to the index of border below the mouse (1 is the border between first two columns).
1027 // If false then columnIndex remains unchanged.
1029 TGUI_NODISCARD bool findBorderBelowMouse(Vector2f pos, std::size_t& columnIndex) const;
1030
1032 // Recalculate the size and viewport size of the scrollbars
1034 void updateScrollbars();
1035
1037 // Recalculate the maximum value for the vertical scrollbar
1039 void updateVerticalScrollbarMaximum();
1040
1042 // Draw the header text for a single column
1044 void drawHeaderText(BackendRenderTarget& target, RenderStates states, float columnWidth, float headerHeight, std::size_t column) const;
1045
1047 // Draw the texts in a single column
1049 void drawColumn(BackendRenderTarget& target, RenderStates states, std::size_t firstItem, std::size_t lastItem, std::size_t column, float columnWidth) const;
1050
1052 // This function is called every frame with the time passed since the last frame.
1054 bool updateTime(Duration elapsedTime) override;
1055
1057 // Makes a copy of the widget
1059 TGUI_NODISCARD Widget::Ptr clone() const override;
1060
1062 public:
1063
1069 SignalInt onItemSelect = {"ItemSelected"};
1070
1071 SignalInt onDoubleClick = {"DoubleClicked"};
1072 SignalInt onRightClick = {"RightClicked"};
1073 SignalInt onHeaderClick = {"HeaderClicked"};
1074
1076 protected:
1077
1078 std::vector<Column> m_columns;
1079 std::vector<Item> m_items;
1080 std::set<std::size_t> m_selectedItems;
1081
1082 int m_hoveredItem = -1;
1083 int m_firstSelectedItemIndex = -1;
1084 int m_focusedItemIndex = -1;
1085
1086 float m_requestedHeaderHeight = 0;
1087 unsigned int m_itemHeight = 0;
1088 unsigned int m_headerTextSize = 0;
1089 unsigned int m_headerSeparatorHeight = 0;
1090 unsigned int m_separatorWidth = 1;
1091 unsigned int m_gridLinesWidth = 1;
1092 unsigned int m_iconCount = 0;
1093 float m_maxIconWidth = 0;
1094 float m_widestItemWidth = 0; // If there are no columns, this is the maximum width from all items
1095 std::size_t m_widestItemIndex = std::numeric_limits<std::size_t>::max(); // If there are no columns, this is the index of the item with the maximum width
1096 bool m_headerVisible = true;
1097 bool m_showHorizontalGridLines = false;
1098 bool m_showVerticalGridLines = true;
1099 bool m_expandLastColumn = false; // TGUI_NEXT: Remove this property
1100 bool m_multiSelect = false;
1101 bool m_resizableColumns = false;
1102 Vector2f m_fixedIconSize;
1103 Cursor::Type m_currentListViewMouseCursor = Cursor::Type::Arrow;
1104 std::size_t m_resizingColumn = 0;
1105 float m_resizingColumnLastMouseX = 0;
1106
1107 CopiedSharedPtr<ScrollbarChildWidget> m_horizontalScrollbar;
1108 CopiedSharedPtr<ScrollbarChildWidget> m_verticalScrollbar;
1109 Scrollbar::Policy m_verticalScrollbarPolicy = Scrollbar::Policy::Automatic;
1110 Scrollbar::Policy m_horizontalScrollbarPolicy = Scrollbar::Policy::Automatic;
1111
1112 int m_mouseOnHeaderIndex = -1; // If the left mouse is down, this contains the index of the column if the mouse went down on the header
1113 int m_possibleDoubleClick = false; // Will be set to true after the first click, but gets reset to false when the second click does not occur soon after
1114 bool m_autoScroll = true; // Should the list view scroll to the bottom when a new item is added?
1115
1116 Sprite m_spriteHeaderBackground;
1117 Sprite m_spriteBackground;
1118
1119 // Cached renderer properties
1120 Borders m_bordersCached;
1121 Borders m_paddingCached;
1122 Color m_borderColorCached;
1123 Color m_separatorColorCached;
1124 Color m_gridLinesColorCached;
1125 Color m_headerTextColorCached;
1126 Color m_headerBackgroundColorCached;
1127 Color m_backgroundColorCached;
1128 Color m_backgroundColorHoverCached;
1129 Color m_selectedBackgroundColorCached;
1130 Color m_selectedBackgroundColorHoverCached;
1131 Color m_textColorCached;
1132 Color m_textColorHoverCached;
1133 Color m_selectedTextColorCached;
1134 Color m_selectedTextColorHoverCached;
1135
1137 };
1138
1140}
1141
1143
1144#endif // TGUI_LIST_VIEW_HPP
Base class for render targets.
Definition BackendRenderTarget.hpp:48
Wrapper for colors.
Definition Color.hpp:72
Definition CopiedSharedPtr.hpp:45
Type
List of available cursors.
Definition Cursor.hpp:51
Wrapper for durations.
Definition Duration.hpp:56
Class to store the position or size of a widget.
Definition Layout.hpp:305
Definition ListViewRenderer.hpp:37
List view widget.
Definition ListView.hpp:48
TGUI_NODISCARD float getColumnWidth(std::size_t index) const
Returns the width of a column.
void setShowVerticalGridLines(bool showGridLines)
Changes whether lines are drawn between columns.
TGUI_NODISCARD unsigned int getGridLinesWidth() const
Returns the width of the grid lines.
TGUI_NODISCARD Texture getItemIcon(std::size_t index) const
Gets the icon displayed in front of the item.
void setSelectedItems(const std::set< std::size_t > &indices)
Selects items in the list view.
void setHeaderTextSize(unsigned int textSize)
Changes the text size of the header caption.
bool changeItem(std::size_t index, const std::vector< String > &item)
Changes an item with values for multiple columns to the list.
std::size_t addColumn(const String &text, float width=0, ColumnAlignment alignment=ColumnAlignment::Left)
Adds a column.
TGUI_NODISCARD String getItem(std::size_t index) const
Retrieves an item in the list.
TGUI_NODISCARD DataType getItemData(std::size_t index) const
Returns user data stored in the item.
Definition ListView.hpp:474
void removeAllItems()
Removes all items from the list.
void setColumnAlignment(std::size_t columnIndex, ColumnAlignment alignment)
Changes the text alignment within a column.
TGUI_NODISCARD bool getShowVerticalGridLines() const
Returns whether lines are drawn between items.
void setColumnWidth(std::size_t index, float width)
Changes the width of a column.
TGUI_NODISCARD float getHeaderHeight() const
Returns the height of the header row.
void setSize(const Layout2d &size) override
Changes the size of the list view.
void setHeaderVisible(bool showHeader)
Changes whether the header is shown.
TGUI_NODISCARD unsigned int getHeaderTextSize() const
Returns the text size of the header caption.
void insertItem(std::size_t index, const String &text)
Inserts an item into the list.
TGUI_NODISCARD unsigned int getItemHeight() const
Returns the height of the items in the list view.
static TGUI_NODISCARD ListView::Ptr create()
Creates a new list view widget.
void setColumnText(std::size_t index, const String &text)
Changes the text of a column.
std::shared_ptr< ListView > Ptr
Shared widget pointer.
Definition ListView.hpp:51
TGUI_NODISCARD unsigned int getHeaderSeparatorHeight() const
Returns the height of the separator between the header and the items.
TGUI_NODISCARD std::size_t getColumnCount() const
Returns the amount of columns in the list view.
static TGUI_NODISCARD ListView::Ptr copy(const ListView::ConstPtr &listView)
Makes a copy of another list view.
void sort(std::size_t index, const std::function< bool(const String &, const String &)> &cmp)
Sort items.
TGUI_NODISCARD String getColumnText(std::size_t index) const
Returns the text of a column.
void insertMultipleItems(std::size_t index, const std::vector< std::vector< String > > &items)
Inserts multiple items into the list.
bool changeSubItem(std::size_t index, std::size_t column, const String &item)
Changes the caption of a single value in the item.
int getSelectedItemIndex() const
Gets the index of the selected item.
std::size_t addItem(const String &text)
Adds an item to the list.
void insertItem(std::size_t index, const std::vector< String > &item)
Inserts an item into the list.
void setItemIcon(std::size_t index, const Texture &texture)
Sets a small icon in front of the item.
TGUI_NODISCARD bool getAutoScroll() const
Returns whether the list view scrolls to the bottom when a new item is added.
TGUI_NODISCARD std::vector< std::vector< String > > getItemRows() const
Returns a list of all column values for all items in the list view.
TGUI_NODISCARD std::set< std::size_t > getSelectedItemIndices() const
Gets the indices of the selected items.
ColumnAlignment
The text alignment for all texts within a column.
Definition ListView.hpp:60
TGUI_NODISCARD bool getMultiSelect() const
Returns multi selection of the items is allowed.
TGUI_NODISCARD bool getShowHorizontalGridLines() const
Returns whether lines are drawn between items.
void setHeaderHeight(float height)
Changes the height of the header row.
void setShowHorizontalGridLines(bool showGridLines)
Changes whether lines are drawn between items.
std::shared_ptr< const ListView > ConstPtr
Shared constant widget pointer.
Definition ListView.hpp:52
TGUI_NODISCARD bool getColumnAutoResize(std::size_t index) const
Returns whether the column width depends on the widest item added to that column.
void deselectItems()
Deselects the selected items.
void addMultipleItems(const std::vector< std::vector< String > > &items)
Adds multiple items to the list.
TGUI_NODISCARD bool getColumnExpanded(std::size_t index) const
Returns whether the column is expanded to fill the list view (if all columns fit inside the list view...
TGUI_NODISCARD float getCurrentHeaderHeight() const
Returns the height of the header or 0 if no header row is shown.
void setAutoScroll(bool autoScroll)
Changes whether the list view scrolls to the bottom when a new item is added.
TGUI_NODISCARD float getColumnDesignWidth(std::size_t index) const
Returns the original width of a column (the value passed to addColumn or the last setColumnWidth call...
std::size_t addItem(const std::vector< String > &item)
Adds an item with values for multiple columns to the list.
TGUI_NODISCARD bool getHeaderVisible() const
Returns whether the header is shown.
void setItemHeight(unsigned int itemHeight)
Changes the height of the items in the list view.
void setSelectedItem(std::size_t index)
Selects an item in the list view.
void setSeparatorWidth(unsigned int width)
Changes the width of the column separator.
void setHeaderSeparatorHeight(unsigned int height)
Changes the height of the separator between the header and the items.
void setItemData(std::size_t index, Any data)
Store some user data with the item.
TGUI_NODISCARD unsigned int getSeparatorWidth() const
Returns the width of the column separator.
TGUI_NODISCARD ListViewRenderer * getSharedRenderer() override
Returns the renderer, which gives access to functions that determine how the widget is displayed.
TGUI_NODISCARD std::vector< String > getItems() const
Returns a list of the texts in the first column for all items in the list view.
void setMultiSelect(bool multiSelect)
Allow multi selection of the items.
void removeAllColumns()
Removes all columns.
TGUI_NODISCARD ListViewRenderer * getRenderer() override
Returns the renderer, which gives access to functions that determine how the widget is displayed.
TGUI_NODISCARD ColumnAlignment getColumnAlignment(std::size_t columnIndex) const
Returns the current text alignment within a column.
TGUI_NODISCARD std::vector< String > getItemRow(std::size_t index) const
Retrieves the values of all columns for an item in the list.
bool removeItem(std::size_t index)
Removes the item from the list view.
TGUI_NODISCARD std::size_t getItemCount() const
Returns the amount of items in the list view.
void setColumnAutoResize(std::size_t index, bool autoResize)
Changes whether the column width depends on the widest item added to that column.
TGUI_NODISCARD String getItemCell(std::size_t rowIndex, std::size_t columnIndex) const
Retrieves the value for a cell in the list.
void setColumnExpanded(std::size_t index, bool expand)
Changes whether a column is expanded to fill the list view (if all columns fit inside the list view)
void setGridLinesWidth(unsigned int width)
Changes the width of the grid lines.
Definition Outline.hpp:39
Scrollbar widget.
Definition Scrollbar.hpp:45
Policy
Defines when the scrollbar shows up.
Definition Scrollbar.hpp:56
Signal to which the user can subscribe to get callbacks from.
Definition Signal.hpp:62
Definition Sprite.hpp:48
Wrapper class to store strings.
Definition String.hpp:101
Backend-independent wrapper around the backend-specific text class.
Definition Text.hpp:50
Texture wrapper that internally reuses resources when multiple Texture objects are loaded from the sa...
Definition Texture.hpp:57
The parent class for every widget.
Definition Widget.hpp:84
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:39
Definition Event.hpp:39
Definition ListView.hpp:74
Definition ListView.hpp:67
States used for drawing.
Definition RenderStates.hpp:39