Debian Codegraph @

gtk/src/stackswitcher.hg

raw
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 <https://www.gnu.org/licenses/>.
15 */
16
17 #include <gtkmm/box.h>
18 #include <gtkmm/stack.h>
19
20 _DEFS(gtkmm,gtk)
21 _PINCLUDE(gtkmm/private/box_p.h)
22
23 namespace Gtk
24 {
25 // Gtk::StackSwitcher is formally a container widget, but it's not included
26 // in group Containers. A StackSwitcher adds its children itself, when a Stack
27 // is connected. Users of StackSwitcher shall not call its inherited add() method.
28
29 /** A controller for a Gtk::Stack.
30 *
31 * It shows a row of buttons to switch between the various pages of
32 * the associated stack widget.
33 *
34 * All the content for the buttons comes from the child properties of
35 * the Gtk::Stack.
36 *
37 * It is possible to associate multiple StackSwitcher widgets with
38 * the same stack widget.
39 *
40 * @ingroup Widgets
41 * @newin{3,10}
42 */
43 class GTKMM_API StackSwitcher
44 : public Box
45 {
46 _CLASS_GTKOBJECT(StackSwitcher, GtkStackSwitcher, GTK_STACK_SWITCHER, Gtk::Box, GtkBox, , , GTKMM_API)
47 public:
48 _CTOR_DEFAULT
49
50 _WRAP_METHOD(void set_stack(Stack& stack), gtk_stack_switcher_set_stack)
51 /** Unsets the associated Stack.
52 * @see set_stack().
53 * @newin{3,16}
54 */
55 void unset_stack();
56
57 _WRAP_METHOD(Stack* get_stack(), gtk_stack_switcher_get_stack)
58 _WRAP_METHOD(const Stack* get_stack() const, gtk_stack_switcher_get_stack, constversion)
59
60 _WRAP_PROPERTY("icon-size", IconSize)
61 _WRAP_PROPERTY("stack", Stack*)
62
63 // There are no signals or vfuncs.
64 };
65
66 } // namespace Gtk