Ardour  9.0-pre0-582-g084a23a80d
listviewtext.h
Go to the documentation of this file.
1 /* Copyright(C) 2006 The gtkmm Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or(at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free
15  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16  */
17 
18 #ifndef _GTKMM_LISTVIEW_TEXT_H
19 #define _GTKMM_LISTVIEW_TEXT_H
20 
21 #include <gtkmm/treeview.h>
22 #include <gtkmm/liststore.h>
23 
24 #include <vector>
25 
26 namespace Gtk
27 {
28 
40 {
41 public:
42 
43  ListViewText(guint columns_count, bool editable = false, Gtk::SelectionMode mode = Gtk::SELECTION_SINGLE);
44  virtual ~ListViewText();
45 
50  void set_column_title(guint column, const Glib::ustring& title);
51 
56  Glib::ustring get_column_title(guint column) const;
57 
58 #ifndef GTKMM_DISABLE_DEPRECATED
65  guint append_text(const Glib::ustring& column_one_value = Glib::ustring());
66 
72  void prepend_text(const Glib::ustring& column_one_value = Glib::ustring());
73 
80  void insert_text(guint row, const Glib::ustring& column_one_value = Glib::ustring());
81 #endif //GTKMM_DISABLE_DEPRECATED
82 
87  guint append(const Glib::ustring& column_one_value = Glib::ustring());
88 
92  void prepend(const Glib::ustring& column_one_value = Glib::ustring());
93 
98  void insert(guint row, const Glib::ustring& column_one_value = Glib::ustring());
99 
101  void clear_items();
102 
108  Glib::ustring get_text(guint row, guint column = 0) const;
109 
115  void set_text(guint row, guint column, const Glib::ustring& value);
116 
121  void set_text(guint row, const Glib::ustring& value);
122 
124  guint size() const;
125 
127  guint get_num_columns() const;
128 
129  typedef std::vector<int> SelectionList;
130 
135 
136 protected:
137 
139  {
140  public:
141  TextModelColumns(guint columns_count);
143 
144  guint get_num_columns() const;
145 
147 
148  protected:
150  };
151 
152  Glib::RefPtr<Gtk::ListStore> m_model;
154 };
155 
156 } //namespace Gtk
157 
158 #endif //_GTKMM_LISTVIEW_TEXT_H
159 
TextModelColumns(guint columns_count)
Gtk::TreeModelColumn< Glib::ustring > * m_columns
Definition: listviewtext.h:146
void set_text(guint row, const Glib::ustring &value)
TextModelColumns m_model_columns
Definition: listviewtext.h:153
std::vector< int > SelectionList
Definition: listviewtext.h:129
SelectionList get_selected()
void set_text(guint row, guint column, const Glib::ustring &value)
guint append_text(const Glib::ustring &column_one_value=Glib::ustring())
Glib::RefPtr< Gtk::ListStore > m_model
Definition: listviewtext.h:152
Glib::ustring get_column_title(guint column) const
virtual ~ListViewText()
void set_column_title(guint column, const Glib::ustring &title)
void insert_text(guint row, const Glib::ustring &column_one_value=Glib::ustring())
guint append(const Glib::ustring &column_one_value=Glib::ustring())
guint get_num_columns() const
void prepend_text(const Glib::ustring &column_one_value=Glib::ustring())
void prepend(const Glib::ustring &column_one_value=Glib::ustring())
ListViewText(guint columns_count, bool editable=false, Gtk::SelectionMode mode=Gtk::SELECTION_SINGLE)
void clear_items()
Discard all row:
Glib::ustring get_text(guint row, guint column=0) const
void insert(guint row, const Glib::ustring &column_one_value=Glib::ustring())
guint size() const
Definition: ardour_ui.h:188