dblbuffer.cpp, and paratest.cpp.
Public Types | |
enum | { OK = 0x80000001, YES = 0x80000002, NO = 0x80000003, APPLY = 0x80000004, CANCEL = 0x80000005, CLOSE = 0x80000006, HELP = 0x80000007 } |
Standard button IDs. More... | |
enum | STATE { PRESSED, UNPRESSED, HIGHLITED } |
Button states. More... | |
Public Member Functions | |
PG_Button (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, const char *text=NULL, int id=-1, const char *style="Button") | |
Constructor for the PG_Button class. | |
virtual | ~PG_Button () |
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. | |
void | SetGradient (STATE state, const PG_Gradient &gradient) |
Set the gradient. | |
void | SetBackground (STATE state, SDL_Surface *background, int mode=BKMODE_TILE) |
Set the background. | |
void | SetBorderColor (int b, const PG_Color &color) |
Set the color of the border. | |
bool | SetIcon (const char *filenameup=NULL, const char *filenamedown=NULL, const char *filenameover=NULL) |
Set icons for the button. | |
bool | SetIcon (const char *filenameup, const char *filenamedown, const char *filenameover, const PG_Color &colorkey) |
Set icons for the button. | |
bool | SetIcon (SDL_Surface *icon_up, SDL_Surface *icon_down=NULL, SDL_Surface *icon_over=NULL) |
SDL_Surface * | GetIcon (STATE num) |
void | SetBorderSize (int norm, int pressed, int high) |
Set the bordersize of the button. | |
void | SetToggle (bool bToggle) |
void | SetPressed (bool pressed) |
void | SetTransparency (Uint8 t, bool bRecursive=false) |
Set the transparency of the drawing object. | |
void | SetTransparency (Uint8 norm, Uint8 pressed, Uint8 high) |
void | SetShift (int pixelshift) |
Set the moving distance of the image when we press on it. | |
bool | GetPressed () |
void | SetBlendLevel (STATE mode, Uint8 blend) |
Set the blend-level of gradient and background image. | |
Uint8 | GetBlendLevel (STATE mode) |
Get the current blend level. | |
Public Attributes | |
SignalButtonClick | sigClick |
Protected Member Functions | |
virtual void | eventButtonSurface (SDL_Surface **surface, STATE newstate, Uint16 w, Uint16 h) |
void | eventBlit (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst) |
overridable eventhandler to blit the widget contents to the screen | |
void | eventSizeWidget (Uint16 w, Uint16 h) |
Callback for the SizeWidget event. | |
void | eventMouseLeave () |
eventhandler for mouse movements. | |
void | eventMouseEnter () |
eventhandler for mouse movements. | |
bool | eventMouseButtonUp (const SDL_MouseButtonEvent *button) |
Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
bool | eventMouseButtonDown (const SDL_MouseButtonEvent *button) |
Overridable Eventhandler for a SDL_MouseButtonEvent message. |
|
Standard button IDs.
|
|
Button states.
|
|
Constructor for the PG_Button class.
|
|
|
|
overridable eventhandler to blit the widget contents to the screen
Reimplemented from PG_Widget. |
|
|
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. |
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is released. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. |
|
eventhandler for mouse movements. This overrideable handler is called everytime the mouse cursor is entering the widget area. Reimplemented from PG_Widget. |
|
eventhandler for mouse movements. This overrideable handler is called everytime the mouse cursor is leaving the widget area. Reimplemented from PG_Widget. |
|
Callback for the SizeWidget event.
Reimplemented from PG_Widget. |
|
Get the current blend level.
|
|
|
|
|
|
Load a style from the theme definition.
Reimplemented from PG_Widget. |
|
Load a style from the theme definition.
Reimplemented from PG_Widget. |
|
Set the background.
|
|
Set the blend-level of gradient and background image.
|
|
Set the color of the border.
|
|
Set the bordersize of the button.
|
|
Set the gradient.
|
|
|
|
Set icons for the button.
|
|
Set icons for the button.
|
|
|
|
Set the moving distance of the image when we press on it.
|
|
|
|
|
|
Set the transparency of the drawing object.
Reimplemented from PG_Widget. |
|
|