Public Methods |
| SDLDrawObject (int id, SDL_Rect& rect, bool visible, bool storeBackground, SDLDrawObject* objParent = NULL) |
virtual | ~SDLDrawObject () |
virtual bool | Redraw (bool update = true) |
| Redraw the surface of the widget. More...
|
virtual void | Update (bool doBlit = true) |
| Update the widgets screen area. More...
|
virtual void | Blit () |
| Blit the surface of the object to the screen surface. More...
|
virtual bool | MoveWindow (int x, int y) |
| Move the object to a given screen-coordinate. More...
|
virtual bool | SizeWindow (int w, int h) |
| Resize the object. More...
|
bool | SetVisible (bool visible) |
| Make an object visible. More...
|
bool | IsVisible () |
| Check if the object is visible. More...
|
void | SetTransparency (Uint8 t) |
Uint8 | GetTransparency () |
bool | RestoreBackground () |
bool | StoreBackground () |
void | SetStoreBackground (bool store) |
bool | GetStoreBackground () |
virtual void | SetScreenUpdate (bool update) |
bool | GetScreenUpdate () |
void | FadeOut () |
void | FadeIn () |
void | DrawHLine (int x, int y, int w, Uint8 r, Uint8 g, Uint8 b, SDL_Surface* surface) |
void | DrawVLine (int x, int y, int h, Uint8 r, Uint8 g, Uint8 b, SDL_Surface* surface) |
void | DrawRectWH (int x, int y, int w, int h, Uint8 r, Uint8 g, Uint8 b, SDL_Surface* surface) |
void | DrawBorder (SDL_Surface* surface, SDL_Rect* r, int size, bool up = true) |
void | DrawText (int x, int y, char* text, SDL_Color c, TTF_Font* textfont = NULL) |
void | DrawText (SDL_Rect* r, char* text, SDL_Color c, int align = SDL_TA_LEFT, TTF_Font* textfont = NULL) |
void | SetClipRect (int x, int y, int w, int h) |
bool | IsClippingEnabled () |
void | GetClipRects (SDL_Rect& src, SDL_Rect& dst, SDL_Rect* displayrect = NULL) |
SDL_Rect | GetClipRect () |
virtual bool | IsDisplayRectValid () |
void | SetParent (SDLDrawObject* objParent) |
Static Public Methods |
void | SetPixel (int x, int y, Uint8 r, Uint8 g, Uint8 b, SDL_Surface* surface) |
SDL_Surface* | CreateGradient (SDL_Rect& r, SDL_Gradient& gradient) |
| Creates a surface filled with a gradient. More...
|
SDL_Surface* | CreateGradient (SDL_Rect& r, SDL_Color& ul, SDL_Color& ur, SDL_Color& dl, SDL_Color& dr) |
| Creates a surface filled with a gradient. More...
|
void | DrawGradient (SDL_Surface* surface, SDL_Rect& r, SDL_Color& ul, SDL_Color& ur, SDL_Color& dl, SDL_Color& dr) |
void | DrawGradient (SDL_Surface* surface, SDL_Rect& r, SDL_Gradient& gradient) |
void | DrawThemedSurface (SDL_Surface* surface, SDL_Rect* r, SDL_Gradient* gradient, SDL_Surface* background, int bkmode, Uint8 blend) |
| Draw a 'themed' surface. More...
|
SDL_Surface* | CreateThemedSurface (SDL_Rect& r, SDL_Gradient* gradient, SDL_Surface* background, int bkmode, Uint8 blend) |
| Create a 'themed' surface. More...
|
SDL_Rect | IntersectRect (SDL_Rect p, SDL_Rect c) |
Protected Methods |
SDL_Surface* | CreateSubSurface (SDL_Surface* surface, SDL_Rect* r) |
virtual void | eventDraw (SDL_Surface* surface, SDL_Rect* rect) |
virtual void | eventBlit (SDL_Surface* srf, SDL_Rect* src, SDL_Rect* dst) |
virtual void | eventSizeWindow (int w, int h) |
virtual void | eventMoveWindow (int x, int y) |
Protected Attributes |
int | my_id |
SDL_Rect | my_rectDisplay |
SDL_Rect | my_rectClip |
bool | my_visible |
bool | my_storeBackground |
Uint8 | my_transparency |
SDL_Surface* | my_srfBackground |
SDL_Surface* | my_srfObject |
SDL_Surface* | my_srfScreen |
SDL_Surface* | my_srfDrag |
SDLDrawObject* | my_objParent |
SDL_Point | my_ptDragStart |
Provides a graphics context and basic drawing functionality.