46 scrollbar = &(
object->u.scrollbar);
49 if(scrollbar->
pos > scrollbar->
max) {
50 scrollbar->
pos = scrollbar->
max;
51 }
else if(scrollbar->
onScroll != NULL) {
68 scrollbar = &(
object->u.scrollbar);
71 if(scrollbar->
pos < scrollbar->
min) {
72 scrollbar->
pos = scrollbar->
min;
73 }
else if(scrollbar->
onScroll != NULL) {
119 int min,
int max,
int len,
int start,
129 object->id = screen->
curId++;
132 scrollbar = &(
object->u.scrollbar);
136 switch(orientation) {
250 scrollbar = &(
object->u.scrollbar);
252 return scrollbar->
pos;
278 scrollbar = &(
object->u.scrollbar);
282 scrollbar->
len = len;
283 scrollbar->
pos = start;
Scalar min(Scalar x, Scalar y)
Scalar max(Scalar x, Scalar y)
static void onPush(tCmdInfo *cmdInfo)
int GfuiScrollBarCreate(void *scr, int x, int y, int align, int width, int orientation, int min, int max, int len, int start, void *userData, tfuiSBCallback onScroll)
Create a new scroll bar.
void GfuiScrollBarPosSet(void *scr, int id, int min, int max, int len, int start)
Set new values for position.
int GfuiGrButtonCreateAction(void *scr, const char *disabled, const char *enabled, const char *focused, const char *pushed, int x, int y, int align, int mouse, const tGfuiAction &onPush, const tGfuiAction &onFocus, const tGfuiAction &onFocusLost)
Add a graphical button to a screen.
int GfuiScrollBarPosGet(void *scr, int id)
Get the current position of a scroll bar.
void gfuiAddObject(tGfuiScreen *screen, tGfuiObject *object)
struct GfuiObject tGfuiObject
tGfuiObject * gfuiGetObject(void *scr, int id)
#define GFUI_FOCUS_MOUSE_CLICK
The Gaming Framework API (client part).
struct ScrollBarInfo tScrollBarInfo
Scroll bar call-back information.
#define GFUI_HORI_SCROLLBAR
std::function< void()> tGfuiAction
void(* tfuiSBCallback)(tScrollBarInfo *)
#define GFUI_VERT_SCROLLBAR