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

# SDLGradientWidget Class Reference

Base class for widgets with gradients. More...

`#include <sdlgradientwidget.h>`

Inheritance diagram for SDLGradientWidget

[legend]
Collaboration diagram for SDLGradientWidget:

[legend]
List of all members.

## Public Methods
| SDLGradientWidget (SDLWidget* parent, SDL_Rect& r)
| ~SDLGradientWidget ()
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...
bool | SetBackground (const char* filename, int mode=BKMODE_TILE)
| Load the background image from a file. More...
bool | SetBackground (SDL_Surface* surface, int mode=BKMODE_TILE)
| Define a surface as background image (will not be freed). More...
void | SetBackgroundBlend (Uint8 backblend)
| Defines the "blend-level" of gradient & background. More...
void | SetGradient (SDL_Gradient& grad)
| Set the background gradient. More...
## Protected Methods
void | eventDraw (SDL_Surface* surface, SDL_Rect* rect)
## Protected Attributes
SDL_Gradient | my_gradient
SDL_Surface* | my_background
Uint8 | my_blendLevel
bool | my_backgroundFree
int | my_backgroundMode
int | my_bordersize

## Detailed Description

Base class for widgets with gradients.

Author(s):
  Alexander Pipelka

Objects that want to be pretty derive from this.

Examples:

  tut4.cpp.

Definition at line 50 of file sdlgradientwidget.h.

## Constructor & Destructor Documentation

SDLGradientWidget::SDLGradientWidget ( | SDLWidget * parent,
| SDL_Rect & r )

SDLGradientWidget::~SDLGradientWidget ( | )

## Member Function Documentation

void SDLGradientWidget::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. Reimplemented in SDLLineEdit.

void SDLGradientWidget::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. Reimplemented in SDLLineEdit, SDLProgressBar, SDLRadioButton, SDLScrollBar, SDLSlider, and SDLWindow.

bool SDLGradientWidget::SetBackground ( | SDL_Surface * surface,
| int mode = BKMODE_TILE )

| Define a surface as background image (will not be freed).

bool SDLGradientWidget::SetBackground ( | const char * filename,
| int mode = BKMODE_TILE )

| Load the background image from a file.

void SDLGradientWidget::SetBackgroundBlend ( | Uint8 backblend )

| Defines the "blend-level" of gradient & background.

void SDLGradientWidget::SetGradient ( | SDL_Gradient & grad )

| Set the background gradient.

void SDLGradientWidget::eventDraw ( | SDL_Surface * surface,
| SDL_Rect * rect )`[protected, virtual]`

| Reimplemented from SDLDrawObject. Reimplemented in SDLLineEdit, SDLProgressBar, and SDLWindow. Examples: tut4.cpp.

## Member Data Documentation

SDL_Surface * SDLGradientWidget::my_background`[protected]`

| Definition at line 91 of file sdlgradientwidget.h.

bool SDLGradientWidget::my_backgroundFree`[protected]`

| Definition at line 94 of file sdlgradientwidget.h.

int SDLGradientWidget::my_backgroundMode`[protected]`

| Definition at line 95 of file sdlgradientwidget.h.

Uint8 SDLGradientWidget::my_blendLevel`[protected]`

| Definition at line 93 of file sdlgradientwidget.h.

int SDLGradientWidget::my_bordersize`[protected]`

| Definition at line 96 of file sdlgradientwidget.h.

SDL_Gradient SDLGradientWidget::my_gradient`[protected]`

| Definition at line 90 of file sdlgradientwidget.h.

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

- sdlgradientwidget.h