Ardour  9.0-pre0-582-g084a23a80d
editable.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_EDITABLE_H
4 #define _GTKMM_EDITABLE_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: editable.hg,v 1.3 2006/05/18 17:53:15 murrayc Exp $ */
11 
12 /* Copyright (C) 1998-2002 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29 #include <glibmm/interface.h>
30 
31 
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 extern "C"
34 {
35 typedef struct _GtkEditableClass GtkEditableClass;
36 }
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38 
39 
40 #ifndef DOXYGEN_SHOULD_SKIP_THIS
41 typedef struct _GtkEditable GtkEditable;
42 typedef struct _GtkEditableClass GtkEditableClass;
43 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44 
45 
46 #ifndef DOXYGEN_SHOULD_SKIP_THIS
47 namespace Gtk
48 { class Editable_Class; } // namespace Gtk
49 #endif // DOXYGEN_SHOULD_SKIP_THIS
50 
51 namespace Gtk
52 {
53 
65 class Editable : public Glib::Interface
66 {
67 
68 #ifndef DOXYGEN_SHOULD_SKIP_THIS
69 
70 public:
71  typedef Editable CppObjectType;
72  typedef Editable_Class CppClassType;
73  typedef GtkEditable BaseObjectType;
74  typedef GtkEditableClass BaseClassType;
75 
76 private:
77  friend class Editable_Class;
78  static CppClassType editable_class_;
79 
80  // noncopyable
81  Editable(const Editable&);
82  Editable& operator=(const Editable&);
83 
84 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
85 protected:
90 
91 #ifndef DOXYGEN_SHOULD_SKIP_THIS
98  explicit Editable(const Glib::Interface_Class& interface_class);
99 
100 public:
101  // This is public so that C++ wrapper instances can be
102  // created for C instances of unwrapped types.
103  // For instance, if an unexpected C type implements the C interface.
104  explicit Editable(GtkEditable* castitem);
105 
106 protected:
107 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
108 
109 public:
110  virtual ~Editable();
111 
112  static void add_interface(GType gtype_implementer);
113 
116  static GType get_type() G_GNUC_CONST;
117 
118 #ifndef DOXYGEN_SHOULD_SKIP_THIS
119  static GType get_base_type() G_GNUC_CONST;
120 #endif
121 
123  GtkEditable* gobj() { return reinterpret_cast<GtkEditable*>(gobject_); }
124 
126  const GtkEditable* gobj() const { return reinterpret_cast<GtkEditable*>(gobject_); }
127 
128 private:
129 
130 
131 public:
132 
137 
142 
147 
152 
159  void set_editable(bool is_editable = true);
160 
166  bool get_editable() const;
167 
168 
179  void insert_text(const Glib::ustring& text, int length, int& position);
180 
191  void delete_text(int start_pos, int end_pos);
192 
193 
207  Glib::ustring get_chars(int start_pos, int end_pos) const;
208 
209 
221  void select_region(int start_pos, int end_pos);
222 
233  bool get_selection_bounds(int& start_pos, int& end_pos) const;
234 
235 
247 
255  int get_position() const;
256 
257 
258  Glib::SignalProxy2< void,const Glib::ustring&,int* > signal_insert_text();
259 
260 
267  Glib::SignalProxy2< void,int,int > signal_delete_text();
268 
269 
276  Glib::SignalProxy0< void > signal_changed();
277 
278 
279 protected:
280 
281 
282  virtual void delete_text_vfunc(int start_pos, int end_pos);
283 
284 
285  virtual Glib::ustring get_chars_vfunc(int start_pos, int end_pos) const;
286 
287 
288  virtual void select_region_vfunc(int start_pos, int end_pos);
289 
290  virtual bool get_selection_bounds_vfunc(int& start_pos, int& end_pos) const;
291 
292  virtual void set_position_vfunc(int position);
293 
294  virtual int get_position_vfunc() const;
295 
296 
297 public:
298 
299 public:
300  //C++ methods used to invoke GTK+ virtual functions:
301 
302 protected:
303  //GTK+ Virtual Functions (override these to change behaviour):
304 virtual void insert_text_vfunc(const Glib::ustring& text, int& position);
305 
306 
307  //Default Signal Handlers::
309  virtual void on_insert_text(const Glib::ustring& text, int* position);
311  virtual void on_delete_text(int start_pos, int end_pos);
313  virtual void on_changed();
314 
315 
316 };
317 
318 } // namespace Gtk
319 
320 
321 namespace Glib
322 {
331  Glib::RefPtr<Gtk::Editable> wrap(GtkEditable* object, bool take_copy = false);
332 
333 } // namespace Glib
334 
335 
336 #endif /* _GTKMM_EDITABLE_H */
337 
virtual ~Editable()
void cut_clipboard()
Glib::RefPtr< Gtk::Editable > wrap(GtkEditable *object, bool take_copy=false)
Glib::SignalProxy0< void > signal_changed()
virtual int get_position_vfunc() const
const GtkEditable * gobj() const
Provides access to the underlying C GObject.
Definition: editable.h:126
static void add_interface(GType gtype_implementer)
Glib::SignalProxy2< void, const Glib::ustring &, int * > signal_insert_text()
bool get_editable() const
void set_position(int position)
void insert_text(const Glib::ustring &text, int length, int &position)
void set_editable(bool is_editable=true)
virtual void on_delete_text(int start_pos, int end_pos)
This is a default handler for the signal signal_delete_text().
void delete_text(int start_pos, int end_pos)
virtual void on_changed()
This is a default handler for the signal signal_changed().
bool get_selection_bounds(int &start_pos, int &end_pos) const
virtual void insert_text_vfunc(const Glib::ustring &text, int &position)
int get_position() const
virtual void set_position_vfunc(int position)
virtual Glib::ustring get_chars_vfunc(int start_pos, int end_pos) const
static GType get_type() G_GNUC_CONST
virtual void select_region_vfunc(int start_pos, int end_pos)
Glib::SignalProxy2< void, int, int > signal_delete_text()
void select_region(int start_pos, int end_pos)
void delete_selection()
virtual bool get_selection_bounds_vfunc(int &start_pos, int &end_pos) const
GtkEditable * gobj()
Provides access to the underlying C GObject.
Definition: editable.h:123
virtual void delete_text_vfunc(int start_pos, int end_pos)
void copy_clipboard()
void paste_clipboard()
virtual void on_insert_text(const Glib::ustring &text, int *position)
This is a default handler for the signal signal_insert_text().
Glib::ustring get_chars(int start_pos, int end_pos) const
struct _GtkEditable GtkEditable
Definition: gtkeditable.h:47
PBD::PropertyDescriptor< timecnt_t > length
Definition: ardour_ui.h:188