Main Page | Class Hierarchy | Class List | File List | Class Members

aedStaticText.h

00001 
00002 /*
00003  * The aedStaticText class
00004  * This class manages the (static) text drawing on screen
00005  * Initial design by Eduardo B. Fonseca <ebf@aedsolucoes.com.br>
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Library General Public
00018  * License along with this library; if not, write to the Free
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  */
00022 
00023 #ifndef AEDSTATICTEXT_H
00024 #define AEDSTATICTEXT_H
00025 
00026 #include "aedWidget.h"
00027 #include "aedFont.h"
00028 
00031 class DLLEXPORT aedStaticText:public aedWidget
00032 {
00033   public:
00034     aedStaticText();
00035     virtual ~ aedStaticText();
00036 
00037     virtual void render(void);
00038 
00042     virtual void setJustification(aedJusts just)
00043     {
00044         m_Justification = just;
00045         setRenderState(true);
00046     }
00047 
00049     void setFontSize(Uint8 size);
00050     Uint8 getFontSize(void) const
00051     {
00052         return m_FontSize;
00053     }
00054 
00056     void setTextColor(aedColor color)
00057     {
00058         m_TextColor = color;
00059         setRenderState(true);
00060     }
00061 
00063     void setTextBold(bool bold);
00064 
00066     void setWordWrap(bool state)
00067     {
00068         m_WordWrap = state;
00069         setRenderState(true);
00070     }
00071 
00072     int getPosAtPixel(int x, int y);
00073     virtual void setCaption(const std::string & caption);
00074 
00075   protected:
00076     void updateFont();
00077 
00078   protected:
00079     aedColor m_TextColor;
00080     aedJusts m_Justification;
00081 
00082   private:
00083     Uint8 m_FontSize;
00084     bool m_TextBold;
00085     bool m_WordWrap;
00086 };
00087 
00088 #if defined(_MSC_VER)
00089 DLLEXTERN template DLLEXPORT aedFunctor1Arg < stub, aedStaticText >;
00090 #endif
00091 
00092 #endif

Generated on Mon Mar 1 19:56:18 2004 for aedGUI by doxygen 1.3.6