~inkscape.dev/inkscape-devlibs/devlibs-gtk3

« back to all changes in this revision

Viewing changes to include/gtkmm-2.4/gtkmm/fixed.h

  • Committer: JazzyNico
  • Date: 2013-01-21 10:11:05 UTC
  • Revision ID: nicoduf@yahoo.fr-20130121101105-i8d8slkq9ng4olx8
Adding gtk2 libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- c++ -*-
 
2
// Generated by gtkmmproc -- DO NOT MODIFY!
 
3
#ifndef _GTKMM_FIXED_H
 
4
#define _GTKMM_FIXED_H
 
5
 
 
6
 
 
7
#include <glibmm.h>
 
8
 
 
9
/* $Id: fixed.hg,v 1.1 2003/01/21 13:38:49 murrayc Exp $ */
 
10
 
 
11
/* fixed.h
 
12
 * 
 
13
 * Copyright (C) 1998-2002 The gtkmm Development Team
 
14
 *
 
15
 * This library is free software; you can redistribute it and/or
 
16
 * modify it under the terms of the GNU Lesser General Public
 
17
 * License as published by the Free Software Foundation; either
 
18
 * version 2.1 of the License, or (at your option) any later version.
 
19
 *
 
20
 * This library is distributed in the hope that it will be useful,
 
21
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
22
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
23
 * Lesser General Public License for more details.
 
24
 *
 
25
 * You should have received a copy of the GNU Lesser General Public
 
26
 * License along with this library; if not, write to the Free
 
27
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
28
 */
 
29
 
 
30
 
 
31
#include <gtkmm/container.h>
 
32
 
 
33
 
 
34
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
35
typedef struct _GtkFixed GtkFixed;
 
36
typedef struct _GtkFixedClass GtkFixedClass;
 
37
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
38
 
 
39
 
 
40
namespace Gtk
 
41
{ class Fixed_Class; } // namespace Gtk
 
42
namespace Gtk
 
43
{
 
44
 
 
45
/** A container which allows you to position widgets at fixed coordinates.
 
46
 *
 
47
 * The Gtk::Fixed widget is a container which can place child widgets at fixed positions and with fixed sizes, given in pixels. It performs no automatic layout management.
 
48
 * For most applications, you should not use this container, because it will result in truncated text, overlapping widgets, and other display bugs:
 
49
 * - Themes may change widget sizes.
 
50
 * - Fonts other than the one you used to write the app will of course change the size of widgets containing text; keep in mind that users may use a larger font because of difficulty reading the default, or they may be using Windows or the framebuffer port of GTK+, where different fonts are available.
 
51
 * - Translation of text into other languages changes its size. Also, display of non-English text will use a different font in many cases.
 
52
 * In addition, the fixed widget can't properly be mirrored in right-to-left languages such as Hebrew and Arabic. i.e. normally GTK+ will flip the interface to put labels to the right of the thing they label, but it can't do that with Gtk::Fixed. So your application will not be usable in right-to-left languages.
 
53
 * Finally, fixed positioning makes it kind of annoying to add/remove GUI elements, since you have to reposition all the other elements. This is a long-term maintenance problem for your application.
 
54
 * If you know none of these things are an issue for your application, and prefer the simplicity of Gtk::Fixed, by all means use the widget. But you should be aware of the tradeoffs.
 
55
 *
 
56
 * @ingroup Widgets
 
57
 * @ingroup Containers
 
58
 */
 
59
 
 
60
class Fixed : public Container
 
61
{
 
62
  public:
 
63
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
64
  typedef Fixed CppObjectType;
 
65
  typedef Fixed_Class CppClassType;
 
66
  typedef GtkFixed BaseObjectType;
 
67
  typedef GtkFixedClass BaseClassType;
 
68
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
69
 
 
70
  virtual ~Fixed();
 
71
 
 
72
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
73
 
 
74
private:
 
75
  friend class Fixed_Class;
 
76
  static CppClassType fixed_class_;
 
77
 
 
78
  // noncopyable
 
79
  Fixed(const Fixed&);
 
80
  Fixed& operator=(const Fixed&);
 
81
 
 
82
protected:
 
83
  explicit Fixed(const Glib::ConstructParams& construct_params);
 
84
  explicit Fixed(GtkFixed* castitem);
 
85
 
 
86
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
87
 
 
88
public:
 
89
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
90
  static GType get_type()      G_GNUC_CONST;
 
91
 
 
92
 
 
93
  static GType get_base_type() G_GNUC_CONST;
 
94
#endif
 
95
 
 
96
  ///Provides access to the underlying C GtkObject.
 
97
  GtkFixed*       gobj()       { return reinterpret_cast<GtkFixed*>(gobject_); }
 
98
 
 
99
  ///Provides access to the underlying C GtkObject.
 
100
  const GtkFixed* gobj() const { return reinterpret_cast<GtkFixed*>(gobject_); }
 
101
 
 
102
 
 
103
public:
 
104
  //C++ methods used to invoke GTK+ virtual functions:
 
105
 
 
106
protected:
 
107
  //GTK+ Virtual Functions (override these to change behaviour):
 
108
 
 
109
  //Default Signal Handlers::
 
110
 
 
111
 
 
112
private:
 
113
 
 
114
public:
 
115
  Fixed();
 
116
 
 
117
  
 
118
  void put(Widget& widget, int x, int y);
 
119
  
 
120
  void move(Widget& widget, int x, int y);
 
121
  
 
122
#ifndef GTKMM_DISABLE_DEPRECATED
 
123
 
 
124
  /** Sets whether a Gtk::Fixed widget is created with a separate
 
125
   * Gdk::Window for @a widget->window or not. (By default, it will be
 
126
   * created with no separate Gdk::Window). This function must be called
 
127
   * while the Gtk::Fixed is not realized, for instance, immediately after the
 
128
   * window is created.
 
129
   * 
 
130
   * This function was added to provide an easy migration path for
 
131
   * older applications which may expect Gtk::Fixed to have a separate window.
 
132
   * 
 
133
   * Deprecated: 2.20: Use Gtk::Widget::set_has_window() instead.
 
134
   * @param has_window <tt>true</tt> if a separate window should be created.
 
135
   */
 
136
  void set_has_window(bool has_window =  true);
 
137
#endif // GTKMM_DISABLE_DEPRECATED
 
138
 
 
139
 
 
140
#ifndef GTKMM_DISABLE_DEPRECATED
 
141
 
 
142
  /** Gets whether the Gtk::Fixed has its own Gdk::Window.
 
143
   * See set_has_window().
 
144
   * 
 
145
   * Deprecated: 2.20: Use Gtk::Widget::get_has_window() instead.
 
146
   * @return <tt>true</tt> if @a fixed has its own window.
 
147
   */
 
148
  bool get_has_window() const;
 
149
#endif // GTKMM_DISABLE_DEPRECATED
 
150
 
 
151
 
 
152
};
 
153
 
 
154
} /* namespace Gtk */
 
155
 
 
156
 
 
157
namespace Glib
 
158
{
 
159
  /** A Glib::wrap() method for this object.
 
160
   * 
 
161
   * @param object The C instance.
 
162
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 
163
   * @result A C++ instance that wraps this C instance.
 
164
   *
 
165
   * @relates Gtk::Fixed
 
166
   */
 
167
  Gtk::Fixed* wrap(GtkFixed* object, bool take_copy = false);
 
168
} //namespace Glib
 
169
 
 
170
 
 
171
#endif /* _GTKMM_FIXED_H */
 
172