Xiqual 0.9.1
In file include/lui.h:
typedef struct gadget
Generic gadget.
struct gadget *next
- Next gadget in List
struct gadget *prev
- Previous gadget in List
char*
name
- Optional string for searching
void (*add)(List* inputs, List*
gadgets, struct gadget* )
- Add gadget to lists.
void (*rem)(List* inputs, List*
gadgets, struct gadget* )
- Remove gadget from lists.
void (*destroy)(struct gadget* )
- LUI destructor.
void (*activate)(struct gadget* )
- LUI activation method.
void (*draw)(struct gadget* )
- LUI draw method.
void (*highlight)(struct gadget* )
- LUI highlight method.
void (*ghost)(struct gadget* )
- Ghosting method.
void*
data
- User-definable data.
ulong
id
- Optional identifier.
ulong
type
- Type of gadget.
ulong
flags
- LUI flags.
int w
- Width.
int h
- Height.
int x
- X position in screen.
int y
- Y position in screen.
inputarea* ia
- Main input area.
SDL_Surface*
screen
- Screen.
Documentation
Generic gadget. Every button, checkbox, listview etc.
in LUI has this structure, with its own private data in an extended
part of the structure.
-
struct
gadget *next
- Next gadget in List
struct
gadget *prev
- Previous gadget in List
char*
name
- Optional string for searching
void
(*add)(List* inputs, List*
gadgets, struct gadget* )
- Add gadget to lists. Gadgets which require addition of more
inputareas than the default at creation time use this method.
- Parameters:
- - inputs Pointer to list
of inputareas.
- gadgets Pointer to list of
gadgets.
- gadget This gadget.
void
(*rem)(List* inputs, List*
gadgets, struct gadget* )
- Remove gadget from lists. Gadgets which added more inputareas
than the default at creation time use this method.
- Parameters:
- - inputs Pointer to list
of inputareas.
- gadgets Pointer to list of
gadgets.
- gadget This gadget.
void
(*destroy)(struct gadget* )
- LUI destructor. This frees the gadget and all child gadgets (if
any), along with all their data. The gadget must already have been
removed from any lists before this is called.
void
(*activate)(struct gadget*
)
- LUI activation method. This draws a gadget's active state, and
calls any onactivate() hooks it may have installed.
void
(*draw)(struct gadget* )
- LUI draw method. Used internally by LUI to call upon the
correct method(s) to draw a gadget and also perform any cleanup
related to highlight state, hiding and showing other gadgets etc.
void
(*highlight)(struct gadget*
)
- LUI highlight method. If a gadget has installed a hook for
mouseover actions, it will be called from this. This function is
normally handled from within LUI when the cursor passes over the
related gadget.
void
(*ghost)(struct gadget* )
- Ghosting method. If a gadget has special requirements for
making itself look disabled, this method gets installed here. Used
by gadgets that change size (menus).
void*
data
- User-definable data. This pointer is passed along to
user-defined hooks.
ulong
id
- Optional identifier. Returned by iarea_check(), so you can
check for activation in other ways than a callback hook, or for
other forms of record keeping. Defaults to -1; iarea_check()
returns 0 when a check fails!
ulong
type
- Type of gadget. See lui.h for a list of types.
ulong
flags
- LUI flags. User-readable flags go here. None are implemented
yet.
int
w
- Width. Read-only size of entire gadget.
int
h
- Height. Read-only size of entire gadget.
int
x
- X position in screen. Read-only position of entire gadget.
int
y
- Y position in screen. Read-only size of entire gadget.
inputarea* ia
- Main input area. This may or may not cover the entire surface
of the gadget. Some gadgets create more input areas for
sub-components, and some may even have some of these areas within
its own ia's borders.
SDL_Surface*
screen
- Screen. This is the SDL surface this gadget is drawn on when
its draw() method is called.
- See Also:
- iarea_check()
Alphabetic index
This page was generated with the help of DOC++.