SDLGradientWidget(3)

NAME
SDLGradientWidget - Base class for widgets with gradients.

SYNOPSIS

#include <sdlgradientwidget.h>

Inherits SDLWidgetDnD.

Inherited by SDLButtonGroup, SDLLineEdit, SDLProgressBar, SDLRadioButton, SDLScrollBar, SDLWidgetList, and SDLWindow.

  Public Methods
SDLGradientWidget (SDLWidget* parent, SDL_Rect& r)
~SDLGradientWidget ()
void LoadThemeStyle (const char* widgettype)
Load a style from the theme definition.
void LoadThemeStyle (const char* widgettype, const char* objectname)
Load a style from the theme definition.
bool SetBackground (const char* filename, int mode=BKMODE_TILE)
Load the background image from a file.
bool SetBackground (SDL_Surface* surface, int mode=BKMODE_TILE)
Define a surface as background image (will not be freed).
void SetBackgroundBlend (Uint8 backblend)
Defines the blend-level"ofgradient&background."
void SetGradient (SDL_Gradient& grad)
Set the background gradient.

  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.

AUTHOR

Generated automatically by Doxygen for ParaGUI from the source code.