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 get_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 #ifdef GLIBMM_PROPERTIES_ENABLED
00286
00292 Glib::PropertyProxy<Pango::Alignment> property_alignment() ;
00293 #endif //#GLIBMM_PROPERTIES_ENABLED
00294
00295 #ifdef GLIBMM_PROPERTIES_ENABLED
00296
00302 Glib::PropertyProxy_ReadOnly<Pango::Alignment> property_alignment() const;
00303 #endif //#GLIBMM_PROPERTIES_ENABLED
00304
00305 #ifdef GLIBMM_PROPERTIES_ENABLED
00306
00312 Glib::PropertyProxy<Pango::AttrList> property_attributes() ;
00313 #endif //#GLIBMM_PROPERTIES_ENABLED
00314
00315 #ifdef GLIBMM_PROPERTIES_ENABLED
00316
00322 Glib::PropertyProxy_ReadOnly<Pango::AttrList> property_attributes() const;
00323 #endif //#GLIBMM_PROPERTIES_ENABLED
00324
00325 #ifdef GLIBMM_PROPERTIES_ENABLED
00326
00332 Glib::PropertyProxy<Color> property_color() ;
00333 #endif //#GLIBMM_PROPERTIES_ENABLED
00334
00335 #ifdef GLIBMM_PROPERTIES_ENABLED
00336
00342 Glib::PropertyProxy_ReadOnly<Color> property_color() const;
00343 #endif //#GLIBMM_PROPERTIES_ENABLED
00344
00345 #ifdef GLIBMM_PROPERTIES_ENABLED
00346
00352 Glib::PropertyProxy<Pango::EllipsizeMode> property_ellipsize() ;
00353 #endif //#GLIBMM_PROPERTIES_ENABLED
00354
00355 #ifdef GLIBMM_PROPERTIES_ENABLED
00356
00362 Glib::PropertyProxy_ReadOnly<Pango::EllipsizeMode> property_ellipsize() const;
00363 #endif //#GLIBMM_PROPERTIES_ENABLED
00364
00365 #ifdef GLIBMM_PROPERTIES_ENABLED
00366
00372 Glib::PropertyProxy<Glib::ustring> property_font_name() ;
00373 #endif //#GLIBMM_PROPERTIES_ENABLED
00374
00375 #ifdef GLIBMM_PROPERTIES_ENABLED
00376
00382 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_font_name() const;
00383 #endif //#GLIBMM_PROPERTIES_ENABLED
00384
00385 #ifdef GLIBMM_PROPERTIES_ENABLED
00386
00392 Glib::PropertyProxy<bool> property_justify() ;
00393 #endif //#GLIBMM_PROPERTIES_ENABLED
00394
00395 #ifdef GLIBMM_PROPERTIES_ENABLED
00396
00402 Glib::PropertyProxy_ReadOnly<bool> property_justify() const;
00403 #endif //#GLIBMM_PROPERTIES_ENABLED
00404
00405 #ifdef GLIBMM_PROPERTIES_ENABLED
00406
00412 Glib::PropertyProxy<Glib::ustring> property_text() ;
00413 #endif //#GLIBMM_PROPERTIES_ENABLED
00414
00415 #ifdef GLIBMM_PROPERTIES_ENABLED
00416
00422 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_text() const;
00423 #endif //#GLIBMM_PROPERTIES_ENABLED
00424
00425 #ifdef GLIBMM_PROPERTIES_ENABLED
00426
00432 Glib::PropertyProxy<bool> property_use_markup() ;
00433 #endif //#GLIBMM_PROPERTIES_ENABLED
00434
00435 #ifdef GLIBMM_PROPERTIES_ENABLED
00436
00442 Glib::PropertyProxy_ReadOnly<bool> property_use_markup() const;
00443 #endif //#GLIBMM_PROPERTIES_ENABLED
00444
00445 #ifdef GLIBMM_PROPERTIES_ENABLED
00446
00452 Glib::PropertyProxy<bool> property_wrap() ;
00453 #endif //#GLIBMM_PROPERTIES_ENABLED
00454
00455 #ifdef GLIBMM_PROPERTIES_ENABLED
00456
00462 Glib::PropertyProxy_ReadOnly<bool> property_wrap() const;
00463 #endif //#GLIBMM_PROPERTIES_ENABLED
00464
00465 #ifdef GLIBMM_PROPERTIES_ENABLED
00466
00472 Glib::PropertyProxy<Pango::WrapMode> property_wrap_mode() ;
00473 #endif //#GLIBMM_PROPERTIES_ENABLED
00474
00475 #ifdef GLIBMM_PROPERTIES_ENABLED
00476
00482 Glib::PropertyProxy_ReadOnly<Pango::WrapMode> property_wrap_mode() const;
00483 #endif //#GLIBMM_PROPERTIES_ENABLED
00484
00485
00486 public:
00487
00488 public:
00489
00490 #ifdef GLIBMM_VFUNCS_ENABLED
00491 #endif //GLIBMM_VFUNCS_ENABLED
00492
00493 protected:
00494
00495 #ifdef GLIBMM_VFUNCS_ENABLED
00496 #endif //GLIBMM_VFUNCS_ENABLED
00497
00498
00499 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00500 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00501
00502
00503 };
00504
00505 }
00506
00507
00508
00509
00510 namespace Glib
00511 {
00520 Glib::RefPtr<Clutter::Label> wrap(ClutterLabel* object, bool take_copy = false);
00521 }
00522
00523
00524 #endif
00525