add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / cellrenderer.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_CELLRENDERER_H
4 #define _GTKMM_CELLRENDERER_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 <gtkmm/object.h>
29 #include <gtkmm/widget.h>
30 #include <gtkmm/celleditable.h>
31
32
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkCellRenderer GtkCellRenderer;
35 typedef struct _GtkCellRendererClass GtkCellRendererClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37
38
39 namespace Gtk
40 { class CellRenderer_Class; } // namespace Gtk
41 namespace Gtk
42 {
43
44
45 /** @addtogroup gtkmmEnums Enums and Flags */
46
47 /**
48  * @ingroup gtkmmEnums
49  * @par Bitwise operators:
50  * <tt>%CellRendererState operator|(CellRendererState, CellRendererState)</tt><br>
51  * <tt>%CellRendererState operator&(CellRendererState, CellRendererState)</tt><br>
52  * <tt>%CellRendererState operator^(CellRendererState, CellRendererState)</tt><br>
53  * <tt>%CellRendererState operator~(CellRendererState)</tt><br>
54  * <tt>%CellRendererState& operator|=(CellRendererState&, CellRendererState)</tt><br>
55  * <tt>%CellRendererState& operator&=(CellRendererState&, CellRendererState)</tt><br>
56  * <tt>%CellRendererState& operator^=(CellRendererState&, CellRendererState)</tt><br>
57  */
58 enum CellRendererState
59 {
60   CELL_RENDERER_SELECTED = 1 << 0,
61   CELL_RENDERER_PRELIT = 1 << 1,
62   CELL_RENDERER_INSENSITIVE = 1 << 2,
63   CELL_RENDERER_SORTED = 1 << 3,
64   CELL_RENDERER_FOCUSED = 1 << 4
65 };
66
67 /** @ingroup gtkmmEnums */
68 inline CellRendererState operator|(CellRendererState lhs, CellRendererState rhs)
69   { return static_cast<CellRendererState>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
70
71 /** @ingroup gtkmmEnums */
72 inline CellRendererState operator&(CellRendererState lhs, CellRendererState rhs)
73   { return static_cast<CellRendererState>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
74
75 /** @ingroup gtkmmEnums */
76 inline CellRendererState operator^(CellRendererState lhs, CellRendererState rhs)
77   { return static_cast<CellRendererState>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
78
79 /** @ingroup gtkmmEnums */
80 inline CellRendererState operator~(CellRendererState flags)
81   { return static_cast<CellRendererState>(~static_cast<unsigned>(flags)); }
82
83 /** @ingroup gtkmmEnums */
84 inline CellRendererState& operator|=(CellRendererState& lhs, CellRendererState rhs)
85   { return (lhs = static_cast<CellRendererState>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
86
87 /** @ingroup gtkmmEnums */
88 inline CellRendererState& operator&=(CellRendererState& lhs, CellRendererState rhs)
89   { return (lhs = static_cast<CellRendererState>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
90
91 /** @ingroup gtkmmEnums */
92 inline CellRendererState& operator^=(CellRendererState& lhs, CellRendererState rhs)
93   { return (lhs = static_cast<CellRendererState>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
94
95 } // namespace Gtk
96
97
98 #ifndef DOXYGEN_SHOULD_SKIP_THIS
99 namespace Glib
100 {
101
102 template <>
103 class Value<Gtk::CellRendererState> : public Glib::Value_Flags<Gtk::CellRendererState>
104 {
105 public:
106   static GType value_type() G_GNUC_CONST;
107 };
108
109 } // namespace Glib
110 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
111
112
113 namespace Gtk
114 {
115
116 /**
117  * @ingroup gtkmmEnums
118  */
119 enum CellRendererMode
120 {
121   CELL_RENDERER_MODE_INERT,
122   CELL_RENDERER_MODE_ACTIVATABLE,
123   CELL_RENDERER_MODE_EDITABLE
124 };
125
126 } // namespace Gtk
127
128
129 #ifndef DOXYGEN_SHOULD_SKIP_THIS
130 namespace Glib
131 {
132
133 template <>
134 class Value<Gtk::CellRendererMode> : public Glib::Value_Enum<Gtk::CellRendererMode>
135 {
136 public:
137   static GType value_type() G_GNUC_CONST;
138 };
139
140 } // namespace Glib
141 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
142
143
144 namespace Gtk
145 {
146
147
148 /** CellRenderers are used by Gtk::TreeView columns to render the Gtk::TreeModel column data appropriately.
149  * They display, and allow editing of, the values of their properties.
150  * In most cases, Gtk::TreeView::append_column() will automatically choose the appropriate renderer for the mode column's data type,
151  * so you will rarely need to worry about these classes.
152  *
153  * @ingroup TreeView
154  */
155
156 class CellRenderer : public Gtk::Object
157 {
158   public:
159 #ifndef DOXYGEN_SHOULD_SKIP_THIS
160   typedef CellRenderer CppObjectType;
161   typedef CellRenderer_Class CppClassType;
162   typedef GtkCellRenderer BaseObjectType;
163   typedef GtkCellRendererClass BaseClassType;
164 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
165
166   virtual ~CellRenderer();
167
168 #ifndef DOXYGEN_SHOULD_SKIP_THIS
169
170 private:
171   friend class CellRenderer_Class;
172   static CppClassType cellrenderer_class_;
173
174   // noncopyable
175   CellRenderer(const CellRenderer&);
176   CellRenderer& operator=(const CellRenderer&);
177
178 protected:
179   explicit CellRenderer(const Glib::ConstructParams& construct_params);
180   explicit CellRenderer(GtkCellRenderer* castitem);
181
182 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
183
184 public:
185 #ifndef DOXYGEN_SHOULD_SKIP_THIS
186   static GType get_type()      G_GNUC_CONST;
187   static GType get_base_type() G_GNUC_CONST;
188 #endif
189
190   ///Provides access to the underlying C GtkObject.
191   GtkCellRenderer*       gobj()       { return reinterpret_cast<GtkCellRenderer*>(gobject_); }
192
193   ///Provides access to the underlying C GtkObject.
194   const GtkCellRenderer* gobj() const { return reinterpret_cast<GtkCellRenderer*>(gobject_); }
195
196
197 public:
198   //C++ methods used to invoke GTK+ virtual functions:
199 #ifdef GLIBMM_VFUNCS_ENABLED
200 #endif //GLIBMM_VFUNCS_ENABLED
201
202 protected:
203   //GTK+ Virtual Functions (override these to change behaviour):
204 #ifdef GLIBMM_VFUNCS_ENABLED
205 #endif //GLIBMM_VFUNCS_ENABLED
206
207   //Default Signal Handlers::
208 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
209   virtual void on_editing_canceled();
210 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
211
212
213 private:
214
215 public:
216
217   
218   /** Obtains the width and height needed to render the cell. Used by view widgets
219    * to determine the appropriate size for the cell_area passed to
220    * render().  Fills in the x and y
221    * offsets of the cell relative to this location.  Please note that the
222    * values set in @a width  and @a height , as well as those in @a x_offset  and @a y_offset 
223    * are inclusive of the xpad and ypad properties.
224    * @param widget The widget the renderer is rendering to.
225    * @param cell_area The area a cell will be allocated.
226    * @param x_offset Location to return x offset of cell relative to @a cell_area .
227    * @param y_offset Location to return y offset of cell relative to @a cell_area .
228    * @param width Location to return width needed to render a cell.
229    * @param height Location to return height needed to render a cell.
230    */
231   void get_size(
232                   Widget& widget,
233                   const Gdk::Rectangle& cell_area,
234                   int& x_offset, int& y_offset,
235                   int& width,    int& height) const;
236
237   /** Obtains the width and height needed to render the cell. Used by view widgets
238    * to determine the appropriate size for the cell_area passed to
239    * render().  Fills in the x and y
240    * offsets of the cell relative to this location.  Please note that the
241    * values set in @a width  and @a height , as well as those in @a x_offset  and @a y_offset
242    * are inclusive of the xpad and ypad properties.
243    * @param widget The widget the renderer is rendering to.
244    * @param x_offset Location to return x offset of cell relative to @a cell_area.
245    * @param y_offset Location to return y offset of cell relative to @a cell_area.
246    * @param width Location to return width needed to render a cell.
247    * @param height Location to return height needed to render a cell.
248    */
249   void get_size(Widget& widget, int& x_offset, int& y_offset, int& width, int& height) const;
250
251   
252   /** Invokes the virtual render function of the Gtk::CellRenderer. The three
253    * passed-in rectangles are areas of @a window . Most renderers will draw within
254    *  @a cell_area ; the xalign, yalign, xpad, and ypad fields of the Gtk::CellRenderer
255    * should be honored with respect to @a cell_area . @a background_area  includes the
256    * blank space around the cell, and also the area containing the tree expander;
257    * so the @a background_area  rectangles for all cells tile to cover the entire
258    *  @a window .  @a expose_area  is a clip rectangle.
259    * @param window A Gdk::Drawable to draw to.
260    * @param widget The widget owning @a window .
261    * @param background_area Entire cell area (including tree expanders and maybe 
262    * padding on the sides).
263    * @param cell_area Area normally rendered by a cell renderer.
264    * @param expose_area Area that actually needs updating.
265    * @param flags Flags that affect rendering.
266    */
267   void render(
268                   const Glib::RefPtr<Gdk::Window>& window,
269                   Widget& widget,
270                   const Gdk::Rectangle& background_area,
271                   const Gdk::Rectangle& cell_area,
272                   const Gdk::Rectangle& expose_area,
273                   CellRendererState flags);
274
275   
276   /** Passes an activate event to the cell renderer for possible processing.  
277    * Some cell renderers may use events; for example, Gtk::CellRendererToggle 
278    * toggles when it gets a mouse click.
279    * @param event A Gdk::Event.
280    * @param widget Widget that received the event.
281    * @param path Widget-dependent string representation of the event location; 
282    * e.g. for Gtk::TreeView, a string representation of Gtk::TreePath.
283    * @param background_area Background area as passed to render().
284    * @param cell_area Cell area as passed to render().
285    * @param flags Render flags.
286    * @return <tt>true</tt> if the event was consumed/handled.
287    */
288   bool activate(
289                   GdkEvent* event,
290                   Widget& widget,
291                   const Glib::ustring& path,
292                   const Gdk::Rectangle& background_area,
293                   const Gdk::Rectangle& cell_area,
294                   CellRendererState flags);
295
296   
297   /** Passes an activate event to the cell renderer for possible processing.
298    * @param event A Gdk::Event.
299    * @param widget Widget that received the event.
300    * @param path Widget-dependent string representation of the event location; 
301    * e.g. for Gtk::TreeView, a string representation of Gtk::TreePath.
302    * @param background_area Background area as passed to render().
303    * @param cell_area Cell area as passed to render().
304    * @param flags Render flags.
305    * @return A new Gtk::CellEditable, or <tt>0</tt>.
306    */
307   CellEditable* start_editing(
308                   GdkEvent* event, Widget& widget,
309                   const Glib::ustring& path,
310                   const Gdk::Rectangle& background_area,
311                   const Gdk::Rectangle& cell_area,
312                   CellRendererState flags = CellRendererState(0));
313
314   
315   /** Sets the renderer size to be explicit, independent of the properties set.
316    * @param width The width of the cell renderer, or -1.
317    * @param height The height of the cell renderer, or -1.
318    */
319   void set_fixed_size(int width, int height);
320   
321   /** Fills in @a width  and @a height  with the appropriate size of @a cell .
322    * @param width Location to fill in with the fixed width of the widget.
323    * @param height Location to fill in with the fixed height of the widget.
324    */
325   void get_fixed_size(int& width, int& height) const;
326
327   
328 #ifndef GTKMM_DISABLE_DEPRECATED
329
330   /** Causes the cell renderer to emit the Gtk::CellRenderer::editing-canceled 
331    * signal.  
332    * 
333    * This function is for use only by implementations of cell renderers that 
334    * need to notify the client program that an editing process was canceled 
335    * and the changes were not committed.
336    * 
337    * @newin2p4
338    * Deprecated: 2.6: Use stop_editing() instead
339    * @deprecated Use stop_editing().
340    */
341   void editing_canceled();
342 #endif // GTKMM_DISABLE_DEPRECATED
343
344
345   /** Informs the cell renderer that the editing is stopped.
346    * If @a canceled  is <tt>true</tt>, the cell renderer will emit the 
347    * Gtk::CellRenderer::editing-canceled signal. 
348    * 
349    * This function should be called by cell renderer implementations 
350    * in response to the Gtk::CellEditable::editing-done signal of 
351    * Gtk::CellEditable.
352    * 
353    * @newin2p6
354    * @param canceled <tt>true</tt> if the editing has been canceled.
355    */
356   void stop_editing(bool canceled = false);
357
358   /** Returns the property that this CellRenderer renders.
359    * For instance, property_text for CellRendererText, and property_active for CellRendererToggle
360    * Needs to be overridden in derived classes.
361    */
362 #ifdef GLIBMM_PROPERTIES_ENABLED
363   virtual Glib::PropertyProxy_Base _property_renderable();
364 #else
365   virtual Glib::ustring _property_renderable();
366 #endif
367
368   /** This signal is emitted when the user cancels the process of editing a
369    * cell.  For example, an editable cell renderer could be written to cancel
370    * editing when the user presses Escape. 
371    *
372    * @see editing_canceled() 
373    *
374    * @par Prototype:
375    * <tt>void on_my_%editing_canceled()</tt>
376    */
377
378   Glib::SignalProxy0< void > signal_editing_canceled();
379
380   
381   //We use no_default_handler for this, because we can not add a new vfunc to 2.5 without breaking ABI.
382   //TODO: Remove no_default_handler when we do an ABI-break-with-parallel-install.
383   //TODO: Remove the warning in the documentation when we have fixed the inheritance of CellRendererCombo.
384   /** This signal gets emitted when a cell starts to be edited.
385    * The indended use of this signal is to do special setup
386    * on @a editable, e.g. adding an EntryCompletion or setting
387    * up additional columns in a ComboBox.
388    *
389    * Note that GTK+ doesn't guarantee that cell renderers will
390    * continue to use the same kind of widget for editing in future
391    * releases, therefore you should check the type of @a editable
392    * before doing any specific setup.
393    *
394    * Note that this signal does not work yet in gtkmm.
395    * See http://bugzilla.gnome.org/show_bug.cgi?id=301597
396    *
397    * @newin2p6
398    *
399    * @param editable the CellEditable.
400    * @param path the path identifying the edited cell.
401    *
402    * @par Prototype:
403    * <tt>void on_my_%editing_started(CellEditable* editable, const Glib::ustring& path)</tt>
404    */
405
406   Glib::SignalProxy2< void,CellEditable*,const Glib::ustring& > signal_editing_started();
407
408
409   #ifdef GLIBMM_PROPERTIES_ENABLED
410 /** Editable mode of the CellRenderer.
411    *
412    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
413    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
414    * the value of the property changes.
415    */
416   Glib::PropertyProxy<CellRendererMode> property_mode() ;
417 #endif //#GLIBMM_PROPERTIES_ENABLED
418
419 #ifdef GLIBMM_PROPERTIES_ENABLED
420 /** Editable mode of the CellRenderer.
421    *
422    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
423    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
424    * the value of the property changes.
425    */
426   Glib::PropertyProxy_ReadOnly<CellRendererMode> property_mode() const;
427 #endif //#GLIBMM_PROPERTIES_ENABLED
428
429   #ifdef GLIBMM_PROPERTIES_ENABLED
430 /** Display the cell.
431    *
432    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
433    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
434    * the value of the property changes.
435    */
436   Glib::PropertyProxy<bool> property_visible() ;
437 #endif //#GLIBMM_PROPERTIES_ENABLED
438
439 #ifdef GLIBMM_PROPERTIES_ENABLED
440 /** Display the cell.
441    *
442    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
443    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
444    * the value of the property changes.
445    */
446   Glib::PropertyProxy_ReadOnly<bool> property_visible() const;
447 #endif //#GLIBMM_PROPERTIES_ENABLED
448
449   #ifdef GLIBMM_PROPERTIES_ENABLED
450 /** Display the cell sensitive.
451    *
452    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
453    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
454    * the value of the property changes.
455    */
456   Glib::PropertyProxy<bool> property_sensitive() ;
457 #endif //#GLIBMM_PROPERTIES_ENABLED
458
459 #ifdef GLIBMM_PROPERTIES_ENABLED
460 /** Display the cell sensitive.
461    *
462    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
463    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
464    * the value of the property changes.
465    */
466   Glib::PropertyProxy_ReadOnly<bool> property_sensitive() const;
467 #endif //#GLIBMM_PROPERTIES_ENABLED
468
469   #ifdef GLIBMM_PROPERTIES_ENABLED
470 /** The x-align.
471    *
472    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
473    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
474    * the value of the property changes.
475    */
476   Glib::PropertyProxy<float> property_xalign() ;
477 #endif //#GLIBMM_PROPERTIES_ENABLED
478
479 #ifdef GLIBMM_PROPERTIES_ENABLED
480 /** The x-align.
481    *
482    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
483    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
484    * the value of the property changes.
485    */
486   Glib::PropertyProxy_ReadOnly<float> property_xalign() const;
487 #endif //#GLIBMM_PROPERTIES_ENABLED
488
489   #ifdef GLIBMM_PROPERTIES_ENABLED
490 /** The y-align.
491    *
492    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
493    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
494    * the value of the property changes.
495    */
496   Glib::PropertyProxy<float> property_yalign() ;
497 #endif //#GLIBMM_PROPERTIES_ENABLED
498
499 #ifdef GLIBMM_PROPERTIES_ENABLED
500 /** The y-align.
501    *
502    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
503    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
504    * the value of the property changes.
505    */
506   Glib::PropertyProxy_ReadOnly<float> property_yalign() const;
507 #endif //#GLIBMM_PROPERTIES_ENABLED
508
509   #ifdef GLIBMM_PROPERTIES_ENABLED
510 /** The xpad.
511    *
512    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
513    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
514    * the value of the property changes.
515    */
516   Glib::PropertyProxy<unsigned int> property_xpad() ;
517 #endif //#GLIBMM_PROPERTIES_ENABLED
518
519 #ifdef GLIBMM_PROPERTIES_ENABLED
520 /** The xpad.
521    *
522    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
523    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
524    * the value of the property changes.
525    */
526   Glib::PropertyProxy_ReadOnly<unsigned int> property_xpad() const;
527 #endif //#GLIBMM_PROPERTIES_ENABLED
528
529   #ifdef GLIBMM_PROPERTIES_ENABLED
530 /** The ypad.
531    *
532    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
533    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
534    * the value of the property changes.
535    */
536   Glib::PropertyProxy<unsigned int> property_ypad() ;
537 #endif //#GLIBMM_PROPERTIES_ENABLED
538
539 #ifdef GLIBMM_PROPERTIES_ENABLED
540 /** The ypad.
541    *
542    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
543    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
544    * the value of the property changes.
545    */
546   Glib::PropertyProxy_ReadOnly<unsigned int> property_ypad() const;
547 #endif //#GLIBMM_PROPERTIES_ENABLED
548
549   #ifdef GLIBMM_PROPERTIES_ENABLED
550 /** The fixed width.
551    *
552    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
553    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
554    * the value of the property changes.
555    */
556   Glib::PropertyProxy<int> property_width() ;
557 #endif //#GLIBMM_PROPERTIES_ENABLED
558
559 #ifdef GLIBMM_PROPERTIES_ENABLED
560 /** The fixed width.
561    *
562    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
563    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
564    * the value of the property changes.
565    */
566   Glib::PropertyProxy_ReadOnly<int> property_width() const;
567 #endif //#GLIBMM_PROPERTIES_ENABLED
568
569   #ifdef GLIBMM_PROPERTIES_ENABLED
570 /** The fixed height.
571    *
572    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
573    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
574    * the value of the property changes.
575    */
576   Glib::PropertyProxy<int> property_height() ;
577 #endif //#GLIBMM_PROPERTIES_ENABLED
578
579 #ifdef GLIBMM_PROPERTIES_ENABLED
580 /** The fixed height.
581    *
582    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
583    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
584    * the value of the property changes.
585    */
586   Glib::PropertyProxy_ReadOnly<int> property_height() const;
587 #endif //#GLIBMM_PROPERTIES_ENABLED
588
589   #ifdef GLIBMM_PROPERTIES_ENABLED
590 /** Row has children.
591    *
592    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
593    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
594    * the value of the property changes.
595    */
596   Glib::PropertyProxy<bool> property_is_expander() ;
597 #endif //#GLIBMM_PROPERTIES_ENABLED
598
599 #ifdef GLIBMM_PROPERTIES_ENABLED
600 /** Row has children.
601    *
602    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
603    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
604    * the value of the property changes.
605    */
606   Glib::PropertyProxy_ReadOnly<bool> property_is_expander() const;
607 #endif //#GLIBMM_PROPERTIES_ENABLED
608
609   #ifdef GLIBMM_PROPERTIES_ENABLED
610 /** Row is an expander row
611    *
612    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
613    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
614    * the value of the property changes.
615    */
616   Glib::PropertyProxy<bool> property_is_expanded() ;
617 #endif //#GLIBMM_PROPERTIES_ENABLED
618
619 #ifdef GLIBMM_PROPERTIES_ENABLED
620 /** Row is an expander row
621    *
622    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
623    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
624    * the value of the property changes.
625    */
626   Glib::PropertyProxy_ReadOnly<bool> property_is_expanded() const;
627 #endif //#GLIBMM_PROPERTIES_ENABLED
628
629   #ifdef GLIBMM_PROPERTIES_ENABLED
630 /** Cell background color as a string.
631    *
632    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
633    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
634    * the value of the property changes.
635    */
636   Glib::PropertyProxy_WriteOnly<Glib::ustring> property_cell_background() ;
637 #endif //#GLIBMM_PROPERTIES_ENABLED
638
639
640   #ifdef GLIBMM_PROPERTIES_ENABLED
641 /** Cell background color as a GdkColor.
642    *
643    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
644    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
645    * the value of the property changes.
646    */
647   Glib::PropertyProxy<Gdk::Color> property_cell_background_gdk() ;
648 #endif //#GLIBMM_PROPERTIES_ENABLED
649
650 #ifdef GLIBMM_PROPERTIES_ENABLED
651 /** Cell background color as a GdkColor.
652    *
653    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
654    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
655    * the value of the property changes.
656    */
657   Glib::PropertyProxy_ReadOnly<Gdk::Color> property_cell_background_gdk() const;
658 #endif //#GLIBMM_PROPERTIES_ENABLED
659  
660   #ifdef GLIBMM_PROPERTIES_ENABLED
661 /** Whether this tag affects the cell background color.
662    *
663    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
664    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
665    * the value of the property changes.
666    */
667   Glib::PropertyProxy<bool> property_cell_background_set() ;
668 #endif //#GLIBMM_PROPERTIES_ENABLED
669
670 #ifdef GLIBMM_PROPERTIES_ENABLED
671 /** Whether this tag affects the cell background color.
672    *
673    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
674    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
675    * the value of the property changes.
676    */
677   Glib::PropertyProxy_ReadOnly<bool> property_cell_background_set() const;
678 #endif //#GLIBMM_PROPERTIES_ENABLED
679
680
681 protected:
682   CellRenderer();
683
684   /** Override this in derived CellRenderers.
685    *
686    * Obtains the width and height needed to render the cell. Used by view widgets
687    * to determine the appropriate size for the cell_area passed to
688    * render().  If @a cell_area is not 0, fills in the x and y
689    * offsets (if set) of the cell relative to this location.  Please note that the
690    * values set in @a width and @a height, as well as those in @a x_offset and @a y_offset
691    * are inclusive of the xpad and ypad properties.
692    *
693    * @param widget The widget the renderer is rendering to.
694    * @param cell_area The area a cell will be allocated, or 0.
695    * @param x_offset x offset of cell relative to @a cell_area.
696    * @param y_offset y offset of cell relative to @a cell_area.
697    * @param width Width needed to render a cell.
698    * @param height Height needed to render a cell.
699    **/
700   #ifdef GLIBMM_VFUNCS_ENABLED
701   virtual void get_size_vfunc(Widget& widget, const Gdk::Rectangle* cell_area, int* x_offset, int* y_offset, int* width, int* height) const;
702 #endif //GLIBMM_VFUNCS_ENABLED
703
704                   
705   #ifdef GLIBMM_VFUNCS_ENABLED
706   virtual void render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window, Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, const Gdk::Rectangle& expose_area, CellRendererState flags);
707 #endif //GLIBMM_VFUNCS_ENABLED
708
709
710   #ifdef GLIBMM_VFUNCS_ENABLED
711   virtual bool activate_vfunc(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags);
712 #endif //GLIBMM_VFUNCS_ENABLED
713
714
715   #ifdef GLIBMM_VFUNCS_ENABLED
716   virtual CellEditable* start_editing_vfunc(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags);
717 #endif //GLIBMM_VFUNCS_ENABLED
718
719
720 };
721
722 } // namespace Gtk
723
724
725 namespace Glib
726 {
727   /** A Glib::wrap() method for this object.
728    * 
729    * @param object The C instance.
730    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
731    * @result A C++ instance that wraps this C instance.
732    *
733    * @relates Gtk::CellRenderer
734    */
735   Gtk::CellRenderer* wrap(GtkCellRenderer* object, bool take_copy = false);
736 } //namespace Glib
737
738
739 #endif /* _GTKMM_CELLRENDERER_H */
740