13 #include "../../gfx.h"
15 #if GFX_USE_GWIN && GWIN_NEED_RADIO
17 #include "gwin_class.h"
19 #define GRADIO_TAB_CNR 8
20 #define GRADIO_TOP_FADE 50
21 #define GRADIO_BOTTOM_FADE 25
22 #define GRADIO_OUTLINE_FADE 128
26 GSourceListener * psl;
28 #define pbe ((GEventGWinRadio *)pe)
56 #if GINPUT_NEED_KEYBOARD || GWIN_NEED_KEYBOARD
57 static void RadioKeyboard(
GWidgetObject* gw, GEventKeyboard* pke)
60 if ((pke->keystate & GKEYSTATE_KEYUP))
64 if (pke->c[0] == GKEY_ENTER || pke->c[0] == GKEY_SPACE) {
70 #if GINPUT_NEED_TOGGLE
78 static void RadioToggleAssign(
GWidgetObject *gw, gU16 role, gU16 instance) {
106 #if GINPUT_NEED_KEYBOARD || GWIN_NEED_KEYBOARD
111 #if GINPUT_NEED_TOGGLE
131 if (!(gw = (
GRadioObject *)_gwidgetCreate(g, &gw->w, pInit, &radioVMT)))
134 #if GINPUT_NEED_TOGGLE
135 gw->toggle = GWIDGET_NO_INSTANCE;
185 #define gcw ((GRadioObject *)gw)
191 pcol = getDrawColors(gw);
195 #if GDISP_NEED_CIRCLE
211 _gwidgetDrawFocusCircle(gw, df);
217 #if GWIN_FLAT_STYLING
223 pcol = getDrawColors(gw);
225 #if GWIN_NEED_FLASHING
227 pcol = _gwinGetFlashedColor(gw, pcol, gFalse);
235 _gwidgetDrawFocusRect(gw, 1, 1, gw->
g.
width-2, gw->
g.
height-2);
242 pcol = getDrawColors(gw);
244 #if GWIN_NEED_FLASHING
246 pcol = _gwinGetFlashedColor(gw, pcol, gFalse);
259 _gwidgetDrawFocusRect(gw, 0, 0, gw->
g.
width-1, gw->
g.
height-1);
271 pcol = getDrawColors(gw);
277 for(alpha = 0, i = 0; i < gw->
g.
height; i++, alpha += dalpha)
285 _gwidgetDrawFocusRect(gw, 0, 0, gw->
g.
width-1, gw->
g.
height-1);
296 pcol = getDrawColors(gw);
309 for(alpha = 0, i = 0; i < gw->
g.
height; i++, alpha += dalpha)
316 _gwidgetDrawFocusRect(gw, 0, 0, gw->
g.
width-1, gw->
g.
height-1);
COLOR_TYPE gColor
The color type definition.
gColor gdispBlendColor(gColor fg, gColor bg, gU8 alpha)
Blend 2 colors according to the alpha.
void gdispGFillCircle(GDisplay *g, gCoord x, gCoord y, gCoord radius, gColor color)
Draw a filled circle.
void gdispGDrawStringBox(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, const char *str, gFont font, gColor color, gJustify justify)
Draw a text string vertically centered within the specified box.
void gdispGDrawCircle(GDisplay *g, gCoord x, gCoord y, gCoord radius, gColor color)
Draw a circle.
void gdispGFillArea(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gColor color)
Fill an area with a color.
void gdispGDrawLine(GDisplay *g, gCoord x0, gCoord y0, gCoord x1, gCoord y1, gColor color)
Draw a line.
void gdispGFillStringBox(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, const char *str, gFont font, gColor color, gColor bgColor, gJustify justify)
Draw a text string vertically centered within the specified box. The box background is filled with th...
gI16 gCoord
The type for a coordinate or length on the screen.
void gdispGDrawBox(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gColor color)
Draw a rectangular box.
GEvent * geventGetEventBuffer(GSourceListener *psl)
Get the event buffer from the GSourceListener.
void geventSendEvent(GSourceListener *psl)
Called by a source to indicate the listener's event buffer has been filled.
GSourceListener * geventGetSourceListener(GSourceHandle gsh, GSourceListener *lastlr)
Called by a source with a possible event to get a listener record.
gI32 fixed
The type for a fixed point type.
#define FIXED(x)
Macros to convert to and from a fixed point.
void gwinSetVisible(GHandle gh, gBool visible)
Sets whether a window is visible or not.
GHandle gwinGetNextWindow(GHandle gh)
Get the next window in the z-order.
The radio button widget structure.
A window object structure.
const struct gwinVMT * vmt
The Virtual Method Table for a GWIN window.