]> Shamusworld >> Repos - apple2/blob - src/gui/text.h
Converted to SDL 2, added fullscreen toggle.
[apple2] / src / gui / text.h
1 //
2 // Static text class
3 //
4 // by James L. Hammons
5 //
6
7 #ifndef __TEXT_H__
8 #define __TEXT_H__
9
10 #include <string>
11 #include "element.h"
12
13 class Text: public Element
14 {
15         public:
16                 Text(uint32_t x = 0, uint32_t y = 0, uint32_t w = 0, uint32_t h = 0, Element * parent = NULL);
17                 Text(uint32_t x, uint32_t y, std::string s, uint32_t fg = 0xFF8484FF, uint32_t bg = 0xFF84FF4D, Element * parent = NULL);
18                 virtual void HandleKey(SDL_Scancode key) {}
19                 virtual void HandleMouseMove(uint32_t x, uint32_t y) {}
20                 virtual void HandleMouseButton(uint32_t x, uint32_t y, bool mouseDown) {}
21                 virtual void Draw(void);
22                 virtual void Notify(Element *) {}
23                 void SetText(std::string s);
24
25         protected:
26 //              uint32_t fgColor, bgColor;
27                 std::string text;
28 };
29
30 #endif  // __TEXT_H__