text.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _CLUTTERMM_TEXT_H
00004 #define _CLUTTERMM_TEXT_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 /*
00010  * Copyright (c) 2009  The cluttermm Development Team
00011  *
00012  * This library is free software; you can redistribute it and/or
00013  * modify it under the terms of the GNU Lesser General Public
00014  * License as published by the Free Software Foundation; either
00015  * version 2 of the License, or (at your option) any later version.
00016  *
00017  * This library is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  * Lesser General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU Lesser General Public
00023  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
00024  */
00025 
00026 #include <cluttermm/actor.h>
00027 #include <cluttermm/color.h>
00028 #include <pangomm.h>
00029  
00030 
00031 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00032 typedef struct _ClutterText ClutterText;
00033 typedef struct _ClutterTextClass ClutterTextClass;
00034 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00035 
00036 
00037 namespace Clutter
00038 { class Text_Class; } // namespace Clutter
00039 namespace Clutter
00040 {
00041 
00042 
00043 class Text : public Actor
00044 {
00045   
00046 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00047 
00048 public:
00049   typedef Text CppObjectType;
00050   typedef Text_Class CppClassType;
00051   typedef ClutterText BaseObjectType;
00052   typedef ClutterTextClass BaseClassType;
00053 
00054 private:  friend class Text_Class;
00055   static CppClassType text_class_;
00056 
00057 private:
00058   // noncopyable
00059   Text(const Text&);
00060   Text& operator=(const Text&);
00061 
00062 protected:
00063   explicit Text(const Glib::ConstructParams& construct_params);
00064   explicit Text(ClutterText* castitem);
00065 
00066 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00067 
00068 public:
00069   virtual ~Text();
00070 
00071 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00072   static GType get_type()      G_GNUC_CONST;
00073   static GType get_base_type() G_GNUC_CONST;
00074 #endif
00075 
00077   ClutterText*       gobj()       { return reinterpret_cast<ClutterText*>(gobject_); }
00078 
00080   const ClutterText* gobj() const { return reinterpret_cast<ClutterText*>(gobject_); }
00081 
00083   ClutterText* gobj_copy();
00084 
00085 private:
00086 
00087 
00088 protected:
00089   Text();
00090   explicit Text(const Glib::ustring& font_name, const Glib::ustring& text);
00091   explicit Text(const Glib::ustring& font_name, const Glib::ustring& text, const Color& color);
00092 
00093 public:
00094   
00095   static Glib::RefPtr<Text> create();
00096 
00097   
00098   static Glib::RefPtr<Text> create(const Glib::ustring& font_name, const Glib::ustring& text);
00099 
00100   
00101   static Glib::RefPtr<Text> create(const Glib::ustring& font_name, const Glib::ustring& text, const Color& color);
00102 
00103 
00110   void set_text(const Glib::ustring& text);
00111   
00126   void set_markup(const Glib::ustring& markup);
00127   
00145   Glib::ustring get_text() const;
00146 
00147   
00160   void set_activatable(bool activatable=true);
00161   
00167   bool get_activatable() const;
00168 
00169   
00179   void set_attributes(Pango::AttrList& attrs);
00180   
00188   Pango::AttrList get_attributes();
00189 
00190   
00201   void set_color(const Color& color);
00202   
00209   Color get_color() const;
00210   
00211 
00219   void set_ellipsize(Pango::EllipsizeMode mode);
00220   
00226   Pango::EllipsizeMode get_ellipsize();
00227 
00228   
00244   void set_font_name(const Glib::ustring& font_name);
00245   
00253   Glib::ustring get_font_name() const;
00254 
00255   
00265   void set_password_char(gunichar wc);
00266   
00274   gunichar get_password_char() const;
00275 
00276   
00284   void set_justify(bool justify=true);
00285   
00292   bool get_justify() const;
00293 
00294   
00301   Glib::RefPtr<Pango::Layout> get_layout();
00302   
00309   Glib::RefPtr<const Pango::Layout> get_layout() const;
00310 
00311   
00322   void set_line_alignment(Pango::Alignment alignment);
00323   
00330   Pango::Alignment get_line_alignment() const;
00331 
00332   
00339   void set_line_wrap(bool line_wrap=true);
00340   
00347   bool get_line_wrap() const;
00348 
00349   
00357   Pango::WrapMode get_line_wrap_mode() const;
00358   
00366   void set_line_wrap_mode(Pango::WrapMode wrap_mode);
00367 
00368   
00376   int get_max_length() const;
00377   
00386   void set_max_length(int max_length);
00387 
00388   
00397   void set_selectable(bool selectable=true);
00398   
00404   bool get_selectable() const;
00405 
00406   
00416   void set_selection(gssize start_pos, gssize end_pos);
00417   
00425   Glib::ustring get_selection() const;
00426 
00427   
00436   void set_selection_bound(int selection_bound);
00437   
00444   int get_selection_bound() const;
00445 
00446   
00456   void set_selection_color(const Color& color);
00457   
00464   Color get_selection_color() const;
00465   
00466 
00483   void set_single_line_mode(bool single_line=true);
00484   
00490   bool get_single_line_mode() const;
00491 
00492   
00502   void set_use_markup(bool setting=true);
00503   
00510   bool get_use_markup() const;
00511 
00512   
00522   void set_editable(bool editable=true);
00523   
00529   bool get_editable() const;
00530 
00531   
00538   void insert(gunichar wc);
00539   
00551   void insert(const Glib::ustring& text, gssize position);
00552 
00553   
00560   void delete_chars(guint len);
00561   
00572   void delete_text(gssize start_pos, gssize end_pos);
00573   
00582   bool delete_selection();
00583 
00584   
00597   Glib::ustring get_chars(gssize start_pos, gssize end_pos) const;
00598 
00599   
00608   void set_cursor_color(const Color& color);
00609   
00615   void get_cursor_color(Color& color) const;
00616 
00617   
00625   void set_cursor_position(int position);
00626   
00632   int get_cursor_position() const;
00633 
00634   
00649   void set_cursor_visible(bool visible);
00650   
00656   bool get_cursor_visible() const;
00657 
00658   
00667   void set_cursor_size(int size);
00668   
00674   unsigned int get_cursor_size() const;
00675 
00676   
00689   bool activate();
00690 
00691   
00701   bool position_to_coords(int position, float &x, float &y, float &line_height);
00702 
00703   
00709   Glib::SignalProxy0< void > signal_activate();
00710 
00711   
00717   Glib::SignalProxy0< void > signal_text_changed();
00718 
00719   
00725   Glib::SignalProxy1< void,const Geometry& > signal_cursor_event();
00726 
00727 
00728   #ifdef GLIBMM_PROPERTIES_ENABLED
00729 
00735   Glib::PropertyProxy<bool> property_activatable() ;
00736 #endif //#GLIBMM_PROPERTIES_ENABLED
00737 
00738 #ifdef GLIBMM_PROPERTIES_ENABLED
00739 
00745   Glib::PropertyProxy_ReadOnly<bool> property_activatable() const;
00746 #endif //#GLIBMM_PROPERTIES_ENABLED
00747 
00748   #ifdef GLIBMM_PROPERTIES_ENABLED
00749 
00755   Glib::PropertyProxy<Pango::AttrList> property_attributes() ;
00756 #endif //#GLIBMM_PROPERTIES_ENABLED
00757 
00758 #ifdef GLIBMM_PROPERTIES_ENABLED
00759 
00765   Glib::PropertyProxy_ReadOnly<Pango::AttrList> property_attributes() const;
00766 #endif //#GLIBMM_PROPERTIES_ENABLED
00767 
00768   #ifdef GLIBMM_PROPERTIES_ENABLED
00769 
00775   Glib::PropertyProxy<Color> property_color() ;
00776 #endif //#GLIBMM_PROPERTIES_ENABLED
00777 
00778 #ifdef GLIBMM_PROPERTIES_ENABLED
00779 
00785   Glib::PropertyProxy_ReadOnly<Color> property_color() const;
00786 #endif //#GLIBMM_PROPERTIES_ENABLED
00787 
00788   #ifdef GLIBMM_PROPERTIES_ENABLED
00789 
00795   Glib::PropertyProxy<Color> property_cursor_color() ;
00796 #endif //#GLIBMM_PROPERTIES_ENABLED
00797 
00798 #ifdef GLIBMM_PROPERTIES_ENABLED
00799 
00805   Glib::PropertyProxy_ReadOnly<Color> property_cursor_color() const;
00806 #endif //#GLIBMM_PROPERTIES_ENABLED
00807 
00808   #ifdef GLIBMM_PROPERTIES_ENABLED
00809 
00815   Glib::PropertyProxy_ReadOnly<bool> property_cursor_color_set() const;
00816 #endif //#GLIBMM_PROPERTIES_ENABLED
00817 
00818 
00819   #ifdef GLIBMM_PROPERTIES_ENABLED
00820 
00826   Glib::PropertyProxy<int> property_cursor_size() ;
00827 #endif //#GLIBMM_PROPERTIES_ENABLED
00828 
00829 #ifdef GLIBMM_PROPERTIES_ENABLED
00830 
00836   Glib::PropertyProxy_ReadOnly<int> property_cursor_size() const;
00837 #endif //#GLIBMM_PROPERTIES_ENABLED
00838 
00839   #ifdef GLIBMM_PROPERTIES_ENABLED
00840 
00846   Glib::PropertyProxy<bool> property_cursor_visible() ;
00847 #endif //#GLIBMM_PROPERTIES_ENABLED
00848 
00849 #ifdef GLIBMM_PROPERTIES_ENABLED
00850 
00856   Glib::PropertyProxy_ReadOnly<bool> property_cursor_visible() const;
00857 #endif //#GLIBMM_PROPERTIES_ENABLED
00858 
00859   #ifdef GLIBMM_PROPERTIES_ENABLED
00860 
00866   Glib::PropertyProxy<bool> property_editable() ;
00867 #endif //#GLIBMM_PROPERTIES_ENABLED
00868 
00869 #ifdef GLIBMM_PROPERTIES_ENABLED
00870 
00876   Glib::PropertyProxy_ReadOnly<bool> property_editable() const;
00877 #endif //#GLIBMM_PROPERTIES_ENABLED
00878 
00879   #ifdef GLIBMM_PROPERTIES_ENABLED
00880 
00886   Glib::PropertyProxy<Pango::EllipsizeMode> property_ellipsize() ;
00887 #endif //#GLIBMM_PROPERTIES_ENABLED
00888 
00889 #ifdef GLIBMM_PROPERTIES_ENABLED
00890 
00896   Glib::PropertyProxy_ReadOnly<Pango::EllipsizeMode> property_ellipsize() const;
00897 #endif //#GLIBMM_PROPERTIES_ENABLED
00898 
00899   #ifdef GLIBMM_PROPERTIES_ENABLED
00900 
00906   Glib::PropertyProxy<Glib::ustring> property_font_name() ;
00907 #endif //#GLIBMM_PROPERTIES_ENABLED
00908 
00909 #ifdef GLIBMM_PROPERTIES_ENABLED
00910 
00916   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_font_name() const;
00917 #endif //#GLIBMM_PROPERTIES_ENABLED
00918 
00919   #ifdef GLIBMM_PROPERTIES_ENABLED
00920 
00926   Glib::PropertyProxy<bool> property_justify() ;
00927 #endif //#GLIBMM_PROPERTIES_ENABLED
00928 
00929 #ifdef GLIBMM_PROPERTIES_ENABLED
00930 
00936   Glib::PropertyProxy_ReadOnly<bool> property_justify() const;
00937 #endif //#GLIBMM_PROPERTIES_ENABLED
00938 
00939   #ifdef GLIBMM_PROPERTIES_ENABLED
00940 
00946   Glib::PropertyProxy<Pango::Alignment> property_line_alignment() ;
00947 #endif //#GLIBMM_PROPERTIES_ENABLED
00948 
00949 #ifdef GLIBMM_PROPERTIES_ENABLED
00950 
00956   Glib::PropertyProxy_ReadOnly<Pango::Alignment> property_line_alignment() const;
00957 #endif //#GLIBMM_PROPERTIES_ENABLED
00958 
00959   #ifdef GLIBMM_PROPERTIES_ENABLED
00960 
00966   Glib::PropertyProxy<Pango::WrapMode> property_line_wrap_mode() ;
00967 #endif //#GLIBMM_PROPERTIES_ENABLED
00968 
00969 #ifdef GLIBMM_PROPERTIES_ENABLED
00970 
00976   Glib::PropertyProxy_ReadOnly<Pango::WrapMode> property_line_wrap_mode() const;
00977 #endif //#GLIBMM_PROPERTIES_ENABLED
00978 
00979   #ifdef GLIBMM_PROPERTIES_ENABLED
00980 
00986   Glib::PropertyProxy<bool> property_line_wrap() ;
00987 #endif //#GLIBMM_PROPERTIES_ENABLED
00988 
00989 #ifdef GLIBMM_PROPERTIES_ENABLED
00990 
00996   Glib::PropertyProxy_ReadOnly<bool> property_line_wrap() const;
00997 #endif //#GLIBMM_PROPERTIES_ENABLED
00998 
00999   #ifdef GLIBMM_PROPERTIES_ENABLED
01000 
01006   Glib::PropertyProxy<int> property_max_length() ;
01007 #endif //#GLIBMM_PROPERTIES_ENABLED
01008 
01009 #ifdef GLIBMM_PROPERTIES_ENABLED
01010 
01016   Glib::PropertyProxy_ReadOnly<int> property_max_length() const;
01017 #endif //#GLIBMM_PROPERTIES_ENABLED
01018 
01019   #ifdef GLIBMM_PROPERTIES_ENABLED
01020 
01026   Glib::PropertyProxy<gunichar> property_password_char() ;
01027 #endif //#GLIBMM_PROPERTIES_ENABLED
01028 
01029 #ifdef GLIBMM_PROPERTIES_ENABLED
01030 
01036   Glib::PropertyProxy_ReadOnly<gunichar> property_password_char() const;
01037 #endif //#GLIBMM_PROPERTIES_ENABLED
01038 
01039   #ifdef GLIBMM_PROPERTIES_ENABLED
01040 
01046   Glib::PropertyProxy<int> property_position() ;
01047 #endif //#GLIBMM_PROPERTIES_ENABLED
01048 
01049 #ifdef GLIBMM_PROPERTIES_ENABLED
01050 
01056   Glib::PropertyProxy_ReadOnly<int> property_position() const;
01057 #endif //#GLIBMM_PROPERTIES_ENABLED
01058 
01059   #ifdef GLIBMM_PROPERTIES_ENABLED
01060 
01066   Glib::PropertyProxy<bool> property_selectable() ;
01067 #endif //#GLIBMM_PROPERTIES_ENABLED
01068 
01069 #ifdef GLIBMM_PROPERTIES_ENABLED
01070 
01076   Glib::PropertyProxy_ReadOnly<bool> property_selectable() const;
01077 #endif //#GLIBMM_PROPERTIES_ENABLED
01078 
01079   #ifdef GLIBMM_PROPERTIES_ENABLED
01080 
01086   Glib::PropertyProxy<int> property_selection_bound() ;
01087 #endif //#GLIBMM_PROPERTIES_ENABLED
01088 
01089 #ifdef GLIBMM_PROPERTIES_ENABLED
01090 
01096   Glib::PropertyProxy_ReadOnly<int> property_selection_bound() const;
01097 #endif //#GLIBMM_PROPERTIES_ENABLED
01098 
01099   #ifdef GLIBMM_PROPERTIES_ENABLED
01100 
01106   Glib::PropertyProxy<Color> property_selection_color() ;
01107 #endif //#GLIBMM_PROPERTIES_ENABLED
01108 
01109 #ifdef GLIBMM_PROPERTIES_ENABLED
01110 
01116   Glib::PropertyProxy_ReadOnly<Color> property_selection_color() const;
01117 #endif //#GLIBMM_PROPERTIES_ENABLED
01118 
01119   #ifdef GLIBMM_PROPERTIES_ENABLED
01120 
01126   Glib::PropertyProxy_ReadOnly<bool> property_selection_color_set() const;
01127 #endif //#GLIBMM_PROPERTIES_ENABLED
01128 
01129 
01130   #ifdef GLIBMM_PROPERTIES_ENABLED
01131 
01137   Glib::PropertyProxy<bool> property_single_line_mode() ;
01138 #endif //#GLIBMM_PROPERTIES_ENABLED
01139 
01140 #ifdef GLIBMM_PROPERTIES_ENABLED
01141 
01147   Glib::PropertyProxy_ReadOnly<bool> property_single_line_mode() const;
01148 #endif //#GLIBMM_PROPERTIES_ENABLED
01149 
01150   #ifdef GLIBMM_PROPERTIES_ENABLED
01151 
01157   Glib::PropertyProxy<Glib::ustring> property_text() ;
01158 #endif //#GLIBMM_PROPERTIES_ENABLED
01159 
01160 #ifdef GLIBMM_PROPERTIES_ENABLED
01161 
01167   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_text() const;
01168 #endif //#GLIBMM_PROPERTIES_ENABLED
01169 
01170   #ifdef GLIBMM_PROPERTIES_ENABLED
01171 
01177   Glib::PropertyProxy<bool> property_use_markup() ;
01178 #endif //#GLIBMM_PROPERTIES_ENABLED
01179 
01180 #ifdef GLIBMM_PROPERTIES_ENABLED
01181 
01187   Glib::PropertyProxy_ReadOnly<bool> property_use_markup() const;
01188 #endif //#GLIBMM_PROPERTIES_ENABLED
01189 
01190 
01191 public:
01192 
01193 public:
01194   //C++ methods used to invoke GTK+ virtual functions:
01195 #ifdef GLIBMM_VFUNCS_ENABLED
01196 #endif //GLIBMM_VFUNCS_ENABLED
01197 
01198 protected:
01199   //GTK+ Virtual Functions (override these to change behaviour):
01200 #ifdef GLIBMM_VFUNCS_ENABLED
01201 #endif //GLIBMM_VFUNCS_ENABLED
01202 
01203   //Default Signal Handlers::
01204 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
01205   virtual void on_activate();
01206   virtual void on_text_changed();
01207   virtual void on_cursor_event(const Geometry& geometry);
01208 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
01209 
01210 
01211 };
01212 
01213 } // namespace Clutter
01214 
01215 
01216 namespace Glib
01217 {
01226   Glib::RefPtr<Clutter::Text> wrap(ClutterText* object, bool take_copy = false);
01227 }
01228 
01229 
01230 #endif /* _CLUTTERMM_TEXT_H */
01231 

Generated on 7 Sep 2009 for cluttermm by  doxygen 1.6.1