aedWidget Class Reference

#include <aedWidget.h>

Inheritance diagram for aedWidget:

Inheritance graph
[legend]
Collaboration diagram for aedWidget:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 aedWidget ()
virtual ~aedWidget ()
 aedWidget (Uint16 screenWidth, Uint16 screenHeight, bool takeOverScreen=true)
virtual void create (aedWidget *parent=NULL, aedRect pos=aedDEFAULTPOSITION, std::string caption="")
void setStatic (bool value)
virtual void enable (bool value)
void show (void)
void hide (void)
bool isVisible (void) const
bool isLPressed (void) const
bool isRPressed (void) const
void bringToTop (void)
bool hasFocus () const
aedWidgetgetTopMostWidget ()
Uint16 getScreenWidth (void) const
Uint16 getScreenHeight (void) const
void setPos (Sint16 x, Sint16 y)
void setSize (Sint16 w, Sint16 h)
void screenToClient (Uint16 &x, Uint16 &y)
Uint16 clientxToScreen (Uint16 x=0)
Uint16 clientyToScreen (Uint16 y=0)
Sint32 clientwToScreen (Sint32 w=0)
Sint32 clienthToScreen (Sint32 h=0)
aedRect getPositionOffset (void)
aedRect getPos (void)
aedRect getPosition (void)
aedRect getMyTranslatedPosition (void)
aedRect getRealPos (void)
void setFakeOffset (aedRect fakeOffset)
aedRect getFakeOffset (void)
bool getRenderState (void) const
void setRenderState (bool status)
void renderAll (SDL_Surface *screen=NULL)
virtual void render (void)
aedColor getBGColor (void) const
void setBGColor (aedColor color)
void setSolidRender (bool solid)
void setColorKey (Uint32 color)
void setActiveBorder (bool value)
bool getActiveBorder (void) const
void setAlphaValue (Uint8 alpha)
Uint8 getAlphaValue (void) const
bool isMouseOver (void)
virtual void setCaption (const std::string &caption)
virtual std::string getCaption (void) const
int getBorder () const
void setBorder (int border)
aedColor getBorderColor () const
void setBorderColor (aedColor color)
void setFont (aedFont *font)
aedFontgetFont () const
void setTheme (aedTheme *Theme)
aedThemegetTheme () const
aedWidgetfindWidget (const std::string &id)
aedWidgetfindWidget (aedWidget *pointer)
virtual bool addWidget (aedWidget *win)
virtual bool removeWidget (aedWidget *win)
aedWidgetgetParent () const
virtual int wm_paint (SDL_Surface *screen=NULL, Uint16 x=0, Uint16 y=0, Uint16 w=0, Uint16 h=0)
virtual int wm_lbuttondown (Uint16 x, Uint16 y)
virtual int wm_lbuttonup (Uint16 x, Uint16 y)
virtual int wm_rbuttondown (Uint16 x, Uint16 y)
virtual int wm_rbuttonup (Uint16 x, Uint16 y)
virtual int wm_sizechanged (Uint16 screenWidth, Uint16 screenHeight)
virtual int wm_keydown (aedKeyEvent &event)
virtual int wm_update (Uint32 msdelta)
virtual int wm_gotfocus ()
virtual int wm_lostfocus ()
virtual int wm_mouseenter ()
virtual int wm_mouseleave ()
virtual int wm_mousemove (Uint16 x, Uint16 y, Uint16 dx, Uint16 dy)
bool isEnabled () const
bool canFocus () const
void update ()
void setId (const std::string &id)
const std::string & getId () const
void setUserData (void *userdata)
void * getUserData ()
bool pollEvent (SDL_Event *event)
void processEvent (SDL_Event *event)

Static Public Member Functions

static bool GetReRender ()
static void ClearReRender ()
static void setWidgetDeletedFun (widget_deleted_callback_t callback)

Public Attributes

