Debian Codegraph @

gtk/src/arrow.hg

raw
1 /* Copyright (C) 1998-2002 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 // To exclude this file from the documentation when build-deprecated-api=false.
18 _CONFIGINCLUDE(gtkmmconfig.h)
19
20 #include <gtkmm/misc.h>
21 _DEFS(gtkmm,gtk)
22 _PINCLUDE(gtkmm/private/misc_p.h)
23
24 #m4 _PUSH(SECTION_CC_PRE_INCLUDES)
25 #undef GTK_DISABLE_DEPRECATED
26 #define GDK_DISABLE_DEPRECATION_WARNINGS 1
27 #m4 _POP()
28
29 namespace Gtk
30 {
31
32 /** Produces an arrow pointing in one of the four cardinal directions.
33 *
34 * This is intended for use where a directional arrow (in one of the four
35 * cardinal directions) is desired. As such, it has very limited
36 * functionality and basically only draws itself in a particular direction
37 * and with a particular shadow type.
38 *
39 * Gtk::Arrow will fill any space alloted to it, but since it is inherited
40 * from Gtk::Misc, it can be padded and/or aligned, to fill exactly the
41 * space the programmer desires.
42 *
43 * The Arrow widget looks like this:
44 * @image html arrow1.png
45 *
46 * @ingroup Widgets
47 * @deprecated You should instead use a Gtk::Image with a
48 * suitable icon name, such as “pan-down-symbolic“. When replacing
49 * Gtk::Arrow by an image, pay attention to the fact that Gtk::Arrow automatically
50 * flips between Gtk::ARROW_LEFT and Gtk::ARROW_RIGHT,
51 * depending on the text direction. To get the same effect with an image,
52 * use the icon names “pan-start-symbolic“ and “pan-end-symbolic“, which
53 * react to the text direction instead of “pan-left-symbolic“ and
54 * “pan-right-symbolic“ which don't.
55 */
56 class GTKMM_API Arrow : public Misc {
57 _CLASS_GTKOBJECT(Arrow,GtkArrow,GTK_ARROW,Gtk::Misc,GtkMisc,,,GTKMM_API)
58 _IS_DEPRECATED
59 public:
60
61 /** Creates an arrow.
62 *
63 * @param arrow_type A Gtk::ArrowType enum describing the arrow direction.
64 * @param shadow_type A Gtk::ShadowType enum describing the shadow type of
65 * the arrow.
66 */
67 _WRAP_CTOR(Arrow(ArrowType arrow_type, ShadowType shadow_type), gtk_arrow_new)
68
69 // Changes the direction and shadow of an arrow.
70 _WRAP_METHOD(void set(ArrowType arrow_type, ShadowType shadow_type),gtk_arrow_set)
71
72 _WRAP_PROPERTY("arrow-type", ArrowType)
73 _WRAP_PROPERTY("shadow-type", ShadowType)
74
75 };
76
77 } //namespace Gtk