add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / celleditable.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_CELLEDITABLE_H
4 #define _GTKMM_CELLEDITABLE_H
5
6
7 #include <glibmm.h>
8
9 /* $Id$ */
10
11 /* Copyright (C) 1998-2002 The gtkmm Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Library General Public
15  * License as published by the Free Software Foundation; either
16  * version 2 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Library General Public License for more details.
22  *
23  * You should have received a copy of the GNU Library General Public
24  * License along with this library; if not, write to the Free
25  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26  */
27
28 #include <glibmm/interface.h>
29
30
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
32 extern "C"
33 {
34 typedef struct _GtkCellEditableIface GtkCellEditableIface;
35 typedef union _GdkEvent GdkEvent;
36 }
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38
39
40 #ifndef DOXYGEN_SHOULD_SKIP_THIS
41 typedef struct _GtkCellEditable GtkCellEditable;
42 typedef struct _GtkCellEditableClass GtkCellEditableClass;
43 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44
45
46 namespace Gtk
47 { class CellEditable_Class; } // namespace Gtk
48 namespace Gtk
49 {
50
51 /** Interface for widgets which are used for editing cells.
52  * The CellEditable interface must be implemented for widgets to be usable when editing the contents of a TreeView cell. 
53  */
54
55 class CellEditable : public Glib::Interface
56 {
57   
58 #ifndef DOXYGEN_SHOULD_SKIP_THIS
59
60 public:
61   typedef CellEditable CppObjectType;
62   typedef CellEditable_Class CppClassType;
63   typedef GtkCellEditable BaseObjectType;
64   typedef GtkCellEditableIface BaseClassType;
65
66 private:
67   friend class CellEditable_Class;
68   static CppClassType celleditable_class_;
69
70   // noncopyable
71   CellEditable(const CellEditable&);
72   CellEditable& operator=(const CellEditable&);
73
74 protected:
75   CellEditable(); // you must derive from this class
76
77 public:
78   // This is public so that C++ wrapper instances can be
79   // created for C instances of unwrapped types.
80   // For instance, if an unexpected C type implements the C interface. 
81   explicit CellEditable(GtkCellEditable* castitem);
82
83 protected:
84 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
85
86 public:
87   virtual ~CellEditable();
88
89   static void add_interface(GType gtype_implementer);
90
91 #ifndef DOXYGEN_SHOULD_SKIP_THIS
92   static GType get_type()      G_GNUC_CONST;
93   static GType get_base_type() G_GNUC_CONST;
94 #endif
95
96   ///Provides access to the underlying C GObject.
97   GtkCellEditable*       gobj()       { return reinterpret_cast<GtkCellEditable*>(gobject_); }
98
99   ///Provides access to the underlying C GObject.  
100   const GtkCellEditable* gobj() const { return reinterpret_cast<GtkCellEditable*>(gobject_); }
101
102 private:
103
104
105 public:
106   
107   /** Begins editing on a @a cell_editable . @a event  is the Gdk::Event that began 
108    * the editing process. It may be <tt>0</tt>, in the instance that editing was 
109    * initiated through programatic means.
110    * @param event A Gdk::Event, or <tt>0</tt>.
111    */
112   void start_editing(GdkEvent* event);
113   
114   /** Emits the Gtk::CellEditable::editing-done signal.
115    */
116   void editing_done();
117   
118   /** Emits the Gtk::CellEditable::remove-widget signal.
119    */
120   void remove_widget();
121
122   
123   /**
124    * @par Prototype:
125    * <tt>void on_my_%editing_done()</tt>
126    */
127
128   Glib::SignalProxy0< void > signal_editing_done();
129
130   
131   /**
132    * @par Prototype:
133    * <tt>void on_my_%remove_widget()</tt>
134    */
135
136   Glib::SignalProxy0< void > signal_remove_widget();
137
138
139 protected:
140   #ifdef GLIBMM_VFUNCS_ENABLED
141   virtual void start_editing_vfunc(GdkEvent* event);
142 #endif //GLIBMM_VFUNCS_ENABLED
143
144
145 public:
146
147 public:
148   //C++ methods used to invoke GTK+ virtual functions:
149 #ifdef GLIBMM_VFUNCS_ENABLED
150 #endif //GLIBMM_VFUNCS_ENABLED
151
152 protected:
153   //GTK+ Virtual Functions (override these to change behaviour):
154 #ifdef GLIBMM_VFUNCS_ENABLED
155 #endif //GLIBMM_VFUNCS_ENABLED
156
157   //Default Signal Handlers::
158 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
159   virtual void on_editing_done();
160   virtual void on_remove_widget();
161 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
162
163
164 };
165
166 } // namespace Gtk
167
168
169 namespace Glib
170 {
171   /** A Glib::wrap() method for this object.
172    * 
173    * @param object The C instance.
174    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
175    * @result A C++ instance that wraps this C instance.
176    *
177    * @relates Gtk::CellEditable
178    */
179   Glib::RefPtr<Gtk::CellEditable> wrap(GtkCellEditable* object, bool take_copy = false);
180
181 } // namespace Glib
182
183
184 #endif /* _GTKMM_CELLEDITABLE_H */
185