Debian Codegraph @

gtk/src/cellareabox.hg

raw
1 /* Copyright (C) 2010 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 <https://www.gnu.org/licenses/>.
15 */
16
17 #include <gtkmm/cellarea.h>
18 #include <gtkmm/orientable.h>
19 _DEFS(gtkmm,gtk)
20 _PINCLUDE(gtkmm/private/cellarea_p.h)
21
22
23 namespace Gtk
24 {
25
26 /** A cell area that renders CellRenderers into a row or a colum, depending on its orientation.
27 *
28 * This class uses a notion of packing. Packing
29 * refers to adding cell renderers with reference to a particular position
30 * in a CellAreaBox. There are two reference positions: the
31 * start and the end of the box.
32 * When the CellAreaBox is oriented in the Gtk::ORIENTATION_VERTICAL
33 * orientation, the start is defined as the top of the box and the end is
34 * defined as the bottom. In the Gtk::ORIENTATION_HORIZONTAL orientation
35 * start is defined as the left side and the end is defined as the right
36 * side.
37 *
38 * Alignments of CellRenderers rendered in adjacent rows can be
39 * configured by configuring the align_child cell property
40 * with CellArea::cell_set_property() or by specifying the "align"
41 * argument to pack_start() or pack_end().
42 *
43 * @newin{3,0}
44 */
45 class GTKMM_API CellAreaBox
46 : public Gtk::CellArea,
47 public Orientable
48 {
49 _CLASS_GOBJECT(CellAreaBox, GtkCellAreaBox, GTK_CELL_AREA_BOX, CellArea, GtkCellArea, , , GTKMM_API)
50 _IMPLEMENTS_INTERFACE(Orientable)
51
52 protected:
53 _CTOR_DEFAULT
54 public:
55 _WRAP_CREATE()
56 _IGNORE(gtk_cell_area_box_new)
57
58 //TODO: Are these good default values:
59 _WRAP_METHOD(void pack_start(CellRenderer& renderer, bool expand = false, bool align = true, bool fixed = false), gtk_cell_area_box_pack_start)
60 _WRAP_METHOD(void pack_end(CellRenderer& renderer, bool expand = false, bool align = true, bool fixed = false), gtk_cell_area_box_pack_end)
61 _WRAP_METHOD(int get_spacing() const, gtk_cell_area_box_get_spacing)
62 _WRAP_METHOD(void set_spacing(int spacing), gtk_cell_area_box_set_spacing)
63
64 _WRAP_PROPERTY("spacing", int)
65 };
66
67 } // namespace Gtk