13 #include "../../gfx.h"
15 #if GFX_USE_GWIN && GWIN_NEED_CONTAINERS
17 #include "gwin_class.h"
19 void _gcontainerInit(
void)
23 void _gcontainerDeinit(
void)
31 pgc->
g.
flags |= GWIN_FLG_CONTAINER;
36 void _gcontainerDestroy(
GHandle gh) {
48 if (child->parent == gh)
57 if (child->parent == gh)
63 if (!(gh->
flags & GWIN_FLG_CONTAINER))
69 if (!(gh->
flags & GWIN_FLG_CONTAINER))
86 #if GFX_USE_GWIN && GWIN_NEED_CONTAINER
88 #if GWIN_CONTAINER_BORDER != GWIN_FIRST_CONTROL_FLAG
89 #error "GWIN Container: - Flag definitions don't match"
92 #define BORDER_WIDTH 2
107 #if GINPUT_NEED_MOUSE
112 #if GINPUT_NEED_KEYBOARD || GWIN_NEED_KEYBOARD
117 #if GINPUT_NEED_TOGGLE
137 if (!(gc = (
GContainerObject *)_gcontainerCreate(g, gc, pInit, &containerVMT)))
170 #define gi ((gImage *)param)
171 gCoord x, y, iw, ih, mx, my;
188 for(ih=gi->height; y < my; y += ih) {
194 for(iw=gi->width; x < mx; x += iw) {
GHandle gwinGContainerCreate(GDisplay *g, GContainerObject *gw, const GWidgetInit *pInit, gU32 flags)
Create a simple container.
#define GWIN_CONTAINER_BORDER
Flags for gwinContainerCreate()
gCoord gwinGetInnerHeight(GHandle gh)
Get the inner height of a container window.
GWidgetObject GContainerObject
The GWIN Container structure.
GHandle gwinGetFirstChild(GHandle gh)
Get the first child window.
GHandle gwinGetSibling(GHandle gh)
Get the next child window in the z-order.
gCoord gwinGetInnerWidth(GHandle gh)
Get the inner width of a container window.
void gdispGFillArea(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gColor color)
Fill an area with a color.
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.
gdispImageError gdispGImageDraw(GDisplay *g, gImage *img, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord sx, gCoord sy)
Draw the image.
void gwinContainerDraw_Transparent(GWidgetObject *gw, void *param)
Renders the container but leaves the client area transparent.
void gwinContainerDraw_Image(GWidgetObject *gw, void *param)
Renders the container and uses the specified image for the client area.
void gwinContainerDraw_Std(GWidgetObject *gw, void *param)
The default rendering function for the container widget.
void gwinDestroy(GHandle gh)
Destroy a window (of any type). Releases any dynamically allocated memory.
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.
A window object structure.
const struct gwinVMT * vmt
The Virtual Method Table for a container.
The Virtual Method Table for a GWIN window.