00001
00002
00003 #ifndef _CLUTTERMM_LABEL_H
00004 #define _CLUTTERMM_LABEL_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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 _ClutterLabel ClutterLabel;
00033 typedef struct _ClutterLabelClass ClutterLabelClass;
00034 #endif
00035
00036
00037 namespace Clutter
00038 { class Label_Class; }
00039 namespace Clutter
00040 {
00041
00042
00043 class Label :
00044 public Actor
00045 {
00046
00047 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00048
00049 public:
00050 typedef Label CppObjectType;
00051 typedef Label_Class CppClassType;
00052 typedef ClutterLabel BaseObjectType;
00053 typedef ClutterLabelClass BaseClassType;
00054
00055 private: friend class Label_Class;
00056 static CppClassType label_class_;
00057
00058 private:
00059
00060 Label(const Label&);
00061 Label& operator=(const Label&);
00062
00063 protected:
00064 explicit Label(const Glib::ConstructParams& construct_params);
00065 explicit Label(ClutterLabel* castitem);
00066
00067 #endif
00068
00069 public:
00070 virtual ~Label();
00071
00072 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00073 static GType get_type() G_GNUC_CONST;
00074 static GType get_base_type() G_GNUC_CONST;
00075 #endif
00076
00078 ClutterLabel* gobj() { return reinterpret_cast<ClutterLabel*>(gobject_); }
00079
00081 const ClutterLabel* gobj() const { return reinterpret_cast<ClutterLabel*>(gobject_); }
00082
00084 ClutterLabel* gobj_copy();
00085
00086 private:
00087
00088
00089 protected:
00090 Label();
00091 explicit Label(const Glib::ustring& font_name, const Glib::ustring& text);
00092 explicit Label(const Glib::ustring& font_name, const Glib::ustring& text, const Color& color);
00093
00094 public:
00095
00096 static Glib::RefPtr<Label> create();
00097
00098
00099 static Glib::RefPtr<Label> create(const Glib::ustring& font_name, const Glib::ustring& text);
00100 ;
00101
00102 static Glib::RefPtr<Label> create(const Glib::ustring& font_name, const Glib::ustring& text, const Color& color);
00103 ;
00104
00105
00109 void set_text(const Glib::ustring& text);
00110
00115 Glib::ustring set_text() const;
00116
00124 void set_font_name(const Glib::ustring& font_name);
00125
00132 Glib::ustring get_font_name() const;
00133
00134
00139 Color get_color() const;
00140
00141
00145 void set_color(const Color& color);
00146
00147
00153 Pango::EllipsizeMode get_ellipsize() const;
00154
00161 void set_ellipsize(Pango::EllipsizeMode wrap_mode);
00162
00163
00169 bool get_line_wrap() const;
00170
00179 void set_line_wrap(bool wrap);
00180
00181
00185 bool get_use_markup() const;
00186
00191 void set_use_markup(bool wrap);
00192
00193
00199 Pango::WrapMode get_line_wrap_mode() const;
00200
00208 void set_line_wrap_mode(Pango::WrapMode wrap_mode);
00209
00210
00220 Glib::RefPtr<Pango::Layout> get_layout();
00221
00231 Glib::RefPtr<const Pango::Layout> get_layout() const;
00232
00233
00240 Pango::AttrList get_attributes() const;
00241
00242
00243
00244
00253 void set_attributes(Pango::AttrList& attrs);
00254
00255
00261 Pango::Alignment get_alignment() const;
00262
00266 void set_alignment(Pango::Alignment wrap_mode);
00267
00268
00274 bool get_justify() const;
00275
00283 void set_justify(bool justify);
00284
00285
00286 public:
00287
00288 public:
00289
00290 #ifdef GLIBMM_VFUNCS_ENABLED
00291 #endif //GLIBMM_VFUNCS_ENABLED
00292
00293 protected:
00294
00295 #ifdef GLIBMM_VFUNCS_ENABLED
00296 #endif //GLIBMM_VFUNCS_ENABLED
00297
00298
00299 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00300 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00301
00302
00303 };
00304
00305 }
00306
00307
00308
00309
00310 namespace Glib
00311 {
00320 Glib::RefPtr<Clutter::Label> wrap(ClutterLabel* object, bool take_copy = false);
00321 }
00322
00323
00324 #endif
00325