Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

texttag.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  
00024 
00025 #ifndef INTI_GTK_TEXT_TAG_H
00026 #define INTI_GTK_TEXT_TAG_H
00027 
00028 #ifndef INTI_G_BOXED_H
00029 #include <inti/glib/boxed.h>
00030 #endif
00031 
00032 #ifndef INTI_G_OBJECT_H
00033 #include <inti/glib/object.h>
00034 #endif
00035 
00036 #ifndef INTI_GTK_ENUMS_H
00037 #include <inti/gtk/enums.h>
00038 #endif
00039 
00040 #ifndef INTI_PANGO_ATTRIBUTES_H
00041 #include <inti/pango/attributes.h>
00042 #endif
00043 
00044 #ifndef GTK_TEXT_TAG_H
00045 #include <gtk/gtktexttag.h>
00046 #endif
00047 
00048 #ifndef GTK_TEXT_TAG_TABLE_H
00049 #include <gtk/gtktexttagtable.h>
00050 #endif
00051 
00052 namespace Inti {
00053 
00054 namespace Pango {
00055 class FontDescription;
00056 class TabArray;
00057 }
00058 
00059 namespace Gdk {
00060 class Color;
00061 class Bitmap;
00062 class Event;
00063 class Pixmap;
00064 }
00065 
00066 namespace Gtk {
00067 
00068 class TextIter;
00069 class TextTagClass;
00070 class TextTagTable;
00071 class TextTagTableClass;
00072 
00078 
00079 class TextAppearance
00080 {
00081         GtkTextAppearance appearence_;
00082 
00083 public:
00086 
00087         GtkTextAppearance* gtk_text_appearance() const { return const_cast<GtkTextAppearance*>(&appearence_); }
00089 
00090         Gdk::Color bg_color() const;
00092 
00093         Gdk::Color fg_color() const;
00095 
00096         Gdk::Bitmap* bg_stipple() const;
00098 
00099         Gdk::Bitmap* fg_stipple() const;
00101 
00102         int rise() const;
00104 
00105         Pango::Underline underline() const;
00107 
00108         bool strikethrough() const;
00110 
00114 
00115         void set_colors(const Gdk::Color& fg_color, const Gdk::Color& bg_color);
00119 
00120         void set_bg_color(const Gdk::Color& color);
00123 
00124         void set_fg_color(const Gdk::Color& color);
00127 
00128         void set_stipple(const Gdk::Bitmap& fg_mask, const Gdk::Bitmap& bg_mask);
00132 
00133         void set_bg_stipple(const Gdk::Bitmap& mask);
00136 
00137         void set_fg_stipple(const Gdk::Bitmap& mask);
00140 
00141         void set_rise(int rise);
00144 
00145         void set_underline(Pango::Underline underline);
00148 
00149         void set_strikethrough(bool setting);
00152         
00154 };
00155 
00161 
00162 class TextAttributes : public G::Boxed
00163 {
00164 public:
00167 
00168         TextAttributes();
00170 
00171         explicit TextAttributes(GtkTextAttributes *values);
00179 
00180         TextAttributes(GtkTextAttributes *values, bool copy);
00192 
00193         explicit TextAttributes(const TextAttributes& src);
00196 
00197         ~TextAttributes();
00199 
00200         TextAttributes& operator=(const TextAttributes& src);
00203 
00207 
00208         GtkTextAttributes* gtk_text_attributes() const { return (GtkTextAttributes*)boxed_; }
00210 
00211         operator GtkTextAttributes* () const;
00213 
00214         TextAppearance& appearance() const;
00216 
00217         Justification justification() const;
00219 
00220         TextDirection direction() const;
00222 
00223         Pointer<Pango::FontDescription> font() const;
00225 
00226         double font_scale() const;
00228 
00229         int left_margin() const;
00231 
00232         int indent() const;
00234 
00235         int right_margin() const;
00237 
00238         int pixels_above_lines() const;
00240 
00241         int pixels_below_lines() const;
00243 
00244         int pixels_inside_wrap() const;
00246 
00247         Pointer<Pango::TabArray> tabs() const;
00249 
00250         WrapMode wrap_mode() const;
00252 
00253         PangoLanguage* language() const;
00256 
00257         bool invisible() const;
00259 
00260         bool bg_full_height() const;
00263 
00264         bool editable() const;
00266 
00267         bool realized() const;
00269 
00273 
00274         void set_justification(Justification justification);
00277 
00278         void set_direction(TextDirection direction);
00281 
00282         void set_margins(int left_margin, int right_margin);
00286 
00287         void set_left_margin(int margin);
00290 
00291         void set_right_margin(int margin);
00294 
00295         void set_indent(int indent);
00297 
00298         void set_pixels(int pixels_above_lines, int pixels_below_lines, int pixels_inside_wrap);
00303 
00304         void set_pixels_above_lines(int pixels);
00307 
00308         void set_pixels_below_lines(int pixels);
00311 
00312         void set_pixels_inside_wrap(int pixels);
00315 
00316         void set_tab_array(Pango::TabArray& tabs);
00319 
00320         void set_wrap_mode(WrapMode wrap_mode);
00323 
00324         void set_language(PangoLanguage *language);
00330 
00331         void set_invisible(bool setting);
00334 
00335         void set_bg_full_height(bool setting);
00339 
00340         void set_editable(bool setting);
00342         
00344 };
00345 
00364 
00365 class TextTag : public G::Object
00366 {
00367         friend class G::Object;
00368         friend class TextTagClass;
00369 
00370         TextTag(const TextTag&);
00371         TextTag& operator=(const TextTag&);
00372 
00373 protected:
00376 
00377         explicit TextTag(GtkTextTag *tag, bool reference = true);
00384 
00388         bool on_event(G::Object& event_object, Gdk::Event& event, const TextIter& iter);
00394 
00396 //  Properties
00397         
00398         typedef G::Property<String> NamePropertyType;
00399         typedef G::PropertyProxy<G::Object, NamePropertyType> NamePropertyProxy;
00400         static const NamePropertyType name_property;
00401 
00402         typedef G::WritableProperty<String> BackgroundPropertyType;
00403         typedef G::PropertyProxy<G::Object, BackgroundPropertyType> BackgroundPropertyProxy;
00404         static const BackgroundPropertyType background_property;
00405 
00406         typedef G::Property<Pointer<Gdk::Color> > BackgroundGdkPropertyType;
00407         typedef G::PropertyProxy<G::Object, BackgroundGdkPropertyType> BackgroundGdkPropertyProxy;
00408         static const BackgroundGdkPropertyType background_gdk_property;
00409 
00410         typedef G::Property<bool> BackgroundFullHeightPropertyType;
00411         typedef G::PropertyProxy<G::Object, BackgroundFullHeightPropertyType> BackgroundFullHeightPropertyProxy;
00412         static const BackgroundFullHeightPropertyType background_full_height_property;
00413 
00414         typedef G::Property<Gdk::Bitmap*, G::Object*> BackgroundStipplePropertyType;
00415         typedef G::PropertyProxy<G::Object, BackgroundStipplePropertyType> BackgroundStipplePropertyProxy;
00416         static const BackgroundStipplePropertyType background_stipple_property;
00417 
00418         typedef G::WritableProperty<String> ForegroundPropertyType;
00419         typedef G::PropertyProxy<G::Object, ForegroundPropertyType> ForegroundPropertyProxy;
00420         static const ForegroundPropertyType foreground_property;
00421 
00422         typedef G::Property<Pointer<Gdk::Color> > ForegroundGdkPropertyType;
00423         typedef G::PropertyProxy<G::Object, ForegroundGdkPropertyType> ForegroundGdkPropertyProxy;
00424         static const ForegroundGdkPropertyType foreground_gdk_property;
00425 
00426         typedef G::Property<Gdk::Bitmap*, G::Object*> ForegroundStipplePropertyType;
00427         typedef G::PropertyProxy<G::Object, ForegroundStipplePropertyType> ForegroundStipplePropertyProxy;
00428         static const ForegroundStipplePropertyType foreground_stipple_property;
00429 
00430         typedef G::Property<TextDirection, int> DirectionPropertyType;
00431         typedef G::PropertyProxy<G::Object, DirectionPropertyType> DirectionPropertyProxy;
00432         static const DirectionPropertyType direction_property;
00433 
00434         typedef G::Property<bool> EditablePropertyType;
00435         typedef G::PropertyProxy<G::Object, EditablePropertyType> EditablePropertyProxy;
00436         static const EditablePropertyType editable_property;
00437 
00438         typedef G::Property<String> FontPropertyType;
00439         typedef G::PropertyProxy<G::Object, FontPropertyType> FontPropertyProxy;
00440         static const FontPropertyType font_property;
00441 
00442         typedef G::Property<Pointer<Pango::FontDescription> > FontDescPropertyType;
00443         typedef G::PropertyProxy<G::Object, FontDescPropertyType> FontDescPropertyProxy;
00444         static const FontDescPropertyType font_desc_property;
00445 
00446         typedef G::Property<String> FamilyPropertyType;
00447         typedef G::PropertyProxy<G::Object, FamilyPropertyType> FamilyPropertyProxy;
00448         static const FamilyPropertyType family_property;
00449 
00450         typedef G::Property<Pango::Style, int> StylePropertyType;
00451         typedef G::PropertyProxy<G::Object, StylePropertyType> StylePropertyProxy;
00452         static const StylePropertyType style_property;
00453 
00454         typedef G::Property<Pango::Variant, int> VariantPropertyType;
00455         typedef G::PropertyProxy<G::Object, VariantPropertyType> VariantPropertyProxy;
00456         static const VariantPropertyType variant_property;
00457 
00458         typedef G::Property<Pango::Weight, int> WeightPropertyType;
00459         typedef G::PropertyProxy<G::Object, WeightPropertyType> WeightPropertyProxy;
00460         static const WeightPropertyType weight_property;
00461 
00462         typedef G::Property<Pango::Stretch, int> StretchPropertyType;
00463         typedef G::PropertyProxy<G::Object, StretchPropertyType> StretchPropertyProxy;
00464         static const StretchPropertyType stretch_property;
00465 
00466         typedef G::Property<int> SizePropertyType;
00467         typedef G::PropertyProxy<G::Object, SizePropertyType> SizePropertyProxy;
00468         static const SizePropertyType size_property;
00469 
00470         typedef G::Property<double> ScalePropertyType;
00471         typedef G::PropertyProxy<G::Object, ScalePropertyType> ScalePropertyProxy;
00472         static const ScalePropertyType scale_property;
00473 
00474         typedef G::Property<double> SizePointsPropertyType;
00475         typedef G::PropertyProxy<G::Object, SizePointsPropertyType> SizePointsPropertyProxy;
00476         static const SizePointsPropertyType size_points_property;
00477 
00478         typedef G::Property<Justification, int> JustificationPropertyType;
00479         typedef G::PropertyProxy<G::Object, JustificationPropertyType> JustificationPropertyProxy;
00480         static const JustificationPropertyType justification_property;
00481 
00482         typedef G::Property<String> LanguagePropertyType;
00483         typedef G::PropertyProxy<G::Object, LanguagePropertyType> LanguagePropertyProxy;
00484         static const LanguagePropertyType language_property;
00485 
00486         typedef G::Property<int> LeftMarginPropertyType;
00487         typedef G::PropertyProxy<G::Object, LeftMarginPropertyType> LeftMarginPropertyProxy;
00488         static const LeftMarginPropertyType left_margin_property;
00489 
00490         typedef G::Property<int> RightMarginPropertyType;
00491         typedef G::PropertyProxy<G::Object, RightMarginPropertyType> RightMarginPropertyProxy;
00492         static const RightMarginPropertyType right_margin_property;
00493 
00494         typedef G::Property<int> IndentPropertyType;
00495         typedef G::PropertyProxy<G::Object, IndentPropertyType> IndentPropertyProxy;
00496         static const IndentPropertyType indent_property;
00497 
00498         typedef G::Property<int> RisePropertyType;
00499         typedef G::PropertyProxy<G::Object, RisePropertyType> RisePropertyProxy;
00500         static const RisePropertyType rise_property;
00501 
00502         typedef G::Property<int> PixelsAboveLinesPropertyType;
00503         typedef G::PropertyProxy<G::Object, PixelsAboveLinesPropertyType> PixelsAboveLinesPropertyProxy;
00504         static const PixelsAboveLinesPropertyType pixels_above_lines_property;
00505 
00506         typedef G::Property<int> PixelsBelowLinesPropertyType;
00507         typedef G::PropertyProxy<G::Object, PixelsBelowLinesPropertyType> PixelsBelowLinesPropertyProxy;
00508         static const PixelsBelowLinesPropertyType pixels_below_lines_property;
00509 
00510         typedef G::Property<int> PixelsInsideWrapPropertyType;
00511         typedef G::PropertyProxy<G::Object, PixelsInsideWrapPropertyType> PixelsInsideWrapPropertyProxy;
00512         static const PixelsInsideWrapPropertyType pixels_inside_wrap_property;
00513 
00514         typedef G::Property<bool> StrikethroughPropertyType;
00515         typedef G::PropertyProxy<G::Object, StrikethroughPropertyType> StrikethroughPropertyProxy;
00516         static const StrikethroughPropertyType strikethrough_property;
00517 
00518         typedef G::Property<Pango::Underline, int> UnderlinePropertyType;
00519         typedef G::PropertyProxy<G::Object, UnderlinePropertyType> UnderlinePropertyProxy;
00520         static const UnderlinePropertyType underline_property;
00521 
00522         typedef G::Property<WrapMode, int> WrapModePropertyType;
00523         typedef G::PropertyProxy<G::Object, WrapModePropertyType> WrapModePropertyProxy;
00524         static const WrapModePropertyType wrap_mode_property;
00525 
00526         typedef G::Property<Pointer<Pango::TabArray> > TabsPropertyType;
00527         typedef G::PropertyProxy<G::Object, TabsPropertyType> TabsPropertyProxy;
00528         static const TabsPropertyType tabs_property;
00529 
00530         typedef G::Property<bool> InvisiblePropertyType;
00531         typedef G::PropertyProxy<G::Object, InvisiblePropertyType> InvisiblePropertyProxy;
00532         static const InvisiblePropertyType invisible_property;
00533 
00534         typedef G::Property<bool> BackgroundSetPropertyType;
00535         typedef G::PropertyProxy<G::Object, BackgroundSetPropertyType> BackgroundSetPropertyProxy;
00536         static const BackgroundSetPropertyType background_set_property;
00537 
00538         typedef G::Property<bool> BackgroundFullHeightSetPropertyType;
00539         typedef G::PropertyProxy<G::Object, BackgroundFullHeightSetPropertyType> BackgroundFullHeightSetPropertyProxy;
00540         static const BackgroundFullHeightSetPropertyType background_full_height_set_property;
00541 
00542         typedef G::Property<bool> BackgroundStippleSetPropertyType;
00543         typedef G::PropertyProxy<G::Object, BackgroundStippleSetPropertyType> BackgroundStippleSetPropertyProxy;
00544         static const BackgroundStippleSetPropertyType background_stipple_set_property;
00545 
00546         typedef G::Property<bool> ForegroundSetPropertyType;
00547         typedef G::PropertyProxy<G::Object, ForegroundSetPropertyType> ForegroundSetPropertyProxy;
00548         static const ForegroundSetPropertyType foreground_set_property;
00549 
00550         typedef G::Property<bool> ForegroundStippleSetPropertyType;
00551         typedef G::PropertyProxy<G::Object, ForegroundStippleSetPropertyType> ForegroundStippleSetPropertyProxy;
00552         static const ForegroundStippleSetPropertyType foreground_stipple_set_property;
00553 
00554         typedef G::Property<bool> EditableSetPropertyType;
00555         typedef G::PropertyProxy<G::Object, EditableSetPropertyType> EditableSetPropertyProxy;
00556         static const EditableSetPropertyType editable_set_property;
00557 
00558         typedef G::Property<bool> FamilySetPropertyType;
00559         typedef G::PropertyProxy<G::Object, FamilySetPropertyType> FamilySetPropertyProxy;
00560         static const FamilySetPropertyType family_set_property;
00561 
00562         typedef G::Property<bool> StyleSetPropertyType;
00563         typedef G::PropertyProxy<G::Object, StyleSetPropertyType> StyleSetPropertyProxy;
00564         static const StyleSetPropertyType style_set_property;
00565 
00566         typedef G::Property<bool> VariantSetPropertyType;
00567         typedef G::PropertyProxy<G::Object, VariantSetPropertyType> VariantSetPropertyProxy;
00568         static const VariantSetPropertyType variant_set_property;
00569 
00570         typedef G::Property<bool> WeightSetPropertyType;
00571         typedef G::PropertyProxy<G::Object, WeightSetPropertyType> WeightSetPropertyProxy;
00572         static const WeightSetPropertyType weight_set_property;
00573 
00574         typedef G::Property<bool> StretchSetPropertyType;
00575         typedef G::PropertyProxy<G::Object, StretchSetPropertyType> StretchSetPropertyProxy;
00576         static const StretchSetPropertyType stretch_set_property;
00577 
00578         typedef G::Property<bool> SizeSetPropertyType;
00579         typedef G::PropertyProxy<G::Object, SizeSetPropertyType> SizeSetPropertyProxy;
00580         static const SizeSetPropertyType size_set_property;
00581 
00582         typedef G::Property<bool> ScaleSetPropertyType;
00583         typedef G::PropertyProxy<G::Object, ScaleSetPropertyType> ScaleSetPropertyProxy;
00584         static const ScaleSetPropertyType scale_set_property;
00585 
00586         typedef G::Property<bool> JustificationSetPropertyType;
00587         typedef G::PropertyProxy<G::Object, JustificationSetPropertyType> JustificationSetPropertyProxy;
00588         static const JustificationSetPropertyType justification_set_property;
00589 
00590         typedef G::Property<bool> LanguageSetPropertyType;
00591         typedef G::PropertyProxy<G::Object, LanguageSetPropertyType> LanguageSetPropertyProxy;
00592         static const LanguageSetPropertyType language_set_property;
00593 
00594         typedef G::Property<bool> LeftMarginSetPropertyType;
00595         typedef G::PropertyProxy<G::Object, LeftMarginSetPropertyType> LeftMarginSetPropertyProxy;
00596         static const LeftMarginSetPropertyType left_margin_set_property;
00597 
00598         typedef G::Property<bool> IndentSetPropertyType;
00599         typedef G::PropertyProxy<G::Object, IndentSetPropertyType> IndentSetPropertyProxy;
00600         static const IndentSetPropertyType indent_set_property;
00601 
00602         typedef G::Property<bool> RiseSetPropertyType;
00603         typedef G::PropertyProxy<G::Object, RiseSetPropertyType> RiseSetPropertyProxy;
00604         static const RiseSetPropertyType rise_set_property;
00605 
00606         typedef G::Property<bool> PixelsAboveLinesSetPropertyType;
00607         typedef G::PropertyProxy<G::Object, PixelsAboveLinesSetPropertyType> PixelsAboveLinesSetPropertyProxy;
00608         static const PixelsAboveLinesSetPropertyType pixels_above_lines_set_property;
00609 
00610         typedef G::Property<bool> PixelsBelowLinesSetPropertyType;
00611         typedef G::PropertyProxy<G::Object, PixelsBelowLinesSetPropertyType> PixelsBelowLinesSetPropertyProxy;
00612         static const PixelsBelowLinesSetPropertyType pixels_below_lines_set_property;
00613 
00614         typedef G::Property<bool> PixelsInsideWrapSetPropertyType;
00615         typedef G::PropertyProxy<G::Object, PixelsInsideWrapSetPropertyType> PixelsInsideWrapSetPropertyProxy;
00616         static const PixelsInsideWrapSetPropertyType pixels_inside_wrap_set_property;
00617 
00618         typedef G::Property<bool> StrikethroughSetPropertyType;
00619         typedef G::PropertyProxy<G::Object, StrikethroughSetPropertyType> StrikethroughSetPropertyProxy;
00620         static const StrikethroughSetPropertyType strikethrough_set_property;
00621 
00622         typedef G::Property<bool> RightMarginSetPropertyType;
00623         typedef G::PropertyProxy<G::Object, RightMarginSetPropertyType> RightMarginSetPropertyProxy;
00624         static const RightMarginSetPropertyType right_margin_set_property;
00625 
00626         typedef G::Property<bool> UnderlineSetPropertyType;
00627         typedef G::PropertyProxy<G::Object, UnderlineSetPropertyType> UnderlineSetPropertyProxy;
00628         static const UnderlineSetPropertyType underline_set_property;
00629 
00630         typedef G::Property<bool> WrapModeSetPropertyType;
00631         typedef G::PropertyProxy<G::Object, WrapModeSetPropertyType> WrapModeSetPropertyProxy;
00632         static const WrapModeSetPropertyType wrap_mode_set_property;
00633 
00634         typedef G::Property<bool> TabsSetPropertyType;
00635         typedef G::PropertyProxy<G::Object, TabsSetPropertyType> TabsSetPropertyProxy;
00636         static const TabsSetPropertyType tabs_set_property;
00637 
00638         typedef G::Property<bool> InvisibleSetPropertyType;
00639         typedef G::PropertyProxy<G::Object, InvisibleSetPropertyType> InvisibleSetPropertyProxy;
00640         static const InvisibleSetPropertyType invisible_set_property;
00641 
00642 //  Signals
00643         
00644         typedef G::Signal3<bool, GObject*, GdkEvent*, const GtkTextIter*> EventSignalType;
00645         typedef G::SignalProxy<TypeInstance, EventSignalType> EventSignalProxy;
00646         static const EventSignalType event_signal;
00647 
00648 public:
00651 
00652         TextTag(const char *name = 0);
00655 
00656         virtual ~TextTag();
00658 
00662 
00663         GtkTextTag* gtk_text_tag() const { return (GtkTextTag*)instance; }
00665 
00666         GtkTextTagClass* gtk_text_tag_class() const;
00668 
00669         operator GtkTextTag* () const;
00671 
00672         TextTagTable* table() const;
00675 
00676         Pointer<TextAttributes> values() const;
00682 
00683         int get_priority() const;
00686 
00690 
00691         void set_priority(int priority);
00703 
00704         bool event(G::Object& event_object, Gdk::Event& event, const TextIter& iter);
00710         
00714         
00715         const NamePropertyProxy prop_name()
00716         {
00717                 return NamePropertyProxy(this, &name_property);
00718         }
00721 
00722         const BackgroundPropertyProxy prop_background()
00723         {
00724                 return BackgroundPropertyProxy(this, &background_property);
00725         }
00727 
00728         const BackgroundGdkPropertyProxy prop_background_gdk()
00729         {
00730                 return BackgroundGdkPropertyProxy(this, &background_gdk_property);
00731         }
00733 
00734         const BackgroundFullHeightPropertyProxy prop_background_full_height()
00735         {
00736                 return BackgroundFullHeightPropertyProxy(this, &background_full_height_property);
00737         }
00740 
00741         const BackgroundStipplePropertyProxy prop_background_stipple()
00742         {
00743                 return BackgroundStipplePropertyProxy(this, &background_stipple_property);
00744         }
00746 
00747         const ForegroundPropertyProxy prop_foreground()
00748         {
00749                 return ForegroundPropertyProxy(this, &foreground_property);
00750         }
00752 
00753         const ForegroundGdkPropertyProxy prop_foreground_gdk()
00754         {
00755                 return ForegroundGdkPropertyProxy(this, &foreground_gdk_property);
00756         }
00758 
00759         const ForegroundStipplePropertyProxy prop_foreground_stipple()
00760         {
00761                 return ForegroundStipplePropertyProxy(this, &foreground_stipple_property);
00762         }
00764 
00765         const DirectionPropertyProxy prop_direction()
00766         {
00767                 return DirectionPropertyProxy(this, &direction_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 ScalePropertyProxy prop_scale()
00826         {
00827                 return ScalePropertyProxy(this, &scale_property);
00828         }
00832 
00833         const SizePointsPropertyProxy prop_size_points()
00834         {
00835                 return SizePointsPropertyProxy(this, &size_points_property);
00836         }
00838 
00839         const JustificationPropertyProxy prop_justification()
00840         {
00841                 return JustificationPropertyProxy(this, &justification_property);
00842         }
00844 
00845         const LanguagePropertyProxy prop_language()
00846         {
00847                 return LanguagePropertyProxy(this, &language_property);
00848         }
00852 
00853         const LeftMarginPropertyProxy prop_left_margin()
00854         {
00855                 return LeftMarginPropertyProxy(this, &left_margin_property);
00856         }
00858 
00859         const RightMarginPropertyProxy prop_right_margin()
00860         {
00861                 return RightMarginPropertyProxy(this, &right_margin_property);
00862         }
00864 
00865         const IndentPropertyProxy prop_indent()
00866         {
00867                 return IndentPropertyProxy(this, &indent_property);
00868         }
00870 
00871         const RisePropertyProxy prop_rise()
00872         {
00873                 return RisePropertyProxy(this, &rise_property);
00874         }
00877 
00878         const PixelsAboveLinesPropertyProxy prop_pixels_above_lines()
00879         {
00880                 return PixelsAboveLinesPropertyProxy(this, &pixels_above_lines_property);
00881         }
00883 
00884         const PixelsBelowLinesPropertyProxy prop_pixels_below_lines()
00885         {
00886                 return PixelsBelowLinesPropertyProxy(this, &pixels_below_lines_property);
00887         }
00889 
00890         const PixelsInsideWrapPropertyProxy prop_pixels_inside_wrap()
00891         {
00892                 return PixelsInsideWrapPropertyProxy(this, &pixels_inside_wrap_property);
00893         }
00895 
00896         const StrikethroughPropertyProxy prop_strikethrough()
00897         {
00898                 return StrikethroughPropertyProxy(this, &strikethrough_property);
00899         }
00901 
00902         const UnderlinePropertyProxy prop_underline()
00903         {
00904                 return UnderlinePropertyProxy(this, &underline_property);
00905         }
00907 
00908         const WrapModePropertyProxy prop_wrap_mode()
00909         {
00910                 return WrapModePropertyProxy(this, &wrap_mode_property);
00911         }
00914 
00915         const TabsPropertyProxy prop_tabs()
00916         {
00917                 return TabsPropertyProxy(this, &tabs_property);
00918         }
00920 
00921         const InvisiblePropertyProxy prop_invisible()
00922         {
00923                 return InvisiblePropertyProxy(this, &invisible_property);
00924         }
00926 
00927         const BackgroundSetPropertyProxy prop_background_set()
00928         {
00929                 return BackgroundSetPropertyProxy(this, &background_set_property);
00930         }
00932 
00933         const BackgroundFullHeightSetPropertyProxy prop_background_full_height_set()
00934         {
00935                 return BackgroundFullHeightSetPropertyProxy(this, &background_full_height_set_property);
00936         }
00938 
00939         const BackgroundStippleSetPropertyProxy prop_background_stipple_set()
00940         {
00941                 return BackgroundStippleSetPropertyProxy(this, &background_stipple_set_property);
00942         }
00944 
00945         const ForegroundSetPropertyProxy prop_foreground_set()
00946         {
00947                 return ForegroundSetPropertyProxy(this, &foreground_set_property);
00948         }
00950 
00951         const ForegroundStippleSetPropertyProxy prop_foreground_stipple_set()
00952         {
00953                 return ForegroundStippleSetPropertyProxy(this, &foreground_stipple_set_property);
00954         }
00956 
00957         const EditableSetPropertyProxy prop_editable_set()
00958         {
00959                 return EditableSetPropertyProxy(this, &editable_set_property);
00960         }
00962 
00963         const FamilySetPropertyProxy prop_family_set()
00964         {
00965                 return FamilySetPropertyProxy(this, &family_set_property);
00966         }
00968 
00969         const StyleSetPropertyProxy prop_style_set()
00970         {
00971                 return StyleSetPropertyProxy(this, &style_set_property);
00972         }
00974 
00975         const VariantSetPropertyProxy prop_variant_set()
00976         {
00977                 return VariantSetPropertyProxy(this, &variant_set_property);
00978         }
00980 
00981         const WeightSetPropertyProxy prop_weight_set()
00982         {
00983                 return WeightSetPropertyProxy(this, &weight_set_property);
00984         }
00986 
00987         const StretchSetPropertyProxy prop_stretch_set()
00988         {
00989                 return StretchSetPropertyProxy(this, &stretch_set_property);
00990         }
00992 
00993         const SizeSetPropertyProxy prop_size_set()
00994         {
00995                 return SizeSetPropertyProxy(this, &size_set_property);
00996         }
00998 
00999         const ScaleSetPropertyProxy prop_scale_set()
01000         {
01001                 return ScaleSetPropertyProxy(this, &scale_set_property);
01002         }
01004 
01005         const JustificationSetPropertyProxy prop_justification_set()
01006         {
01007                 return JustificationSetPropertyProxy(this, &justification_set_property);
01008         }
01010 
01011         const LanguageSetPropertyProxy prop_language_set()
01012         {
01013                 return LanguageSetPropertyProxy(this, &language_set_property);
01014         }
01016 
01017         const LeftMarginSetPropertyProxy prop_left_margin_set()
01018         {
01019                 return LeftMarginSetPropertyProxy(this, &left_margin_set_property);
01020         }
01022 
01023         const IndentSetPropertyProxy prop_indent_set()
01024         {
01025                 return IndentSetPropertyProxy(this, &indent_set_property);
01026         }
01028 
01029         const RiseSetPropertyProxy prop_rise_set()
01030         {
01031                 return RiseSetPropertyProxy(this, &rise_set_property);
01032         }
01034 
01035         const PixelsAboveLinesSetPropertyProxy prop_pixels_above_lines_set()
01036         {
01037                 return PixelsAboveLinesSetPropertyProxy(this, &pixels_above_lines_set_property);
01038         }
01040 
01041         const PixelsBelowLinesSetPropertyProxy prop_pixels_below_lines_set()
01042         {
01043                 return PixelsBelowLinesSetPropertyProxy(this, &pixels_below_lines_set_property);
01044         }
01046 
01047         const PixelsInsideWrapSetPropertyProxy prop_pixels_inside_wrap_set()
01048         {
01049                 return PixelsInsideWrapSetPropertyProxy(this, &pixels_inside_wrap_set_property);
01050         }
01052 
01053         const StrikethroughSetPropertyProxy prop_strikethrough_set()
01054         {
01055                 return StrikethroughSetPropertyProxy(this, &strikethrough_set_property);
01056         }
01058 
01059         const RightMarginSetPropertyProxy prop_right_margin_set()
01060         {
01061                 return RightMarginSetPropertyProxy(this, &right_margin_set_property);
01062         }
01064 
01065         const UnderlineSetPropertyProxy prop_underline_set()
01066         {
01067                 return UnderlineSetPropertyProxy(this, &underline_set_property);
01068         }
01070 
01071         const WrapModeSetPropertyProxy prop_wrap_mode_set()
01072         {
01073                 return WrapModeSetPropertyProxy(this, &wrap_mode_set_property);
01074         }
01076 
01077         const TabsSetPropertyProxy prop_tabs_set()
01078         {
01079                 return TabsSetPropertyProxy(this, &tabs_set_property);
01080         }
01082 
01083         const InvisibleSetPropertyProxy prop_invisible_set()
01084         {
01085                 return InvisibleSetPropertyProxy(this, &invisible_set_property);
01086         }
01088 
01092         
01093         const EventSignalProxy sig_event()
01094         {
01095                 return EventSignalProxy(this, &event_signal);
01096         }
01098         
01100 };
01101 
01109 
01110 class TextTagTable : public G::Object
01111 {
01112         friend class G::Object;
01113         friend class TextTagTableClass;
01114 
01115         TextTagTable(const TextTagTable&);
01116         TextTagTable& operator=(const TextTagTable&);
01117 
01118 protected:
01121 
01122         explicit TextTagTable(GtkTextTagTable *table, bool reference = true);
01129 
01133 
01134         virtual void on_tag_changed(TextTag& tag, bool size_changed);
01139 
01140         virtual void on_tag_added(TextTag& tag);
01143 
01144         virtual void on_tag_removed(TextTag& tag);
01147 
01149 //  Signals
01150 
01151         typedef G::Signal2<void, GtkTextTag*, bool> TagChangedSignalType;
01152         typedef G::SignalProxy<TypeInstance, TagChangedSignalType> TagChangedSignalProxy;
01153         static const TagChangedSignalType tag_changed_signal;
01154 
01155         typedef G::Signal1<void, GtkTextTag*> TagAddedSignalType;
01156         typedef G::SignalProxy<TypeInstance, TagAddedSignalType> TagAddedSignalProxy;
01157         static const TagAddedSignalType tag_added_signal;
01158 
01159         typedef G::Signal1<void, GtkTextTag*> TagRemovedSignalType;
01160         typedef G::SignalProxy<TypeInstance, TagRemovedSignalType> TagRemovedSignalProxy;
01161         static const TagRemovedSignalType tag_removed_signal;
01162 
01163 public:
01164         typedef Slot1<void, TextTag&> ForeachSlot;
01172 
01175 
01176         TextTagTable();
01178 
01179         virtual ~TextTagTable();
01181         
01185 
01186         GtkTextTagTable* gtk_text_tag_table() const { return (GtkTextTagTable*)instance; }
01188 
01189         GtkTextTagTableClass* gtk_text_tag_table_class() const;
01191 
01192         operator GtkTextTagTable* () const;
01194 
01195         int get_size() const;
01198 
01199         TextTag* lookup(const char *name);
01203 
01207 
01208         void add(TextTag& tag);
01214 
01215         void remove(TextTag& tag);
01221 
01222         void foreach(const ForeachSlot *each);
01225 
01229 
01230         const TagChangedSignalProxy sig_tag_changed()
01231         {
01232                 return TagChangedSignalProxy(this, &tag_changed_signal);
01233         }
01235 
01236         const TagAddedSignalProxy sig_tag_added()
01237         {
01238                 return TagAddedSignalProxy(this, &tag_added_signal);
01239         }
01241 
01242         const TagRemovedSignalProxy sig_tag_removed()
01243         {
01244                 return TagRemovedSignalProxy(this, &tag_removed_signal);
01245         }
01247 
01249 };
01250 
01251 } // namespace Gtk
01252 
01253 } // namespace Inti
01254 
01255 #endif // INTI_GTK_TEXT_TAG_H
01256 
Main Page - Footer


Generated on Sun Sep 14 20:08:04 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002