File: arrow.hg

package info (click to toggle)
gtkmm3.0 3.24.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 22,680 kB
  • sloc: xml: 121,333; cpp: 8,531; sh: 4,250; makefile: 262; perl: 236
file content (80 lines) | stat: -rw-r--r-- 2,808 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
 * Copyright (C) 1998-2002 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include <gtkmm/misc.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/misc_p.h)

#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
#undef GTK_DISABLE_DEPRECATED
#define GDK_DISABLE_DEPRECATION_WARNINGS 1
#m4 _POP()

namespace Gtk
{

/** Produces an arrow pointing in one of the four cardinal directions.
 *
 * This is intended for use where a directional arrow (in one of the four
 * cardinal directions) is desired. As such, it has very limited
 * functionality and basically only draws itself in a particular direction
 * and with a particular shadow type.
 *
 * Gtk::Arrow will fill any space alloted to it, but since it is inherited
 * from Gtk::Misc, it can be padded and/or aligned, to fill exactly the
 * space the programmer desires.
 *
 * The Arrow widget looks like this:
 * @image html arrow1.png
 *
 * @ingroup Widgets
 * @deprecated You should instead use a Gtk::Image with a
 * suitable icon name, such as “pan-down-symbolic“. When replacing
 * Gtk::Arrow by an image, pay attention to the fact that Gtk::Arrow automatically
 * flips between Gtk::ARROW_LEFT and Gtk::ARROW_RIGHT,
 * depending on the text direction. To get the same effect with an image,
 * use the icon names “pan-start-symbolic“ and “pan-end-symbolic“, which
 * react to the text direction instead of “pan-left-symbolic“ and
 * “pan-right-symbolic“ which don't.
 */
class Arrow : public Misc {
  _CLASS_GTKOBJECT(Arrow,GtkArrow,GTK_ARROW,Gtk::Misc,GtkMisc)
  _IS_DEPRECATED
public:


  /** Creates an arrow.
   *
   * @param arrow_type A Gtk::ArrowType enum describing the arrow direction.
   * @param shadow_type A Gtk::ShadowType enum describing the shadow type of
   * the arrow.
   */
  _WRAP_CTOR(Arrow(ArrowType arrow_type, ShadowType shadow_type), gtk_arrow_new)


  // Changes the direction and shadow of an arrow.
  _WRAP_METHOD(void set(ArrowType arrow_type, ShadowType shadow_type),gtk_arrow_set)

  _WRAP_PROPERTY("arrow-type", ArrowType)
  _WRAP_PROPERTY("shadow-type", ShadowType)

};


} //namespace Gtk