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

label.h

Go to the documentation of this file.
00001 /*
00002         ClanGUI, copyrights by various people. Have a look in the CREDITS file.
00003         
00004         This sourcecode is distributed using the Library GNU Public Licence,
00005         version 2 or (at your option) any later version. Please read LICENSE
00006         for details.
00007 */
00008 
00010 
00011 #ifndef header_label
00012 #define header_label
00013 
00014 #include "component.h"
00015 
00016 class CL_Label : public CL_Component
00017 //: Label component
00018 {
00020 public:
00021         CL_Label(
00022                 const CL_ComponentOptions &options,
00023                 CL_Component *parent,
00024                 CL_StyleManager *style = NULL);
00025 
00026         CL_Label(
00027                 const CL_Point &pos,
00028                 const std::string &text,
00029                 CL_Component *parent,
00030                 CL_StyleManager *style = NULL);
00031 
00032         CL_Label(
00033                 const CL_Rect &pos,
00034                 const std::string &text,
00035                 CL_Component *parent,
00036                 CL_StyleManager *style = NULL);
00037 
00038         virtual ~CL_Label();
00039 
00041 public:
00042         const std::string &get_text() const;
00043         //: Returns the labeltext.
00044 
00045         int get_alignment() const;
00046         //: Returns the alignment setting.
00047         // See set_alignment() for more info.
00048 
00050 public:
00051         void set_text(const std::string &text);
00052         //: Sets the labeltext.
00053 
00054         void set_text(int number);
00055         //: Sets the label contents to a plain text containing the printed value of num.
00056 
00057         void set_text(double number);
00058         //: Sets the label contents to a plain text containing the printed value of num.
00059 
00060         void clear();
00061         //: Clears any label contents. Equivalent with setText("").
00062 
00063         void set_alignment(int alignment);
00064         //: Sets the alignment of the label contents
00065 
00067 public:
00068 
00070 private:
00071         CL_Label(const CL_Label &copy) : CL_Component(NULL, NULL) { return; } // disallow copy construction.
00072         class CL_Label_Generic *impl;
00073 };  
00074 
00075 #endif

Generated at Wed Apr 4 19:54:01 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001