Google
Web alhem.net
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

gui::Static Class Reference

#include <Static.h>

Inheritance diagram for gui::Static:

Inheritance graph
[legend]
Collaboration diagram for gui::Static:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Static (Surface *, coord_t x, coord_t y, coord_t w, coord_t h, SurfaceHelper *=NULL)
 ~Static ()
void Draw ()

Constructor & Destructor Documentation

gui::Static::Static Surface ,
coord_t  x,
coord_t  y,
coord_t  w,
coord_t  h,
SurfaceHelper = NULL
 

Definition at line 57 of file Static.cpp.

References gui::coord_t, STATIC_DEFAULT_FG_B, STATIC_DEFAULT_FG_G, STATIC_DEFAULT_FG_R, and STATIC_DEFAULT_FW.

00058 :Surface(s,x,y,w,h,pclHelper) 00059 { 00060 // SetBgColor(STATIC_DEFAULT_BG); 00061 SetFgColor(STATIC_DEFAULT_FG_R,STATIC_DEFAULT_FG_G,STATIC_DEFAULT_FG_B); 00062 SetFrameWidth(STATIC_DEFAULT_FW); 00063 }

gui::Static::~Static  ) 
 

Definition at line 66 of file Static.cpp.

00067 { 00068 }


Member Function Documentation

void gui::Static::Draw  )  [virtual]
 

Reimplemented from gui::Surface.

Definition at line 71 of file Static.cpp.

References gui::coord_t, gui::Surface::GetBgColor(), gui::Surface::GetClientRectPtr(), gui::Surface::GetFgColor(), gui::Surface::GetH(), and gui::Surface::GetTTFont().

00072 { 00073 SDL_Rect *area = GetClientRectPtr(); 00074 Uint32 color; 00075 TTFont *font = GetTTFont(); 00076 SDL_Color fg; 00077 SDL_Color bg; 00078 // SDLControl *pcl = GetSDLControl(); 00079 // Uint32 tr = SDL_MapRGBA(pcl -> GetScreen() -> format, 255, 255, 255, 0); 00080 00081 color = GetFgColor(); 00082 memmove(&fg,&color,4); 00083 color = GetBgColor(); 00084 memmove(&bg,&color,4); 00085 00086 // color 0 - transparent 00087 SDL_FillRect(m_screen, area, color); 00088 00089 if (font && font -> GetFont()) 00090 { 00091 coord_t h = font -> GetH(); 00092 coord_t y = GetH() / 2 + h / 2; 00093 00094 sge_tt_textoutf(m_screen, font -> GetFont(), 00095 10,y, 00096 fg.r,fg.g,fg.b, 00097 bg.r,bg.g,bg.b, 00098 SDL_ALPHA_OPAQUE, 00099 "%s",GetText()); 00100 } 00101 }


The documentation for this class was generated from the following files:
Generated for My SDL C++ Gui by doxygen 1.3.6

www.TV-friendship.com
The matchmaking service with an all new twist.

Quantum 'Teleportation'
Some thoughts
Page, code, and content Copyright (C) 2004 by Anders Hedström