std::string m_Caption
bool m_IsEnabled:1
bool m_IsStatic:1
bool m_CanFocus:1
bool m_IsWidget:1
bool m_ShowWidget:1
bool m_ReRender:1
bool m_HasActiveBorder:1
int m_Border
aedColor m_BorderColor
aedColor m_BGColor
aedFontm_Font
aedThemem_Theme
SDL_Surface * m_Surface
bool m_SolidRender
Uint32 m_ColorKeyColor
bool m_ColorKey
Uint8 m_AlphaValue
Uint8 m_Flags
aedRect m_Pos
aedRect m_PixelPos
aedRect m_PositionOffset
aedRect m_FakeOffset
bool m_isLPressed
bool m_isRPressed

Static Public Attributes

static bool m_NeedsReRender
static class aedWidgetlast
static widget_deleted_callback_t m_WidgetDeletedCallback

Protected Member Functions

aedRect getMyPosition (void)
void init (void)

Private Types

typedef std::set< aedWidget * > ChildContainer

Private Member Functions

aedWidgetfindChildAtCoord (Uint16 x, Uint16 y, Uint8 flags=0)
void makeAllDirty (void)
void updateAllChildren (Uint32 msdelta)
bool tabFocus ()
bool tabFocusChildren ()
void tabFocusParent ()

Private Attributes

std::string m_Id
void * m_userdata
aedWidgetm_Parent
ChildContainer m_Children
Uint32 m_CurTicks
Uint32 m_LastTicks
Uint16 m_ScreenWidth
Uint16 m_ScreenHeight

Member Typedef Documentation

typedef std::set<aedWidget*> aedWidget::ChildContainer [private]


Constructor & Destructor Documentation

aedWidget::aedWidget (  ) 

virtual aedWidget::~aedWidget (  )  [virtual]

aedWidget::aedWidget ( Uint16  screenWidth,
Uint16  screenHeight,
bool  takeOverScreen = true 
)


Member Function Documentation

virtual bool aedWidget::addWidget ( aedWidget win  )  [virtual]

Reimplemented in aedWindow.

void aedWidget::bringToTop ( void   ) 

bool aedWidget::canFocus (  )  const [inline]

static void aedWidget::ClearReRender (  )  [inline, static]

Sint32 aedWidget::clienthToScreen ( Sint32  h = 0  ) 

Sint32 aedWidget::clientwToScreen ( Sint32  w = 0  ) 

Uint16 aedWidget::clientxToScreen ( Uint16  x = 0  ) 

Uint16 aedWidget::clientyToScreen ( Uint16  y = 0  ) 

virtual void aedWidget::create ( aedWidget parent = NULL,
aedRect  pos = aedDEFAULTPOSITION,
std::string  caption = "" 
) [virtual]

Reimplemented in aedScrollBar, and aedSpinner.

virtual void aedWidget::enable ( bool  value  )  [inline, virtual]

aedWidget* aedWidget::findChildAtCoord ( Uint16  x,
Uint16  y,
Uint8  flags = 0 
) [private]

aedWidget* aedWidget::findWidget ( aedWidget pointer  ) 

aedWidget* aedWidget::findWidget ( const std::string &  id  ) 

bool aedWidget::getActiveBorder ( void   )  const [inline]

Uint8 aedWidget::getAlphaValue ( void   )  const [inline]

aedColor aedWidget::getBGColor ( void   )  const [inline]

int aedWidget::getBorder (  )  const [inline]

aedColor aedWidget::getBorderColor (  )  const [inline]

virtual std::string aedWidget::getCaption ( void   )  const [inline, virtual]

aedRect aedWidget::getFakeOffset ( void   ) 

aedFont* aedWidget::getFont (  )  const [inline]

const std::string& aedWidget::getId (  )  const [inline]

aedRect aedWidget::getMyPosition ( void   )  [protected]

aedRect aedWidget::getMyTranslatedPosition ( void   ) 

