![]() |
![]() |
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.
Public Types | |
typedef std::vector<int> | SelectionList |
Public Member Functions | |
guint | append_text (const Glib::ustring& column_one_value=Glib::ustring()) |
Add a new row at the end of the list. | |
void | clear_items () |
Discard all row:. | |
Glib::ustring | get_column_title (guint column) const |
Gets the title of column column. | |
guint | get_num_columns () const |
| |
SelectionList | get_selected () |
Returns a vector of the indexes of the selected rows. | |
Glib::ustring | get_text (guint row, guint column=0) const |
Obtain the value of an existing cell from the list. | |
void | insert_text (guint row, const Glib::ustring& column_one_value=Glib::ustring()) |
Insert a new row at an arbitrary position in the list. | |
ListViewText (guint columns_count, bool editable=false, Gtk::SelectionMode mode=Gtk::SELECTION_SINGLE) | |
void | prepend_text (const Glib::ustring& column_one_value=Glib::ustring()) |
Insert a new row at the beginning of the list. | |
void | set_column_title (guint column, const Glib::ustring& title) |
Adds a title to column column. | |
void | set_text (guint row, const Glib::ustring& value) |
Change an existing value of a column 0 of a row of the list. | |
void | set_text (guint row, guint column, const Glib::ustring& value) |
Change an existing value of cell of the list. | |
guint | size () const |
| |
virtual | ~ListViewText () |
Protected Attributes | |
Glib::RefPtr<Gtk::ListStore> | m_model |
TextModelColumns | m_model_columns |
Classes | |
class | TextModelColumns |
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_text | ( | 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 |
SelectionList Gtk::ListViewText::get_selected | ( | ) |
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_text | ( | 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_text | ( | 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, | |
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. |
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. |
guint Gtk::ListViewText::size | ( | ) | const |
Glib::RefPtr<Gtk::ListStore> Gtk::ListViewText::m_model [protected] |
TextModelColumns Gtk::ListViewText::m_model_columns [protected] |