34 |
#ifndef PG_BUTTON_H |
#ifndef PG_BUTTON_H |
35 |
#define PG_BUTTON_H |
#define PG_BUTTON_H |
36 |
|
|
|
#ifdef SWIG |
|
|
%include "swigcommon.h" |
|
|
%module pgbutton |
|
|
%{ |
|
|
#include "pgbutton.h" |
|
|
%} |
|
|
#endif |
|
|
|
|
37 |
#include "pgwidget.h" |
#include "pgwidget.h" |
38 |
#include "pgsignals.h" |
#include "pgsignals.h" |
39 |
|
#include "pgdraw.h" |
40 |
#include <string> |
#include <string> |
41 |
|
|
42 |
/** |
/** |
164 |
/** */ |
/** */ |
165 |
void LoadThemeStyle(const char* widgettype); |
void LoadThemeStyle(const char* widgettype); |
166 |
|
|
|
#ifndef SWIG |
|
167 |
/** */ |
/** */ |
168 |
void LoadThemeStyle(const char* widgettype, const char* objectname); |
void LoadThemeStyle(const char* widgettype, const char* objectname); |
|
#endif |
|
169 |
|
|
170 |
/** |
/** |
171 |
Set the gradient. |
Set the gradient. |
197 |
Set icons for the button |
Set icons for the button |
198 |
@param filenameup icon for unpressed state |
@param filenameup icon for unpressed state |
199 |
@param filenamedown icon for pressed state |
@param filenamedown icon for pressed state |
200 |
|
@param filenameover icon for highlited state |
201 |
@return true on success |
@return true on success |
202 |
*/ |
*/ |
203 |
|
bool SetIcon(const char* filenameup=NULL, const char* filenamedown=NULL, const char* filenameover = NULL); |
204 |
|
|
205 |
// new in 1.0.2 (file) |
/** |
206 |
|
Set icons for the button |
207 |
bool SetIcon2(const char* filenameup, const char* filenamedown, const char* filenameover, const PG_Color& colorkey); |
@param filenameup icon for unpressed state |
208 |
|
@param filenamedown icon for pressed state |
209 |
bool SetIcon2(const char* filenameup, const char* filenamedown, const char* filenameover); |
@param filenameover icon for highlited state |
210 |
|
@param colorkey |
211 |
|
@return true on success |
212 |
// 1.0.1 versions (file) |
*/ |
213 |
|
bool SetIcon(const char* filenameup, const char* filenamedown, const char* filenameover, const PG_Color& colorkey); |
|
bool SetIcon(const char* filenameup, const char* filenamedown = NULL); |
|
|
|
|
|
bool SetIcon(const char* filenameup, const char* filenamedown, const PG_Color& colorkey); |
|
|
|
|
214 |
|
|
|
// new in 1.0.2 (surface) |
|
|
|
|
215 |
bool SetIcon(SDL_Surface* icon_up, SDL_Surface* icon_down = NULL, SDL_Surface* icon_over = NULL); |
bool SetIcon(SDL_Surface* icon_up, SDL_Surface* icon_down = NULL, SDL_Surface* icon_over = NULL); |
216 |
|
|
217 |
// 1.0.1 versions (surface) |
SDL_Surface* GetIcon(STATE num); |
|
#ifndef SWIG |
|
|
bool SetIcon(SDL_Surface* icon_up, SDL_Surface* icon_down = NULL); |
|
|
#endif |
|
|
|
|
|
SDL_Surface* GetIcon(STATE num); |
|
218 |
|
|
219 |
/** |
/** |
220 |
Set the bordersize of the button |
Set the bordersize of the button |
287 |
|
|
288 |
private: |
private: |
289 |
|
|
|
#ifndef SWIG |
|
|
|
|
290 |
PG_Button(const PG_Button&); |
PG_Button(const PG_Button&); |
291 |
PG_Button& operator=(const PG_Button&); |
PG_Button& operator=(const PG_Button&); |
|
#endif |
|
292 |
|
|
293 |
/** */ |
/** */ |
294 |
void FreeSurfaces(); |
void FreeSurfaces(); |