aedWidget* aedWidget::getParent (  )  const [inline]

aedRect aedWidget::getPos ( void   ) 

aedRect aedWidget::getPosition ( void   ) 

aedRect aedWidget::getPositionOffset ( void   ) 

aedRect aedWidget::getRealPos ( void   )  [inline]

bool aedWidget::getRenderState ( void   )  const [inline]

static bool aedWidget::GetReRender (  )  [inline, static]

Uint16 aedWidget::getScreenHeight ( void   )  const [inline]

Uint16 aedWidget::getScreenWidth ( void   )  const [inline]

aedTheme* aedWidget::getTheme (  )  const [inline]

aedWidget* aedWidget::getTopMostWidget (  ) 

void* aedWidget::getUserData (  )  [inline]

bool aedWidget::hasFocus (  )  const

void aedWidget::hide ( void   )  [inline]

void aedWidget::init ( void   )  [protected]

bool aedWidget::isEnabled (  )  const [inline]

bool aedWidget::isLPressed ( void   )  const [inline]

bool aedWidget::isMouseOver ( void   ) 

bool aedWidget::isRPressed ( void   )  const [inline]

bool aedWidget::isVisible ( void   )  const [inline]

void aedWidget::makeAllDirty ( void   )  [private]

bool aedWidget::pollEvent ( SDL_Event *  event  ) 

void aedWidget::processEvent ( SDL_Event *  event  ) 

virtual bool aedWidget::removeWidget ( aedWidget win  )  [virtual]

virtual void aedWidget::render ( void   )  [virtual]

Reimplemented in aedAnimatedImage, aedButton, aedCheckBox, aedDialogBox, aedFrame, aedListBox, aedMenu, aedMenuBar, aedProgressBar, aedScrollBar, aedSlider, aedStaticImage, aedStaticRTF, aedStaticText, aedTextBox, and aedWindow.

void aedWidget::renderAll ( SDL_Surface *  screen = NULL  ) 

void aedWidget::screenToClient ( Uint16 &  x,
Uint16 &  y 
)

void aedWidget::setActiveBorder ( bool  value  )  [inline]

void aedWidget::setAlphaValue ( Uint8  alpha  ) 

void aedWidget::setBGColor ( aedColor  color  )  [inline]

void aedWidget::setBorder ( int  border  )  [inline]

void aedWidget::setBorderColor ( aedColor  color  )  [inline]

virtual void aedWidget::setCaption ( const std::string &  caption  )  [inline, virtual]

Reimplemented in aedButton, aedCheckBox, aedStaticText, and aedWindow.

void aedWidget::setColorKey ( Uint32  color  )  [inline]

void aedWidget::setFakeOffset ( aedRect  fakeOffset  ) 

void aedWidget::setFont ( aedFont font  )  [inline]

void aedWidget::setId ( const std::string &  id  ) 

void aedWidget::setPos ( Sint16  x,
Sint16  y 
)

void aedWidget::setRenderState ( bool  status  )  [inline]

void aedWidget::setSize ( Sint16  w,
Sint16  h 
)

void aedWidget::setSolidRender ( bool  solid  )  [inline]

void aedWidget::setStatic ( bool  value  )  [inline]

void aedWidget::setTheme ( aedTheme Theme  ) 

void aedWidget::setUserData ( void *  userdata  )  [inline]

static void aedWidget::setWidgetDeletedFun ( widget_deleted_callback_t  callback  )  [inline, static]

void aedWidget::show ( void   )  [inline]

bool aedWidget::tabFocus (  )  [private]

bool aedWidget::tabFocusChildren (  )  [private]

void aedWidget::tabFocusParent (  )  [private]

void aedWidget::update (  ) 

void aedWidget::updateAllChildren ( Uint32  msdelta  )  [private]

virtual int aedWidget::wm_gotfocus (  )  [inline, virtual]

