Main Page Class Hierarchy Compound List File List Compound Members File Members Related Pages Examples

# SDLButton Class Reference

Button that uses gradients, all else derived from SDLUserButton. More...

`#include <sdlbutton.h>`

Inheritance diagram for SDLButton

[legend]
Collaboration diagram for SDLButton:

[legend]
List of all members.

## Public Methods
| SDLButton (SDLWidget* parent, int id, SDL_Rect& r, char* text = NULL)
virtual | ~SDLButton ()
void | LoadThemeStyle (const char* widgettype)
| Load a style from the theme definition. More...
void | LoadThemeStyle (const char* widgettype, const char* objectname)
| Load a style from the theme definition. More...
void | SetGradient (int state, SDL_Gradient& gradient)
void | SetBackground (int state, SDL_Surface* background, int mode = BKMODE_TILE)
## Protected Methods
void | OnButtonSurface (SDL_Surface** surface, int newstate, int w, int h)

## Detailed Description

Button that uses gradients, all else derived from SDLUserButton.

Author(s):
  Alexander Pipelka

This should be integrated with SDLUserButton once the themeing engine is implemented, this is very unclear at the moment.

Examples:

  tut2.cpp, tut3.cpp, and tut4.cpp.

Definition at line 155 of file sdlbutton.h.

## Constructor & Destructor Documentation

SDLButton::SDLButton ( | SDLWidget * parent,
| int id,
| SDL_Rect & r,
| char * text = NULL )

SDLButton::~SDLButton ( | )`[virtual]`

## Member Function Documentation

void SDLButton::LoadThemeStyle ( | const char * widgettype,
| const char * objectname )`[virtual]`

  | Load a style from the theme definition. Parameters:
  widgettype | name of the widgettype
  objectname | name of the object
Loads the defined style of a given widgettype and objectname. Reimplemented from SDLWidget.

void SDLButton::LoadThemeStyle ( | const char * widgettype )`[virtual]`

  | Load a style from the theme definition. Parameters:
  widgettype | name of the widgettype
  objectname | name of the object
Loads the defined style for a given widgettype Reimplemented from SDLWidget.

void SDLButton::OnButtonSurface ( | SDL_Surface ** surface,
| int newstate,
| int w,
| int h )`[protected, virtual]`

| Reimplemented from SDLUserButton.

void SDLButton::SetBackground ( | int state,
| SDL_Surface * background,
| int mode = BKMODE_TILE )

void SDLButton::SetGradient ( | int state,
| SDL_Gradient & gradient )

The documentation for this class was generated from the following file:

- sdlbutton.h