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

« back to all changes in this revision

Viewing changes to include/gtkmm-2.4/gtkmm/cellrenderer.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_CELLRENDERER_H
 
4
#define _GTKMM_CELLRENDERER_H
 
5
 
 
6
#include <gtkmmconfig.h>
 
7
 
 
8
 
 
9
#include <glibmm.h>
 
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 Lesser General Public
 
15
 * License as published by the Free Software Foundation; either
 
16
 * version 2.1 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
 * Lesser General Public License for more details.
 
22
 *
 
23
 * You should have received a copy of the GNU Lesser 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
 
 
29
#include <gtkmm/object.h>
 
30
#include <gtkmm/widget.h>
 
31
#include <gtkmm/celleditable.h>
 
32
 
 
33
 
 
34
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
35
typedef struct _GtkCellRenderer GtkCellRenderer;
 
36
typedef struct _GtkCellRendererClass GtkCellRendererClass;
 
37
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
38
 
 
39
 
 
40
namespace Gtk
 
41
{ class CellRenderer_Class; } // namespace Gtk
 
42
namespace Gtk
 
43
{
 
44
 
 
45
/** @addtogroup gtkmmEnums gtkmm 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
 
 
188
 
 
189
  static GType get_base_type() G_GNUC_CONST;
 
190
#endif
 
191
 
 
192
  ///Provides access to the underlying C GtkObject.
 
193
  GtkCellRenderer*       gobj()       { return reinterpret_cast<GtkCellRenderer*>(gobject_); }
 
194
 
 
195
  ///Provides access to the underlying C GtkObject.
 
196
  const GtkCellRenderer* gobj() const { return reinterpret_cast<GtkCellRenderer*>(gobject_); }
 
197
 
 
198
 
 
199
public:
 
200
  //C++ methods used to invoke GTK+ virtual functions:
 
201
 
 
202
protected:
 
203
  //GTK+ Virtual Functions (override these to change behaviour):
 
204
 
 
205
  //Default Signal Handlers::
 
206
  virtual void on_editing_canceled();
 
207
 
 
208
 
 
209
private:
 
210
 
 
211
public:
 
212
 
 
213
  
 
214
  /** Obtains the width and height needed to render the cell. Used by view widgets
 
215
   * to determine the appropriate size for the cell_area passed to
 
216
   * render().  Fills in the x and y
 
217
   * offsets of the cell relative to this location.  Please note that the
 
218
   * values set in @a width and @a height, as well as those in @a x_offset and @a y_offset
 
219
   * are inclusive of the xpad and ypad properties.
 
220
   * @param widget The widget the renderer is rendering to.
 
221
   * @param cell_area The area a cell will be allocated.
 
222
   * @param x_offset Location to return x offset of cell relative to @a cell_area.
 
223
   * @param y_offset Location to return y offset of cell relative to @a cell_area.
 
224
   * @param width Location to return width needed to render a cell.
 
225
   * @param height Location to return height needed to render a cell.
 
226
   */
 
227
  void get_size(Widget& widget, const Gdk::Rectangle& cell_area, int& x_offset, int& y_offset, int& width, int& height) const;
 
228
 
 
229
  /** Obtains the width and height needed to render the cell. Used by view widgets
 
230
   * to determine the appropriate size for the cell_area passed to
 
231
   * render().  Fills in the x and y
 
232
   * offsets of the cell relative to this location.  Please note that the
 
233
   * values set in @a width  and @a height , as well as those in @a x_offset  and @a y_offset
 
234
   * are inclusive of the xpad and ypad properties.
 
235
   * @param widget The widget the renderer is rendering to.
 
236
   * @param x_offset Location to return x offset of cell relative to @a cell_area.
 
237
   * @param y_offset Location to return y offset of cell relative to @a cell_area.
 
238
   * @param width Location to return width needed to render a cell.
 
239
   * @param height Location to return height needed to render a cell.
 
240
   */
 
241
  void get_size(Widget& widget, int& x_offset, int& y_offset, int& width, int& height) const;
 
242
 
 
243
  
 
244
  /** Invokes the virtual render function of the Gtk::CellRenderer. The three
 
245
   * passed-in rectangles are areas of @a window. Most renderers will draw within
 
246
   *  @a cell_area; the xalign, yalign, xpad, and ypad fields of the Gtk::CellRenderer
 
247
   * should be honored with respect to @a cell_area. @a background_area includes the
 
248
   * blank space around the cell, and also the area containing the tree expander;
 
249
   * so the @a background_area rectangles for all cells tile to cover the entire
 
250
   *  @a window.  @a expose_area is a clip rectangle.
 
251
   * @param window A Gdk::Drawable to draw to.
 
252
   * @param widget The widget owning @a window.
 
253
   * @param background_area Entire cell area (including tree expanders and maybe 
 
254
   * padding on the sides).
 
255
   * @param cell_area Area normally rendered by a cell renderer.
 
256
   * @param expose_area Area that actually needs updating.
 
257
   * @param flags Flags that affect rendering.
 
258
   */
 
259
  void render(const Glib::RefPtr<Gdk::Window>& window, Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, const Gdk::Rectangle& expose_area, CellRendererState flags);
 
260
 
 
261
  
 
262
  /** Passes an activate event to the cell renderer for possible processing.  
 
263
   * Some cell renderers may use events; for example, Gtk::CellRendererToggle 
 
264
   * toggles when it gets a mouse click.
 
265
   * @param event A Gdk::Event.
 
266
   * @param widget Widget that received the event.
 
267
   * @param path Widget-dependent string representation of the event location; 
 
268
   * e.g. for Gtk::TreeView, a string representation of Gtk::TreePath.
 
269
   * @param background_area Background area as passed to render().
 
270
   * @param cell_area Cell area as passed to render().
 
271
   * @param flags Render flags.
 
272
   * @return <tt>true</tt> if the event was consumed/handled.
 
273
   */
 
274
  bool activate(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags);
 
275
 
 
276
  
 
277
  /** Passes an activate event to the cell renderer for possible processing.
 
278
   * @param event A Gdk::Event.
 
279
   * @param widget Widget that received the event.
 
280
   * @param path Widget-dependent string representation of the event location;
 
281
   * e.g. for Gtk::TreeView, a string representation of Gtk::TreePath.
 
282
   * @param background_area Background area as passed to render().
 
283
   * @param cell_area Cell area as passed to render().
 
284
   * @param flags Render flags.
 
285
   * @return A new Gtk::CellEditable, or <tt>0</tt>.
 
286
   */
 
287
  CellEditable* start_editing(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags =  CellRendererState(0));
 
288
 
 
289
  
 
290
  /** Sets the renderer size to be explicit, independent of the properties set.
 
291
   * @param width The width of the cell renderer, or -1.
 
292
   * @param height The height of the cell renderer, or -1.
 
293
   */
 
294
  void set_fixed_size(int width, int height);
 
295
  
 
296
  /** Fills in @a width and @a height with the appropriate size of @a cell.
 
297
   * @param width Location to fill in with the fixed width of the widget.
 
298
   * @param height Location to fill in with the fixed height of the widget.
 
299
   */
 
300
  void get_fixed_size(int& width, int& height) const;
 
301
 
 
302
  
 
303
  /** Sets the renderer's alignment within its available space.
 
304
   * 
 
305
   * @newin{2,18}
 
306
   * @param xalign The x alignment of the cell renderer.
 
307
   * @param yalign The y alignment of the cell renderer.
 
308
   */
 
309
  void set_alignment(float align, float yalign);
 
310
  
 
311
  /** Fills in @a xalign and @a yalign with the appropriate values of @a cell.
 
312
   * 
 
313
   * @newin{2,18}
 
314
   * @param xalign Location to fill in with the x alignment of the cell, or <tt>0</tt>.
 
315
   * @param yalign Location to fill in with the y alignment of the cell, or <tt>0</tt>.
 
316
   */
 
317
  void get_alignment(float& xalign, float& yalign) const;
 
318
 
 
319
  
 
320
  /** Sets the renderer's padding.
 
321
   * 
 
322
   * @newin{2,18}
 
323
   * @param xpad The x padding of the cell renderer.
 
324
   * @param ypad The y padding of the cell renderer.
 
325
   */
 
326
  void set_padding(int xpad, int ypad);
 
327
  
 
328
  /** Fills in @a xpad and @a ypad with the appropriate values of @a cell.
 
329
   * 
 
330
   * @newin{2,18}
 
331
   * @param xpad Location to fill in with the x padding of the cell, or <tt>0</tt>.
 
332
   * @param ypad Location to fill in with the y padding of the cell, or <tt>0</tt>.
 
333
   */
 
334
  void get_padding(int& xpad, int& ypad) const;
 
335
 
 
336
  
 
337
  /** Sets the cell renderer's visibility.
 
338
   * 
 
339
   * @newin{2,18}
 
340
   * @param visible The visibility of the cell.
 
341
   */
 
342
  void set_visible(bool visible =  true);
 
343
  
 
344
  /** Returns the cell renderer's visibility.
 
345
   * 
 
346
   * @newin{2,18}
 
347
   * @return <tt>true</tt> if the cell renderer is visible.
 
348
   */
 
349
  bool get_visible() const;
 
350
  
 
351
  /** Sets the cell renderer's sensitivity.
 
352
   * 
 
353
   * @newin{2,18}
 
354
   * @param sensitive The sensitivity of the cell.
 
355
   */
 
356
  void set_sensitive(bool sensitive =  true);
 
357
  
 
358
  /** Returns the cell renderer's sensitivity.
 
359
   * 
 
360
   * @newin{2,18}
 
361
   * @return <tt>true</tt> if the cell renderer is sensitive.
 
362
   */
 
363
  bool get_sensitive() const;
 
364
 
 
365
  
 
366
#ifndef GTKMM_DISABLE_DEPRECATED
 
367
 
 
368
  /** Causes the cell renderer to emit the Gtk::CellRenderer::editing-canceled 
 
369
   * signal.  
 
370
   * 
 
371
   * This function is for use only by implementations of cell renderers that 
 
372
   * need to notify the client program that an editing process was canceled 
 
373
   * and the changes were not committed.
 
374
   * 
 
375
   * @newin{2,4}
 
376
   * Deprecated: 2.6: Use stop_editing() instead
 
377
   * @deprecated Use stop_editing().
 
378
   */
 
379
  void editing_canceled();
 
380
#endif // GTKMM_DISABLE_DEPRECATED
 
381
 
 
382
 
 
383
  /** Informs the cell renderer that the editing is stopped.
 
384
   * If @a canceled is <tt>true</tt>, the cell renderer will emit the 
 
385
   * Gtk::CellRenderer::editing-canceled signal. 
 
386
   * 
 
387
   * This function should be called by cell renderer implementations 
 
388
   * in response to the Gtk::CellEditable::editing-done signal of 
 
389
   * Gtk::CellEditable.
 
390
   * 
 
391
   * @newin{2,6}
 
392
   * @param canceled <tt>true</tt> if the editing has been canceled.
 
393
   */
 
394
  void stop_editing(bool canceled =  false);
 
395
 
 
396
  /** Returns the property that this CellRenderer renders.
 
397
   * For instance, property_text for CellRendererText, and property_active for CellRendererToggle
 
398
   * Needs to be overridden in derived classes.
 
399
   */
 
400
  virtual Glib::PropertyProxy_Base _property_renderable();
 
401
 
 
402
  /** This signal is emitted when the user cancels the process of editing a
 
403
   * cell.  For example, an editable cell renderer could be written to cancel
 
404
   * editing when the user presses Escape.
 
405
   *
 
406
   * @see editing_canceled()
 
407
   *
 
408
   * @par Prototype:
 
409
   * <tt>void on_my_%editing_canceled()</tt>
 
410
   */
 
411
 
 
412
  Glib::SignalProxy0< void > signal_editing_canceled();
 
413
 
 
414
 
 
415
  //We use no_default_handler for this, because we can not add a new vfunc to 2.5 without breaking ABI.
 
416
  //TODO: Remove no_default_handler when we do an ABI-break-with-parallel-install.
 
417
  //TODO: Remove the warning in the documentation when we have fixed the inheritance of CellRendererCombo.
 
418
  /** This signal gets emitted when a cell starts to be edited.
 
419
   * The indended use of this signal is to do special setup
 
420
   * on @a editable, e.g. adding an EntryCompletion or setting
 
421
   * up additional columns in a ComboBox.
 
422
   *
 
423
   * Note that GTK+ doesn't guarantee that cell renderers will
 
424
   * continue to use the same kind of widget for editing in future
 
425
   * releases, therefore you should check the type of @a editable
 
426
   * before doing any specific setup.
 
427
   *
 
428
   * Note that this signal does not work yet in gtkmm.
 
429
   * See http://bugzilla.gnome.org/show_bug.cgi?id=301597
 
430
   *
 
431
   * @newin{2,6}
 
432
   *
 
433
   * @param editable the CellEditable.
 
434
   * @param path the path identifying the edited cell.
 
435
   *
 
436
   * @par Prototype:
 
437
   * <tt>void on_my_%editing_started(CellEditable* editable, const Glib::ustring& path)</tt>
 
438
   */
 
439
 
 
440
  Glib::SignalProxy2< void,CellEditable*,const Glib::ustring& > signal_editing_started();
 
441
 
 
442
 
 
443
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
444
/** Editable mode of the CellRenderer.
 
445
   *
 
446
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
447
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
448
   * the value of the property changes.
 
449
   */
 
450
  Glib::PropertyProxy<CellRendererMode> property_mode() ;
 
451
#endif //#GLIBMM_PROPERTIES_ENABLED
 
452
 
 
453
#ifdef GLIBMM_PROPERTIES_ENABLED
 
454
/** Editable mode of the CellRenderer.
 
455
   *
 
456
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
457
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
458
   * the value of the property changes.
 
459
   */
 
460
  Glib::PropertyProxy_ReadOnly<CellRendererMode> property_mode() const;
 
461
#endif //#GLIBMM_PROPERTIES_ENABLED
 
462
 
 
463
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
464
/** Display the cell.
 
465
   *
 
466
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
467
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
468
   * the value of the property changes.
 
469
   */
 
470
  Glib::PropertyProxy<bool> property_visible() ;
 
471
#endif //#GLIBMM_PROPERTIES_ENABLED
 
472
 
 
473
#ifdef GLIBMM_PROPERTIES_ENABLED
 
474
/** Display the cell.
 
475
   *
 
476
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
477
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
478
   * the value of the property changes.
 
479
   */
 
480
  Glib::PropertyProxy_ReadOnly<bool> property_visible() const;
 
481
#endif //#GLIBMM_PROPERTIES_ENABLED
 
482
 
 
483
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
484
/** Display the cell sensitive.
 
485
   *
 
486
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
487
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
488
   * the value of the property changes.
 
489
   */
 
490
  Glib::PropertyProxy<bool> property_sensitive() ;
 
491
#endif //#GLIBMM_PROPERTIES_ENABLED
 
492
 
 
493
#ifdef GLIBMM_PROPERTIES_ENABLED
 
494
/** Display the cell sensitive.
 
495
   *
 
496
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
497
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
498
   * the value of the property changes.
 
499
   */
 
500
  Glib::PropertyProxy_ReadOnly<bool> property_sensitive() const;
 
501
#endif //#GLIBMM_PROPERTIES_ENABLED
 
502
 
 
503
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
504
/** The x-align.
 
505
   *
 
506
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
507
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
508
   * the value of the property changes.
 
509
   */
 
510
  Glib::PropertyProxy<float> property_xalign() ;
 
511
#endif //#GLIBMM_PROPERTIES_ENABLED
 
512
 
 
513
#ifdef GLIBMM_PROPERTIES_ENABLED
 
514
/** The x-align.
 
515
   *
 
516
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
517
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
518
   * the value of the property changes.
 
519
   */
 
520
  Glib::PropertyProxy_ReadOnly<float> property_xalign() const;
 
521
#endif //#GLIBMM_PROPERTIES_ENABLED
 
522
 
 
523
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
524
/** The y-align.
 
525
   *
 
526
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
527
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
528
   * the value of the property changes.
 
529
   */
 
530
  Glib::PropertyProxy<float> property_yalign() ;
 
531
#endif //#GLIBMM_PROPERTIES_ENABLED
 
532
 
 
533
#ifdef GLIBMM_PROPERTIES_ENABLED
 
534
/** The y-align.
 
535
   *
 
536
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
537
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
538
   * the value of the property changes.
 
539
   */
 
540
  Glib::PropertyProxy_ReadOnly<float> property_yalign() const;
 
541
#endif //#GLIBMM_PROPERTIES_ENABLED
 
542
 
 
543
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
544
/** The xpad.
 
545
   *
 
546
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
547
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
548
   * the value of the property changes.
 
549
   */
 
550
  Glib::PropertyProxy<unsigned int> property_xpad() ;
 
551
#endif //#GLIBMM_PROPERTIES_ENABLED
 
552
 
 
553
#ifdef GLIBMM_PROPERTIES_ENABLED
 
554
/** The xpad.
 
555
   *
 
556
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
557
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
558
   * the value of the property changes.
 
559
   */
 
560
  Glib::PropertyProxy_ReadOnly<unsigned int> property_xpad() const;
 
561
#endif //#GLIBMM_PROPERTIES_ENABLED
 
562
 
 
563
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
564
/** The ypad.
 
565
   *
 
566
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
567
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
568
   * the value of the property changes.
 
569
   */
 
570
  Glib::PropertyProxy<unsigned int> property_ypad() ;
 
571
#endif //#GLIBMM_PROPERTIES_ENABLED
 
572
 
 
573
#ifdef GLIBMM_PROPERTIES_ENABLED
 
574
/** The ypad.
 
575
   *
 
576
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
577
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
578
   * the value of the property changes.
 
579
   */
 
580
  Glib::PropertyProxy_ReadOnly<unsigned int> property_ypad() const;
 
581
#endif //#GLIBMM_PROPERTIES_ENABLED
 
582
 
 
583
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
584
/** The fixed width.
 
585
   *
 
586
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
587
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
588
   * the value of the property changes.
 
589
   */
 
590
  Glib::PropertyProxy<int> property_width() ;
 
591
#endif //#GLIBMM_PROPERTIES_ENABLED
 
592
 
 
593
#ifdef GLIBMM_PROPERTIES_ENABLED
 
594
/** The fixed width.
 
595
   *
 
596
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
597
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
598
   * the value of the property changes.
 
599
   */
 
600
  Glib::PropertyProxy_ReadOnly<int> property_width() const;
 
601
#endif //#GLIBMM_PROPERTIES_ENABLED
 
602
 
 
603
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
604
/** The fixed height.
 
605
   *
 
606
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
607
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
608
   * the value of the property changes.
 
609
   */
 
610
  Glib::PropertyProxy<int> property_height() ;
 
611
#endif //#GLIBMM_PROPERTIES_ENABLED
 
612
 
 
613
#ifdef GLIBMM_PROPERTIES_ENABLED
 
614
/** The fixed height.
 
615
   *
 
616
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
617
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
618
   * the value of the property changes.
 
619
   */
 
620
  Glib::PropertyProxy_ReadOnly<int> property_height() const;
 
621
#endif //#GLIBMM_PROPERTIES_ENABLED
 
622
 
 
623
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
624
/** Row has children.
 
625
   *
 
626
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
627
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
628
   * the value of the property changes.
 
629
   */
 
630
  Glib::PropertyProxy<bool> property_is_expander() ;
 
631
#endif //#GLIBMM_PROPERTIES_ENABLED
 
632
 
 
633
#ifdef GLIBMM_PROPERTIES_ENABLED
 
634
/** Row has children.
 
635
   *
 
636
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
637
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
638
   * the value of the property changes.
 
639
   */
 
640
  Glib::PropertyProxy_ReadOnly<bool> property_is_expander() const;
 
641
#endif //#GLIBMM_PROPERTIES_ENABLED
 
642
 
 
643
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
644
/** Row is an expander row, and is expanded.
 
645
   *
 
646
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
647
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
648
   * the value of the property changes.
 
649
   */
 
650
  Glib::PropertyProxy<bool> property_is_expanded() ;
 
651
#endif //#GLIBMM_PROPERTIES_ENABLED
 
652
 
 
653
#ifdef GLIBMM_PROPERTIES_ENABLED
 
654
/** Row is an expander row, and is expanded.
 
655
   *
 
656
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
657
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
658
   * the value of the property changes.
 
659
   */
 
660
  Glib::PropertyProxy_ReadOnly<bool> property_is_expanded() const;
 
661
#endif //#GLIBMM_PROPERTIES_ENABLED
 
662
 
 
663
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
664
/** Cell background color as a string.
 
665
   *
 
666
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
667
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
668
   * the value of the property changes.
 
669
   */
 
670
  Glib::PropertyProxy_WriteOnly<Glib::ustring> property_cell_background() ;
 
671
#endif //#GLIBMM_PROPERTIES_ENABLED
 
672
 
 
673
 
 
674
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
675
/** Cell background color as a GdkColor.
 
676
   *
 
677
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
678
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
679
   * the value of the property changes.
 
680
   */
 
681
  Glib::PropertyProxy<Gdk::Color> property_cell_background_gdk() ;
 
682
#endif //#GLIBMM_PROPERTIES_ENABLED
 
683
 
 
684
#ifdef GLIBMM_PROPERTIES_ENABLED
 
685
/** Cell background color as a GdkColor.
 
686
   *
 
687
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
688
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
689
   * the value of the property changes.
 
690
   */
 
691
  Glib::PropertyProxy_ReadOnly<Gdk::Color> property_cell_background_gdk() const;
 
692
#endif //#GLIBMM_PROPERTIES_ENABLED
 
693
 
 
694
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
695
/** Whether this tag affects the cell background color.
 
696
   *
 
697
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
698
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
699
   * the value of the property changes.
 
700
   */
 
701
  Glib::PropertyProxy<bool> property_cell_background_set() ;
 
702
#endif //#GLIBMM_PROPERTIES_ENABLED
 
703
 
 
704
#ifdef GLIBMM_PROPERTIES_ENABLED
 
705
/** Whether this tag affects the cell background color.
 
706
   *
 
707
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
708
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
709
   * the value of the property changes.
 
710
   */
 
711
  Glib::PropertyProxy_ReadOnly<bool> property_cell_background_set() const;
 
712
#endif //#GLIBMM_PROPERTIES_ENABLED
 
713
 
 
714
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
715
/** Whether the cell renderer is currently in editing mode.
 
716
   *
 
717
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
718
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
719
   * the value of the property changes.
 
720
   */
 
721
  Glib::PropertyProxy_ReadOnly<bool> property_editing() const;
 
722
#endif //#GLIBMM_PROPERTIES_ENABLED
 
723
 
 
724
 
 
725
protected:
 
726
  CellRenderer();
 
727
 
 
728
  /** Override this in derived CellRenderers.
 
729
   *
 
730
   * Obtains the width and height needed to render the cell. Used by view widgets
 
731
   * to determine the appropriate size for the cell_area passed to
 
732
   * render().  If @a cell_area is not 0, fills in the x and y
 
733
   * offsets (if set) of the cell relative to this location.  Please note that the
 
734
   * values set in @a width and @a height, as well as those in @a x_offset and @a y_offset
 
735
   * are inclusive of the xpad and ypad properties.
 
736
   *
 
737
   * @param widget The widget the renderer is rendering to.
 
738
   * @param cell_area The area a cell will be allocated, or 0.
 
739
   * @param x_offset x offset of cell relative to @a cell_area.
 
740
   * @param y_offset y offset of cell relative to @a cell_area.
 
741
   * @param width Width needed to render a cell.
 
742
   * @param height Height needed to render a cell.
 
743
   **/
 
744
    virtual void get_size_vfunc(Widget& widget, const Gdk::Rectangle* cell_area, int* x_offset, int* y_offset, int* width, int* height) const;
 
745
 
 
746
 
 
747
    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);
 
748
 
 
749
 
 
750
    virtual bool activate_vfunc(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags);
 
751
 
 
752
 
 
753
    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);
 
754
 
 
755
 
 
756
};
 
757
 
 
758
} // namespace Gtk
 
759
 
 
760
 
 
761
namespace Glib
 
762
{
 
763
  /** A Glib::wrap() method for this object.
 
764
   * 
 
765
   * @param object The C instance.
 
766
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 
767
   * @result A C++ instance that wraps this C instance.
 
768
   *
 
769
   * @relates Gtk::CellRenderer
 
770
   */
 
771
  Gtk::CellRenderer* wrap(GtkCellRenderer* object, bool take_copy = false);
 
772
} //namespace Glib
 
773
 
 
774
 
 
775
#endif /* _GTKMM_CELLRENDERER_H */
 
776