virtual int aedWidget::wm_keydown ( aedKeyEvent event  )  [virtual]

Reimplemented in aedButton, and aedTextBox.

virtual int aedWidget::wm_lbuttondown ( Uint16  x,
Uint16  y 
) [virtual]

Reimplemented in aedButton, aedCheckBox, aedMenu, aedMenuBar, aedRadioButtonGroup, aedScrollBar, aedSlider, aedTextBox, and aedWindow.

virtual int aedWidget::wm_lbuttonup ( Uint16  x,
Uint16  y 
) [virtual]

Reimplemented in aedButton, aedScrollBar, aedSlider, aedTextBox, and aedWindow.

virtual int aedWidget::wm_lostfocus (  )  [inline, virtual]

Reimplemented in aedRadioButtonGroup.

virtual int aedWidget::wm_mouseenter (  )  [inline, virtual]

Reimplemented in aedButton, aedCheckBox, and aedMenu.

virtual int aedWidget::wm_mouseleave (  )  [inline, virtual]

Reimplemented in aedButton, aedCheckBox, aedMenu, aedMenuBar, and aedTextBox.

virtual int aedWidget::wm_mousemove ( Uint16  x,
Uint16  y,
Uint16  dx,
Uint16  dy 
) [inline, virtual]

Reimplemented in aedMenu, aedMenuBar, aedTextBox, and aedWindow.

virtual int aedWidget::wm_paint ( SDL_Surface *  screen = NULL,
Uint16  x = 0,
Uint16  y = 0,
Uint16  w = 0,
Uint16  h = 0 
) [virtual]

virtual int aedWidget::wm_rbuttondown ( Uint16  x,
Uint16  y 
) [virtual]

virtual int aedWidget::wm_rbuttonup ( Uint16  x,
Uint16  y 
) [virtual]

virtual int aedWidget::wm_sizechanged ( Uint16  screenWidth,
Uint16  screenHeight 
) [virtual]

virtual int aedWidget::wm_update ( Uint32  msdelta  )  [virtual]

Reimplemented in aedButton, aedListBox, aedScrollBar, aedSlider, aedSpinner, and aedTextBox.


Member Data Documentation

class aedWidget* aedWidget::last [static]

Uint8 aedWidget::m_AlphaValue

aedColor aedWidget::m_BGColor

int aedWidget::m_Border

aedColor aedWidget::m_BorderColor

bool aedWidget::m_CanFocus

std::string aedWidget::m_Caption

ChildContainer aedWidget::m_Children [private]

bool aedWidget::m_ColorKey

Uint32 aedWidget::m_ColorKeyColor

Uint32 aedWidget::m_CurTicks [private]

aedRect aedWidget::m_FakeOffset

Uint8 aedWidget::m_Flags

aedFont* aedWidget::m_Font

bool aedWidget::m_HasActiveBorder

std::string aedWidget::m_Id [private]

bool aedWidget::m_IsEnabled

bool aedWidget::m_isLPressed

bool aedWidget::m_isRPressed

bool aedWidget::m_IsStatic

bool aedWidget::m_IsWidget

Uint32 aedWidget::m_LastTicks [private]

bool aedWidget::m_NeedsReRender [static]

aedWidget* aedWidget::m_Parent [private]

aedRect aedWidget::m_PixelPos

aedRect aedWidget::m_Pos

aedRect aedWidget::m_PositionOffset

bool aedWidget::m_ReRender

Uint16 aedWidget::m_ScreenHeight [private]

Uint16 aedWidget::m_ScreenWidth [private]

bool aedWidget::m_ShowWidget

bool aedWidget::m_SolidRender

SDL_Surface* aedWidget::m_Surface

aedTheme* aedWidget::m_Theme

void* aedWidget::m_userdata [private]

widget_deleted_callback_t aedWidget::m_WidgetDeletedCallback [static]


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 15:33:25 2007 for MetalWarriors by  doxygen 1.4.7