| 1 |
/* Copyright (C) 2013 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, see <http://www.gnu.org/licenses/>. |
| 15 |
*/ |
| 16 |
|
| 17 |
#include <gtkmm/bin.h> |
| 18 |
|
| 19 |
_DEFS(gtkmm,gtk) |
| 20 |
_PINCLUDE(gtkmm/private/bin_p.h) |
| 21 |
|
| 22 |
namespace Gtk |
| 23 |
{ |
| 24 |
|
| 25 |
/** See the description of ListBox. |
| 26 |
* |
| 27 |
* @ingroup Widgets |
| 28 |
* @ingroup Containers |
| 29 |
* |
| 30 |
* @newin{3,10} |
| 31 |
*/ |
| 32 |
class GTKMM_API ListBoxRow : public Bin |
| 33 |
{ |
| 34 |
_CLASS_GTKOBJECT(ListBoxRow, GtkListBoxRow, GTK_LIST_BOX_ROW, Gtk::Bin, GtkBin, , , GTKMM_API) |
| 35 |
public: |
| 36 |
_CTOR_DEFAULT() |
| 37 |
|
| 38 |
/** Sets the current header of the ListBoxRow. This is only allowed to be called |
| 39 |
* from a ListBox::SlotUpdateHeader. It will replace any existing |
| 40 |
* header in the row, and be shown in front of the row in the ListBox. |
| 41 |
* |
| 42 |
* @newin{3,10} |
| 43 |
* |
| 44 |
* @param header The header. |
| 45 |
*/ |
| 46 |
_WRAP_METHOD(void set_header(Widget& header), gtk_list_box_row_set_header) |
| 47 |
|
| 48 |
/** Removes the current header, if any. This is only allowed to be called |
| 49 |
* from a ListBox::SlotUpdateHeader. |
| 50 |
* |
| 51 |
* @newin{3,10} |
| 52 |
*/ |
| 53 |
void unset_header(); |
| 54 |
|
| 55 |
/** Returns the current header of the ListBoxRow. This can be used |
| 56 |
* in a ListBox::SlotUpdateHeader to see if there is a header |
| 57 |
* set already, and if so to update the state of it. |
| 58 |
* |
| 59 |
* @newin{3,10} |
| 60 |
* |
| 61 |
* @return The current header, or <tt>0</tt> if none. |
| 62 |
*/ |
| 63 |
_WRAP_METHOD(Widget* get_header(), gtk_list_box_row_get_header) |
| 64 |
|
| 65 |
/** Returns the current header of the ListBoxRow. This can be used |
| 66 |
* in a ListBox::SlotUpdateHeader to see if there is a header |
| 67 |
* set already, and if so to update the state of it. |
| 68 |
* |
| 69 |
* @newin{3,10} |
| 70 |
* |
| 71 |
* @return The current header, or <tt>0</tt> if none. |
| 72 |
*/ |
| 73 |
_WRAP_METHOD(const Widget* get_header() const, gtk_list_box_row_get_header, constversion) |
| 74 |
|
| 75 |
_WRAP_METHOD(int get_index() const, gtk_list_box_row_get_index) |
| 76 |
_WRAP_METHOD(void changed(), gtk_list_box_row_changed) |
| 77 |
|
| 78 |
_WRAP_METHOD(bool is_selected() const, gtk_list_box_row_is_selected) |
| 79 |
|
| 80 |
_WRAP_METHOD(void set_selectable(bool selectable = true), gtk_list_box_row_set_selectable) |
| 81 |
_WRAP_METHOD(bool get_selectable() const, gtk_list_box_row_get_selectable) |
| 82 |
|
| 83 |
_WRAP_METHOD(void set_activatable(bool activatable = true), gtk_list_box_row_set_activatable) |
| 84 |
_WRAP_METHOD(bool get_activatable() const, gtk_list_box_row_get_activatable) |
| 85 |
|
| 86 |
_WRAP_PROPERTY("selectable", bool) |
| 87 |
_WRAP_PROPERTY("activatable", bool) |
| 88 |
|
| 89 |
_IGNORE_SIGNAL(activate) // Action signal |
| 90 |
}; |
| 91 |
|
| 92 |
} // namespace Gtk |