Xiqual 0.9.1

In file include/lui.h:

typedef struct gadget

Generic gadget.

[more]struct gadget *next
Next gadget in List
[more]struct gadget *prev
Previous gadget in List
[more]char* name
Optional string for searching
[more]void (*add)(List* inputs, List* gadgets, struct gadget* )
Add gadget to lists.
[more]void (*rem)(List* inputs, List* gadgets, struct gadget* )
Remove gadget from lists.
[more]void (*destroy)(struct gadget* )
LUI destructor.
[more]void (*activate)(struct gadget* )
LUI activation method.
[more]void (*draw)(struct gadget* )
LUI draw method.
[more]void (*highlight)(struct gadget* )
LUI highlight method.
[more]void (*ghost)(struct gadget* )
Ghosting method.
[more]void* data
User-definable data.
[more]ulong id
Optional identifier.
[more]ulong type
Type of gadget.
[more]ulong flags
LUI flags.
[more]int w
Width.
[more]int h
Height.
[more]int x
X position in screen.
[more]int y
Y position in screen.
[more]inputarea* ia
Main input area.
[more]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.
ostruct gadget *next
Next gadget in List

ostruct gadget *prev
Previous gadget in List

ochar* name
Optional string for searching

ovoid (*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.

ovoid (*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.

ovoid (*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.

ovoid (*activate)(struct gadget* )
LUI activation method. This draws a gadget's active state, and calls any onactivate() hooks it may have installed.

ovoid (*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.

ovoid (*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.

ovoid (*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).

ovoid* data
User-definable data. This pointer is passed along to user-defined hooks.

oulong 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!

oulong type
Type of gadget. See lui.h for a list of types.

oulong flags
LUI flags. User-readable flags go here. None are implemented yet.

oint w
Width. Read-only size of entire gadget.

oint h
Height. Read-only size of entire gadget.

oint x
X position in screen. Read-only position of entire gadget.

oint y
Y position in screen. Read-only size of entire gadget.

oinputarea* 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.

oSDL_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++.