TextWindow.h
Go to the documentation of this file.00001 00011 #ifndef __TextWindow_H__ 00012 #define __TextWindow_H__ 00013 00014 // Includes 00015 #include "StringId.h" 00016 #include "Sprite.h" 00017 #include "MarkupTextBlock.h" 00018 00019 // Forward declares 00020 class SpriteManager; 00021 00022 // TextWindow 00023 class TextWindow:public Sprite 00024 { 00025 public: 00026 TextWindow(); 00027 00028 TextWindow(SpriteManager* spriteManager); 00029 00030 ~TextWindow(); 00031 00032 virtual void SetText(const char* pmlString); 00033 virtual void AddText(const char* pmlString); 00034 virtual const char* GetText() const; 00035 00036 virtual void SetSize(float width, float height); 00037 virtual void SetWidth(float width); 00038 virtual void SetHeight(float height); 00039 virtual float GetWidth() const; 00040 virtual float GetHeight() const; 00041 00042 virtual void SetBackgroundColor(unsigned short color); 00043 virtual unsigned short GetBackgroundColor() const; 00044 00045 virtual void SetBorderColor(unsigned short color); 00046 virtual unsigned short GetBorderColor() const; 00047 00048 virtual void SetBorderSize(float size); 00049 virtual float GetBorderSize() const; 00050 00051 virtual void SetPadding(float padding); 00052 virtual float GetPadding() const; 00053 00054 protected: 00055 virtual void Render(Bitmap& bitmap); 00056 00057 private: 00058 float width_; 00059 float height_; 00060 MarkupTextBlock content_; 00061 Bitmap* windowBitmap_; 00062 StringId currentHighlightOption_; 00063 StringId currentHighlightLink_; 00064 bool redraw_; 00065 unsigned short backgroundColor_; 00066 unsigned short borderColor_; 00067 float borderSize_; 00068 float padding_; 00069 }; 00070 00071 00072 #endif /* __TextWindow_H__ */ 00073
Reproduction/republishing of any material on this site without permission is strictly prohibited.
