Main Page - Header
Author: The Inti Development Team

Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# cellrenderer.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002 The Inti Development Team.
    00003  *  Copyright (C) 2000 Red Hat, Inc.
    00004  *
    00005  *  This program is free software; you can redistribute it and/or modify
    00006  *  it under the terms of the GNU General Public License as published by
    00007  *  the Free Software Foundation; either version 2 of the License, or
    00008  *  (at your option) any later version.
    00009  *
    00010  *  This program is distributed in the hope that it will be useful,
    00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00013  *  GNU Library General Public License for more details.
    00014  *
    00015  *  You should have received a copy of the GNU Library General Public License
    00016  *  along with this program; if not, write to the Free Software
    00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00018  */
    00019
    00022
    00023 #ifndef INTI_GTK_CELL_RENDERER_H
    00024 #define INTI_GTK_CELL_RENDERER_H
    00025
    00026 #ifndef INTI_GTK_OBJECT_H
    00027 #include <inti/gtk/object.h>
    00028 #endif
    00029
    00030 #ifndef INTI_GTK_ENUMS_H
    00031 #include <inti/gtk/enums.h>
    00032 #endif
    00033
    00034 #ifndef INTI_PANGO_ATTRIBUTES_H
    00035 #include <inti/pango/attributes.h>
    00036 #endif
    00037
    00038 #ifndef __GTK_CELL_RENDERER_H__
    00039 #include <gtk/gtkcellrenderer.h>
    00040 #endif
    00041
    00042 #ifndef __GTK_CELL_RENDERER_PIXBUF_H__
    00043 #include <gtk/gtkcellrendererpixbuf.h>
    00044 #endif
    00045
    00046 #ifndef __GTK_CELL_RENDERER_TEXT_H__
    00047 #include <gtk/gtkcellrenderertext.h>
    00048 #endif
    00049
    00050 #ifndef __GTK_CELL_RENDERER_TOGGLE_H__
    00051 #include <gtk/gtkcellrenderertoggle.h>
    00052 #endif
    00053
    00054 namespace Inti {
    00055
    00056 namespace Gdk {
    00057 class Color;
    00058 class Event;
    00059 class Pixbuf;
    00060 class Rectangle;
    00061 class Window;
    00062 }
    00063
    00064 namespace Gtk {
    00065
    00066 class CellEditable;
    00067 class CellRendererClass;
    00068 class CellRendererPixbufClass;
    00069 class CellRendererTextClass;
    00070 class CellRendererToggleClass;
    00071 class Widget;
    00072
    00073 /*  CellRendererState
    00074  */
    00075
    00078
    00079 enum CellRendererState
    00080 {
    00081         CELL_RENDERER_SELECTED = GTK_CELL_RENDERER_SELECTED,
    00082         CELL_RENDERER_PRELIT = GTK_CELL_RENDERER_PRELIT,
    00083         CELL_RENDERER_INSENSITIVE = GTK_CELL_RENDERER_INSENSITIVE,
    00084         CELL_RENDERER_SORTED = GTK_CELL_RENDERER_SORTED,
    00085         CELL_RENDERER_FOCUSED = GTK_CELL_RENDERER_FOCUSED
    00086 };
    00087
    00089
    00090 typedef unsigned int CellRendererStateField;
    00091
    00094
    00095 enum CellRendererMode
    00096 {
    00097         INERT = GTK_CELL_RENDERER_MODE_INERT,
    00098         ACTIVATABLE = GTK_CELL_RENDERER_MODE_ACTIVATABLE,
    00099         EDITABLE = GTK_CELL_RENDERER_MODE_EDITABLE
    00100 };
    00101
    00115
    00116 class CellRenderer : public Object
    00117 {
    00118         friend class G::Object;
    00119         friend class CellRendererClass;
    00120
    00121         CellRenderer(const CellRenderer&);
    00122         CellRenderer& operator=(const CellRenderer&);
    00123
    00124 protected:
    00127
    00128         explicit CellRenderer(GtkCellRenderer *cell, bool reference = false);
    00135
    00137 //  Override these do_ methods when you want to change the default behaviour of the GtkCellRenderer.
    00138
    00139         virtual void do_get_size(GtkWidget *widget, GdkRectangle *cell_area, int *x_offset, int *y_offset,
    00140                                  int *width, int *height);
    00141
    00142         virtual void do_render(GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area,
    00143                                GdkRectangle *cell_area, GdkRectangle *expose_area, GtkCellRendererState flags);
    00144
    00145         virtual bool do_activate(GdkEvent *event, GtkWidget *widget, const char *path, GdkRectangle *background_area,
    00146                                  GdkRectangle *cell_area, GtkCellRendererState flags);
    00147
    00148         virtual GtkCellEditable* do_start_editing(GdkEvent *event, GtkWidget *widget, const char *path,
    00149                                                   GdkRectangle *background_area, GdkRectangle *cell_area,
    00150                                                   GtkCellRendererState flags);
    00151 //  Properties
    00152
    00153         typedef G::Property<CellRendererMode, int> ModePropertyType;
    00154         typedef G::PropertyProxy<G::Object, ModePropertyType> ModePropertyProxy;
    00155         static const ModePropertyType mode_property;
    00156
    00157         typedef G::Property<bool> VisiblePropertyType;
    00158         typedef G::PropertyProxy<G::Object, VisiblePropertyType> VisiblePropertyProxy;
    00159         static const VisiblePropertyType visible_property;
    00160
    00161         typedef G::Property<float> XAlignPropertyType;
    00162         typedef G::PropertyProxy<G::Object, XAlignPropertyType> XAlignPropertyProxy;
    00163         static const XAlignPropertyType xalign_property;
    00164
    00165         typedef G::Property<float> YAlignPropertyType;
    00166         typedef G::PropertyProxy<G::Object, YAlignPropertyType> YAlignPropertyProxy;
    00167         static const YAlignPropertyType yalign_property;
    00168
    00169         typedef G::Property<unsigned int> XPadPropertyType;
    00170         typedef G::PropertyProxy<G::Object, XPadPropertyType> XPadPropertyProxy;
    00171         static const XPadPropertyType xpad_property;
    00172
    00173         typedef G::Property<unsigned int> YPadPropertyType;
    00174         typedef G::PropertyProxy<G::Object, YPadPropertyType> YPadPropertyProxy;
    00175         static const YPadPropertyType ypad_property;
    00176
    00177         typedef G::Property<int> WidthPropertyType;
    00178         typedef G::PropertyProxy<G::Object, WidthPropertyType> WidthPropertyProxy;
    00179         static const WidthPropertyType width_property;
    00180
    00181         typedef G::Property<int> HeightPropertyType;
    00182         typedef G::PropertyProxy<G::Object, HeightPropertyType> HeightPropertyProxy;
    00183         static const HeightPropertyType height_property;
    00184
    00185         typedef G::Property<bool> IsExpanderPropertyType;
    00186         typedef G::PropertyProxy<G::Object, IsExpanderPropertyType> IsExpanderPropertyProxy;
    00187         static const IsExpanderPropertyType is_expander_property;
    00188
    00189         typedef G::Property<bool> IsExpandedPropertyType;
    00190         typedef G::PropertyProxy<G::Object, IsExpandedPropertyType> IsExpandedPropertyProxy;
    00191         static const IsExpandedPropertyType is_expanded_property;
    00192
    00193         typedef G::WritableProperty<String> CellBackgroundPropertyType;
    00194         typedef G::PropertyProxy<G::Object, CellBackgroundPropertyType> CellBackgroundPropertyProxy;
    00195         static const CellBackgroundPropertyType cell_background_property;
    00196
    00197         typedef G::Property<Pointer<Gdk::Color> > CellBackgroundGdkPropertyType;
    00198         typedef G::PropertyProxy<G::Object, CellBackgroundGdkPropertyType> CellBackgroundGdkPropertyProxy;
    00199         static const CellBackgroundGdkPropertyType cell_background_gdk_property;
    00200
    00201         typedef G::Property<bool> CellBackgroundSetPropertyType;
    00202         typedef G::PropertyProxy<G::Object, CellBackgroundSetPropertyType> CellBackgroundSetPropertyProxy;
    00203         static const CellBackgroundSetPropertyType cell_background_set_property;
    00204
    00205 public:
    00208
    00209         virtual ~CellRenderer();
    00211
    00215
    00216         GtkCellRenderer* gtk_cell_renderer() const { return (GtkCellRenderer*)instance; }
    00218
    00219         GtkCellRendererClass* gtk_cell_renderer_class() const;
    00221
    00222         operator GtkCellRenderer* () const;
    00224
    00225         void get_fixed_size(int *width, int *height);
    00229
    00230         void get_size(const Widget& widget, const Gdk::Rectangle *cell_area,
    00231                       int *x_offset, int *y_offset, int *width, int *height) const;
    00245
    00249
    00250         void render(Gdk::Window& window, Widget& widget, const Gdk::Rectangle *background_area,
    00251                     const Gdk::Rectangle *cell_area, const Gdk::Rectangle *expose_area,
    00252                     CellRendererStateField flags);
    00267
    00268         bool activate(const Gdk::Event *event, Widget *widget, const String& path,
    00269                       const Gdk::Rectangle *background_area, const Gdk::Rectangle *cell_area,
    00270                       CellRendererStateField flags);
    00283
    00284         Pointer<CellEditable> start_editing(const Gdk::Event *event, Widget *widget, const String& path,
    00285                                             const Gdk::Rectangle *background_area, const Gdk::Rectangle *cell_area,
    00286                                             CellRendererStateField  flags);
    00296
    00297         void set_fixed_size(int width, int height);
    00301
    00305
    00306         const ModePropertyProxy prop_mode()
    00307         {
    00308                 return ModePropertyProxy(this, &mode_property);
    00309         }
    00311
    00312         const VisiblePropertyProxy prop_visible()
    00313         {
    00314                 return VisiblePropertyProxy(this, &visible_property);
    00315         }
    00317
    00318         const XAlignPropertyProxy prop_xalign()
    00319         {
    00320                 return XAlignPropertyProxy(this, &xalign_property);
    00321         }
    00323
    00324         const YAlignPropertyProxy prop_yalign()
    00325         {
    00326                 return YAlignPropertyProxy(this, &yalign_property);
    00327         }
    00329
    00330         const XPadPropertyProxy prop_xpad()
    00331         {
    00332                 return XPadPropertyProxy(this, &xpad_property);
    00333         }
    00335
    00336         const YPadPropertyProxy prop_ypad()
    00337         {
    00338                 return YPadPropertyProxy(this, &ypad_property);
    00339         }
    00341
    00342         const WidthPropertyProxy prop_width()
    00343         {
    00344                 return WidthPropertyProxy(this, &width_property);
    00345         }
    00347
    00348         const HeightPropertyProxy prop_height()
    00349         {
    00350                 return HeightPropertyProxy(this, &height_property);
    00351         }
    00353
    00354         const IsExpanderPropertyProxy prop_is_expander()
    00355         {
    00356                 return IsExpanderPropertyProxy(this, &is_expander_property);
    00357         }
    00359
    00360         const IsExpandedPropertyProxy prop_is_expanded()
    00361         {
    00362                 return IsExpandedPropertyProxy(this, &is_expanded_property);
    00363         }
    00365
    00366         const CellBackgroundPropertyProxy prop_cell_background()
    00367         {
    00368                 return CellBackgroundPropertyProxy(this, &cell_background_property);
    00369         }
    00371
    00372         const CellBackgroundGdkPropertyProxy prop_cell_background_gdk()
    00373         {
    00374                 return CellBackgroundGdkPropertyProxy(this, &cell_background_gdk_property);
    00375         }
    00377
    00378         const CellBackgroundSetPropertyProxy prop_cell_background_set()
    00379         {
    00380                 return CellBackgroundSetPropertyProxy(this, &cell_background_set_property);
    00381         }
    00383
    00384 };
    00385
    00388
    00389 class CellRendererPixbuf : public CellRenderer
    00390 {
    00391         friend class G::Object;
    00392         friend class CellRendererClassPixbuf;
    00393
    00394         CellRendererPixbuf(const CellRendererPixbuf&);
    00395         CellRendererPixbuf& operator=(const CellRendererPixbuf&);
    00396
    00397 protected:
    00400
    00401         explicit CellRendererPixbuf(GtkCellRendererPixbuf *cell, bool reference = false);
    00408
    00410 //  Properties
    00411
    00412         typedef G::Property<Gdk::Pixbuf*, G::Object*> PixbufPropertyType;
    00413         typedef G::PropertyProxy<G::Object, PixbufPropertyType> PixbufPropertyProxy;
    00414         static const PixbufPropertyType pixbuf_property;
    00415
    00416         typedef G::Property<Gdk::Pixbuf*, G::Object*> PixbufExpanderOpenPropertyType;
    00417         typedef G::PropertyProxy<G::Object, PixbufExpanderOpenPropertyType> PixbufExpanderOpenPropertyProxy;
    00418         static const PixbufExpanderOpenPropertyType pixbuf_expander_open_property;
    00419
    00420         typedef G::Property<Gdk::Pixbuf*, G::Object*> PixbufExpanderClosedPropertyType;
    00421         typedef G::PropertyProxy<G::Object, PixbufExpanderClosedPropertyType> PixbufExpanderClosedPropertyProxy;
    00422         static const PixbufExpanderClosedPropertyType pixbuf_expander_closed_property;
    00423
    00424         typedef G::Property<String> StockIdPropertyType;
    00425         typedef G::PropertyProxy<G::Object, StockIdPropertyType> StockIdPropertyProxy;
    00426         static const StockIdPropertyType stock_id_property;
    00427
    00428         typedef G::Property<IconSize, int> StockSizePropertyType;
    00429         typedef G::PropertyProxy<G::Object, StockSizePropertyType> StockSizePropertyProxy;
    00430         static const StockSizePropertyType stock_size_property;
    00431
    00432         typedef G::Property<String> StockDetailPropertyType;
    00433         typedef G::PropertyProxy<G::Object, StockDetailPropertyType> StockDetailPropertyProxy;
    00434         static const StockDetailPropertyType stock_detail_property;
    00435
    00436 public:
    00439
    00440         CellRendererPixbuf();
    00446
    00447         virtual ~CellRendererPixbuf();
    00449
    00453
    00454         GtkCellRendererPixbuf* gtk_cell_renderer_pixbuf() const { return (GtkCellRendererPixbuf*)instance; }
    00456
    00457         GtkCellRendererPixbufClass* gtk_cell_renderer_pixbuf_class() const;
    00459
    00460         operator GtkCellRendererPixbuf* () const;
    00462
    00466
    00467         const PixbufPropertyProxy prop_pixbuf()
    00468         {
    00469                 return PixbufPropertyProxy(this, &pixbuf_property);
    00470         }
    00472
    00473         const PixbufExpanderOpenPropertyProxy prop_pixbuf_expander_open()
    00474         {
    00475                 return PixbufExpanderOpenPropertyProxy(this, &pixbuf_expander_open_property);
    00476         }
    00478
    00479         const PixbufExpanderClosedPropertyProxy prop_pixbuf_expander_closed()
    00480         {
    00481                 return PixbufExpanderClosedPropertyProxy(this, &pixbuf_expander_closed_property);
    00482         }
    00484
    00485         const StockIdPropertyProxy prop_stock_id()
    00486         {
    00487                 return StockIdPropertyProxy(this, &stock_id_property);
    00488         }
    00490
    00491         const StockSizePropertyProxy prop_stock_size()
    00492         {
    00493                 return StockSizePropertyProxy(this, &stock_size_property);
    00494         }
    00496
    00497         const StockDetailPropertyProxy prop_stock_detail()
    00498         {
    00499                 return StockDetailPropertyProxy(this, &stock_detail_property);
    00500         }
    00502
    00504 };
    00505
    00508
    00509 class CellRendererText : public CellRenderer
    00510 {
    00511         friend class G::Object;
    00512         friend class CellRendererTextClass;
    00513
    00514         CellRendererText(const CellRendererText&);
    00515         CellRendererText& operator=(const CellRendererText&);
    00516
    00517 protected:
    00520
    00521         explicit CellRendererText(GtkCellRendererText *cell, bool reference = false);
    00528
    00530 //  Properties
    00531
    00532         typedef G::Property<String> TextPropertyType;
    00533         typedef G::PropertyProxy<G::Object, TextPropertyType> TextPropertyProxy;
    00534         static const TextPropertyType text_property;
    00535
    00536         typedef G::WritableProperty<String> MarkupPropertyType;
    00537         typedef G::PropertyProxy<G::Object, MarkupPropertyType> MarkupPropertyProxy;
    00538         static const MarkupPropertyType markup_property;
    00539
    00540         typedef G::Property<Pointer<Pango::AttrList> > AttributePropertyType;
    00541         typedef G::PropertyProxy<G::Object, AttributePropertyType> AttributePropertyProxy;
    00542         static const AttributePropertyType attribute_property;
    00543
    00544         typedef G::WritableProperty<String> BackgroundPropertyType;
    00545         typedef G::PropertyProxy<G::Object, BackgroundPropertyType> BackgroundPropertyProxy;
    00546         static const BackgroundPropertyType background_property;
    00547
    00548         typedef G::Property<Pointer<Gdk::Color> > BackgroundGdkPropertyType;
    00549         typedef G::PropertyProxy<G::Object, BackgroundGdkPropertyType> BackgroundGdkPropertyProxy;
    00550         static const BackgroundGdkPropertyType background_gdk_property;
    00551
    00552         typedef G::WritableProperty<String> ForegroundPropertyType;
    00553         typedef G::PropertyProxy<G::Object, ForegroundPropertyType> ForegroundPropertyProxy;
    00554         static const ForegroundPropertyType foreground_property;
    00555
    00556         typedef G::Property<Pointer<Gdk::Color> > ForegroundGdkPropertyType;
    00557         typedef G::PropertyProxy<G::Object, ForegroundGdkPropertyType> ForegroundGdkPropertyProxy;
    00558         static const ForegroundGdkPropertyType foreground_gdk_property;
    00559
    00560         typedef G::Property<bool> EditablePropertyType;
    00561         typedef G::PropertyProxy<G::Object, EditablePropertyType> EditablePropertyProxy;
    00562         static const EditablePropertyType editable_property;
    00563
    00564         typedef G::Property<String> FontPropertyType;
    00565         typedef G::PropertyProxy<G::Object, FontPropertyType> FontPropertyProxy;
    00566         static const FontPropertyType font_property;
    00567
    00568         typedef G::Property<Pointer<Pango::FontDescription> > FontDescPropertyType;
    00569         typedef G::PropertyProxy<G::Object, FontDescPropertyType> FontDescPropertyProxy;
    00570         static const FontDescPropertyType font_desc_property;
    00571
    00572         typedef G::Property<String> FamilyPropertyType;
    00573         typedef G::PropertyProxy<G::Object, FamilyPropertyType> FamilyPropertyProxy;
    00574         static const FamilyPropertyType family_property;
    00575
    00576         typedef G::Property<Pango::Style, int> StylePropertyType;
    00577         typedef G::PropertyProxy<G::Object, StylePropertyType> StylePropertyProxy;
    00578         static const StylePropertyType style_property;
    00579
    00580         typedef G::Property<Pango::Variant, int> VariantPropertyType;
    00581         typedef G::PropertyProxy<G::Object, VariantPropertyType> VariantPropertyProxy;
    00582         static const VariantPropertyType variant_property;
    00583
    00584         typedef G::Property<Pango::Weight, int> WeightPropertyType;
    00585         typedef G::PropertyProxy<G::Object, WeightPropertyType> WeightPropertyProxy;
    00586         static const WeightPropertyType weight_property;
    00587
    00588         typedef G::Property<Pango::Stretch, int> StretchPropertyType;
    00589         typedef G::PropertyProxy<G::Object, StretchPropertyType> StretchPropertyProxy;
    00590         static const StretchPropertyType stretch_property;
    00591
    00592         typedef G::Property<int> SizePropertyType;
    00593         typedef G::PropertyProxy<G::Object, SizePropertyType> SizePropertyProxy;
    00594         static const SizePropertyType size_property;
    00595
    00596         typedef G::Property<double> SizePointsPropertyType;
    00597         typedef G::PropertyProxy<G::Object, SizePointsPropertyType> SizePointsPropertyProxy;
    00598         static const SizePointsPropertyType size_points_property;
    00599
    00600         typedef G::Property<double> ScalePropertyType;
    00601         typedef G::PropertyProxy<G::Object, ScalePropertyType> ScalePropertyProxy;
    00602         static const ScalePropertyType scale_property;
    00603
    00604         typedef G::Property<int> RisePropertyType;
    00605         typedef G::PropertyProxy<G::Object, RisePropertyType> RisePropertyProxy;
    00606         static const RisePropertyType rise_property;
    00607
    00608         typedef G::Property<bool> StrikethroughPropertyType;
    00609         typedef G::PropertyProxy<G::Object, StrikethroughPropertyType> StrikethroughPropertyProxy;
    00610         static const StrikethroughPropertyType strikethrough_property;
    00611
    00612         typedef G::Property<Pango::Underline, int> UnderlinePropertyType;
    00613         typedef G::PropertyProxy<G::Object, UnderlinePropertyType> UnderlinePropertyProxy;
    00614         static const UnderlinePropertyType underline_property;
    00615
    00616         typedef G::Property<bool> BackgroundSetPropertyType;
    00617         typedef G::PropertyProxy<G::Object, BackgroundSetPropertyType> BackgroundSetPropertyProxy;
    00618         static const BackgroundSetPropertyType background_set_property;
    00619
    00620         typedef G::Property<bool> ForegroundSetPropertyType;
    00621         typedef G::PropertyProxy<G::Object, ForegroundSetPropertyType> ForegroundSetPropertyProxy;
    00622         static const ForegroundSetPropertyType foreground_set_property;
    00623
    00624         typedef G::Property<bool> EditableSetPropertyType;
    00625         typedef G::PropertyProxy<G::Object, EditableSetPropertyType> EditableSetPropertyProxy;
    00626         static const EditableSetPropertyType editable_set_property;
    00627
    00628         typedef G::Property<bool> FamilySetPropertyType;
    00629         typedef G::PropertyProxy<G::Object, FamilySetPropertyType> FamilySetPropertyProxy;
    00630         static const FamilySetPropertyType family_set_property;
    00631
    00632         typedef G::Property<bool> StyleSetPropertyType;
    00633         typedef G::PropertyProxy<G::Object, StyleSetPropertyType> StyleSetPropertyProxy;
    00634         static const StyleSetPropertyType style_set_property;
    00635
    00636         typedef G::Property<bool> VariantSetPropertyType;
    00637         typedef G::PropertyProxy<G::Object, VariantSetPropertyType> VariantSetPropertyProxy;
    00638         static const VariantSetPropertyType variant_set_property;
    00639
    00640         typedef G::Property<bool> WeightSetPropertyType;
    00641         typedef G::PropertyProxy<G::Object, WeightSetPropertyType> WeightSetPropertyProxy;
    00642         static const WeightSetPropertyType weight_set_property;
    00643
    00644         typedef G::Property<bool> StretchSetPropertyType;
    00645         typedef G::PropertyProxy<G::Object, StretchSetPropertyType> StretchSetPropertyProxy;
    00646         static const StretchSetPropertyType stretch_set_property;
    00647
    00648         typedef G::Property<bool> SizeSetPropertyType;
    00649         typedef G::PropertyProxy<G::Object, SizeSetPropertyType> SizeSetPropertyProxy;
    00650         static const SizeSetPropertyType size_set_property;
    00651
    00652         typedef G::Property<bool> ScaleSetPropertyType;
    00653         typedef G::PropertyProxy<G::Object, ScaleSetPropertyType> ScaleSetPropertyProxy;
    00654         static const ScaleSetPropertyType scale_set_property;
    00655
    00656         typedef G::Property<bool> RiseSetPropertyType;
    00657         typedef G::PropertyProxy<G::Object, RiseSetPropertyType> RiseSetPropertyProxy;
    00658         static const RiseSetPropertyType rise_set_property;
    00659
    00660         typedef G::Property<bool> StrikethroughSetPropertyType;
    00661         typedef G::PropertyProxy<G::Object, StrikethroughSetPropertyType> StrikethroughSetPropertyProxy;
    00662         static const StrikethroughSetPropertyType strikethrough_set_property;
    00663
    00664         typedef G::Property<bool> UnderlineSetPropertyType;
    00665         typedef G::PropertyProxy<G::Object, UnderlineSetPropertyType> UnderlineSetPropertyProxy;
    00666         static const UnderlineSetPropertyType underline_set_property;
    00667
    00670
    00671         virtual void on_edited(const String& path, const String& new_text);
    00673
    00675 //  Signals
    00676
    00677         typedef G::Signal2<void, const char*, const char*> EditedSignalType;
    00678         typedef G::SignalProxy<TypeInstance, EditedSignalType> EditedSignalProxy;
    00679         static const EditedSignalType edited_signal;
    00680
    00681 public:
    00684
    00685         CellRendererText();
    00691
    00692         virtual ~CellRendererText();
    00694
    00698
    00699         GtkCellRendererText* gtk_cell_renderer_text() const { return (GtkCellRendererText*)instance; }
    00701
    00702         GtkCellRendererTextClass* gtk_cell_renderer_text_class() const;
    00704
    00705         operator GtkCellRendererText* () const;
    00707
    00711
    00712         void set_fixed_height_from_font(int number_of_rows);
    00723
    00727
    00728         const TextPropertyProxy prop_text()
    00729         {
    00730                 return TextPropertyProxy(this, &text_property);
    00731         }
    00733
    00734         const MarkupPropertyProxy prop_markup()
    00735         {
    00736                 return MarkupPropertyProxy(this, &markup_property);
    00737         }
    00739
    00740         const AttributePropertyProxy prop_attribute()
    00741         {
    00742                 return AttributePropertyProxy(this, &attribute_property);
    00743         }
    00746
    00747         const BackgroundPropertyProxy prop_background()
    00748         {
    00749                 return BackgroundPropertyProxy(this, &background_property);
    00750         }
    00752
    00753         const BackgroundGdkPropertyProxy prop_background_gdk()
    00754         {
    00755                 return BackgroundGdkPropertyProxy(this, &background_gdk_property);
    00756         }
    00758
    00759         const ForegroundPropertyProxy prop_foreground()
    00760         {
    00761                 return ForegroundPropertyProxy(this, &foreground_property);
    00762         }
    00764
    00765         const ForegroundGdkPropertyProxy prop_foreground_gdk()
    00766         {
    00767                 return ForegroundGdkPropertyProxy(this, &foreground_gdk_property);
    00768         }
    00770
    00771         const EditablePropertyProxy prop_editable()
    00772         {
    00773                 return EditablePropertyProxy(this, &editable_property);
    00774         }
    00776
    00777         const FontPropertyProxy prop_font()
    00778         {
    00779                 return FontPropertyProxy(this, &font_property);
    00780         }
    00782
    00783         const FontDescPropertyProxy prop_font_desc()
    00784         {
    00785                 return FontDescPropertyProxy(this, &font_desc_property);
    00786         }
    00788
    00789         const FamilyPropertyProxy prop_family()
    00790         {
    00791                 return FamilyPropertyProxy(this, &family_property);
    00792         }
    00794
    00795         const StylePropertyProxy prop_style()
    00796         {
    00797                 return StylePropertyProxy(this, &style_property);
    00798         }
    00800
    00801         const VariantPropertyProxy prop_variant()
    00802         {
    00803                 return VariantPropertyProxy(this, &variant_property);
    00804         }
    00806
    00807         const WeightPropertyProxy prop_weight()
    00808         {
    00809                 return WeightPropertyProxy(this, &weight_property);
    00810         }
    00812
    00813         const StretchPropertyProxy prop_stretch()
    00814         {
    00815                 return StretchPropertyProxy(this, &stretch_property);
    00816         }
    00818
    00819         const SizePropertyProxy prop_size()
    00820         {
    00821                 return SizePropertyProxy(this, &size_property);
    00822         }
    00824
    00825         const SizePointsPropertyProxy prop_size_points()
    00826         {
    00827                 return SizePointsPropertyProxy(this, &size_points_property);
    00828         }
    00830
    00831         const ScalePropertyProxy prop_scale()
    00832         {
    00833                 return ScalePropertyProxy(this, &scale_property);
    00834         }
    00836
    00837         const RisePropertyProxy prop_rise()
    00838         {
    00839                 return RisePropertyProxy(this, &rise_property);
    00840         }
    00842
    00843         const StrikethroughPropertyProxy prop_strikethrough()
    00844         {
    00845                 return StrikethroughPropertyProxy(this, &strikethrough_property);
    00846         }
    00848
    00849         const UnderlinePropertyProxy prop_underline()
    00850         {
    00851                 return UnderlinePropertyProxy(this, &underline_property);
    00852         }
    00854
    00855         const BackgroundSetPropertyProxy prop_background_set()
    00856         {
    00857                 return BackgroundSetPropertyProxy(this, &background_set_property);
    00858         }
    00860
    00861         const ForegroundSetPropertyProxy prop_foreground_set()
    00862         {
    00863                 return ForegroundSetPropertyProxy(this, &foreground_set_property);
    00864         }
    00866
    00867         const EditableSetPropertyProxy prop_editable_set()
    00868         {
    00869                 return EditableSetPropertyProxy(this, &editable_set_property);
    00870         }
    00872
    00873         const FamilySetPropertyProxy prop_family_set()
    00874         {
    00875                 return FamilySetPropertyProxy(this, &family_set_property);
    00876         }
    00878
    00879         const StyleSetPropertyProxy prop_style_set()
    00880         {
    00881                 return StyleSetPropertyProxy(this, &style_set_property);
    00882         }
    00884
    00885         const VariantSetPropertyProxy prop_variant_set()
    00886         {
    00887                 return VariantSetPropertyProxy(this, &variant_set_property);
    00888         }
    00890
    00891         const WeightSetPropertyProxy prop_weight_set()
    00892         {
    00893                 return WeightSetPropertyProxy(this, &weight_set_property);
    00894         }
    00896
    00897         const StretchSetPropertyProxy prop_stretch_set()
    00898         {
    00899                 return StretchSetPropertyProxy(this, &stretch_set_property);
    00900         }
    00902
    00903         const SizeSetPropertyProxy prop_size_set()
    00904         {
    00905                 return SizeSetPropertyProxy(this, &size_set_property);
    00906         }
    00908
    00909         const ScaleSetPropertyProxy prop_scale_set()
    00910         {
    00911                 return ScaleSetPropertyProxy(this, &scale_set_property);
    00912         }
    00914
    00915         const RiseSetPropertyProxy prop_rise_set()
    00916         {
    00917                 return RiseSetPropertyProxy(this, &rise_set_property);
    00918         }
    00920
    00921         const StrikethroughSetPropertyProxy prop_strikethrough_set()
    00922         {
    00923                 return StrikethroughSetPropertyProxy(this, &strikethrough_set_property);
    00924         }
    00926
    00927         const UnderlineSetPropertyProxy prop_underline_set()
    00928         {
    00929                 return UnderlineSetPropertyProxy(this, &underline_set_property);
    00930         }
    00932
    00936
    00937         const EditedSignalProxy sig_edited()
    00938         {
    00939                 return EditedSignalProxy(this, &edited_signal);
    00940         }
    00942
    00944 };
    00945
    00948
    00949 class CellRendererToggle : public CellRenderer
    00950 {
    00951         friend class G::Object;
    00952         friend class CellRendererToggleClass;
    00953
    00954         CellRendererToggle(const CellRendererToggle&);
    00955         CellRendererToggle& operator=(const CellRendererToggle&);
    00956
    00957 protected:
    00960
    00961         explicit CellRendererToggle(GtkCellRendererToggle *cell, bool reference = false);
    00968
    00970 //  Properties
    00971
    00972         typedef G::Property<bool> ActivePropertyType;
    00973         typedef G::PropertyProxy<G::Object, ActivePropertyType> ActivePropertyProxy;
    00974         static const ActivePropertyType active_property;
    00975
    00976         typedef G::Property<bool> ActivatablePropertyType;
    00977         typedef G::PropertyProxy<G::Object, ActivatablePropertyType> ActivatablePropertyProxy;
    00978         static const ActivatablePropertyType activatable_property;
    00979
    00980         typedef G::Property<bool> RadioPropertyType;
    00981         typedef G::PropertyProxy<G::Object, RadioPropertyType> RadioPropertyProxy;
    00982         static const RadioPropertyType radio_property;
    00983
    00984         typedef G::Property<bool> InconsistentPropertyType;
    00985         typedef G::PropertyProxy<G::Object, InconsistentPropertyType> InconsistentPropertyProxy;
    00986         static const InconsistentPropertyType inconsistent_property;
    00987
    00990
    00991         virtual void on_toggled(const String& path);
    00993
    00995 //  Signals
    00996
    00997         typedef G::Signal1<void, const char*> ToggledSignalType;
    00998         typedef G::SignalProxy<TypeInstance, ToggledSignalType> ToggledSignalProxy;
    00999         static const ToggledSignalType toggled_signal;
    01000
    01001 public:
    01004
    01005         CellRendererToggle();
    01011
    01012         virtual ~CellRendererToggle();
    01014
    01018
    01019         GtkCellRendererToggle* gtk_cell_renderer_toggle() const { return (GtkCellRendererToggle*)instance; }
    01021
    01022         GtkCellRendererToggleClass* gtk_cell_renderer_toggle_class() const;
    01024
    01025         operator GtkCellRendererToggle* () const;
    01027
    01028         bool get_active() const;
    01030
    01031         bool get_radio() const;
    01033
    01037
    01038         void set_active(bool setting);
    01041
    01042         void set_radio(bool radio);
    01051
    01055
    01056         const ActivePropertyProxy prop_active()
    01057         {
    01058                 return ActivePropertyProxy(this, &active_property);
    01059         }
    01061
    01062         const ActivatablePropertyProxy prop_activatable()
    01063         {
    01064                 return ActivatablePropertyProxy(this, &activatable_property);
    01065         }
    01067
    01068         const RadioPropertyProxy prop_radio()
    01069         {
    01070                 return RadioPropertyProxy(this, &radio_property);
    01071         }
    01073
    01074         const InconsistentPropertyProxy prop_inconsistent()
    01075         {
    01076                 return InconsistentPropertyProxy(this, &inconsistent_property);
    01077         }
    01079
    01083
    01084         const ToggledSignalProxy sig_toggled()
    01085         {
    01086                 return ToggledSignalProxy(this, &toggled_signal);
    01087         }
    01089
    01091 };
    01092
    01093 } // namespace Gtk
    01094
    01095 } // namespace Inti
    01096
    01097 #endif // INTI_GTK_CELL_RENDERER_H
    01098

Main Page - Footer