gtkmm
3.4.0
|
A simple listbox which presents some lines of information in columns and lets the user select some of them. More...
Classes | |
class | TextModelColumns |
Public Types | |
typedef std::vector< int > | SelectionList |
Public Member Functions | |
ListViewText (guint columns_count, bool editable=false, Gtk::SelectionMode mode=Gtk::SELECTION_SINGLE) | |
virtual | ~ListViewText () |
void | set_column_title (guint column, const Glib::ustring& title) |
Adds a title to column column. | |
Glib::ustring | get_column_title (guint column) const |
Gets the title of column column. | |
guint | append (const Glib::ustring& column_one_value=Glib::ustring()) |
Add a new row at the end of the list. | |
void | prepend (const Glib::ustring& column_one_value=Glib::ustring()) |
Insert a new row at the beginning of the list. | |
void | insert (guint row, const Glib::ustring& column_one_value=Glib::ustring()) |
Insert a new row at an arbitrary position in the list. | |
void | clear_items () |
Discard all row: | |
Glib::ustring | get_text (guint row, guint column=0) const |
Obtain the value of an existing cell from the list. | |
void | set_text (guint row, guint column, const Glib::ustring&value) |
Change an existing value of cell of the list. | |
void | set_text (guint row, const Glib::ustring&value) |
Change an existing value of a column 0 of a row of the list. | |
guint | size () const |
guint | get_num_columns () const |
SelectionList | get_selected () |
Returns a vector of the indexes of the selected rows. | |
Protected Attributes | |
Glib::RefPtr< Gtk::ListStore > | m_model |
TextModelColumns | m_model_columns |
A simple listbox which presents some lines of information in columns and lets the user select some of them.
This is a convenience class, based on Gtk::TreeView, which allows only text values and does not allow child items. In most cases you will actually need the functionality offered by a real Gtk::TreeView with your own type-safe Gtk::TreeModel::ColumnRecord.
typedef std::vector<int> Gtk::ListViewText::SelectionList |
Gtk::ListViewText::ListViewText | ( | guint | columns_count, |
bool | editable = false , |
||
Gtk::SelectionMode | mode = Gtk::SELECTION_SINGLE |
||
) |
virtual Gtk::ListViewText::~ListViewText | ( | ) | [virtual] |
guint Gtk::ListViewText::append | ( | const Glib::ustring & | column_one_value = Glib::ustring() | ) |
Add a new row at the end of the list.
column_one_value | the new text for the new row, column 0 |
void Gtk::ListViewText::clear_items | ( | ) |
Discard all row:
Glib::ustring Gtk::ListViewText::get_column_title | ( | guint | column | ) | const |
Gets the title of column column.
column | the column number. |
guint Gtk::ListViewText::get_num_columns | ( | ) | const |
Returns a vector of the indexes of the selected rows.
Glib::ustring Gtk::ListViewText::get_text | ( | guint | row, |
guint | column = 0 |
||
) | const |
Obtain the value of an existing cell from the list.
row | the number of the row in the listbox. |
column | the number of the column in the row. |
void Gtk::ListViewText::insert | ( | guint | row, |
const Glib::ustring & | column_one_value = Glib::ustring() |
||
) |
Insert a new row at an arbitrary position in the list.
row | The row number |
column_one_value | the new text for the new row, column 0 |
void Gtk::ListViewText::prepend | ( | const Glib::ustring & | column_one_value = Glib::ustring() | ) |
Insert a new row at the beginning of the list.
column_one_value | the new text for the new row, column 0 |
void Gtk::ListViewText::set_column_title | ( | guint | column, |
const Glib::ustring & | title | ||
) |
Adds a title to column column.
column | the column number. |
title | the title for column column. |
void Gtk::ListViewText::set_text | ( | guint | row, |
guint | column, | ||
const Glib::ustring & | value | ||
) |
Change an existing value of cell of the list.
row | the number of the row in the list. |
column | the number of the column in the row. |
value | the new contents of that row and column. |
void Gtk::ListViewText::set_text | ( | guint | row, |
const Glib::ustring & | value | ||
) |
Change an existing value of a column 0 of a row of the list.
row | the number of the row in the list. |
value | the new contents of column 0 of the row. |
guint Gtk::ListViewText::size | ( | ) | const |
Glib::RefPtr<Gtk::ListStore> Gtk::ListViewText::m_model [protected] |
TextModelColumns Gtk::ListViewText::m_model_columns [protected] |