1 #ifndef SDL_TBMF_TEXTSURF_H
2 #define SDL_TBMF_TEXTSURF_H
6 #include "SDL_tbmf_string.h"
12 TextSurface(const char *, const Font
&, SDL_Surface
* = NULL
);
13 TextSurface(const char *, const Font
&, SDL_Color
);
16 void operator=(const char *t
) { setText(t
); }
17 operator SDL_Surface
*() { return mSurface
; }
18 operator const SDL_Surface
*() const { return mSurface
; }
20 SDL_Surface
*surface() { return mSurface
; }
21 const SDL_Surface
*surface() const { return mSurface
; }
23 char *text() { return mText
; }
24 const char *text() const { return mText
; }
25 Font
&font() { return mFont
; }
26 const Font
&font() const { return mFont
; }
27 SDL_Color
color() const { return mColor
; }
28 SDL_Surface
*texture() { return mTexture
; }
30 TextSurface
&setText(const char *);
31 TextSurface
&setFont(const Font
&);
32 TextSurface
&setColor(SDL_Color
);
33 TextSurface
&setTexture(SDL_Surface
*);
39 SDL_Surface
*mTexture
;
40 SDL_Surface
*mSurface
;
45 } // namespace sdl_tbmf
47 #endif /* SDL_TBMF_TEXTSURF_H */