13 #include "../../gfx.h"
15 #if GFX_USE_GWIN && GWIN_NEED_LABEL
17 #include "gwin_class.h"
20 #define gh2obj ((GLabelObject *)gh)
21 #define gw2obj ((GLabelObject *)gw)
39 #if GINPUT_NEED_KEYBOARD || GWIN_NEED_KEYBOARD
44 #if GINPUT_NEED_TOGGLE
72 if (!(widget = (GLabelObject *)_gwidgetCreate(g, &widget->w, pInit, &labelVMT)))
75 #if GWIN_LABEL_ATTRIBUTE
96 #if GWIN_LABEL_ATTRIBUTE
COLOR_TYPE gColor
The color type definition.
gCoord gdispGetFontMetric(gFont font, gFontmetric metric)
Get a metric of a font.
gJustify
Type for the text justification.
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.
gCoord gdispGetStringWidth(const char *str, gFont font)
Get the pixel width of an entire string.
void gdispGDrawBox(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gColor color)
Draw a rectangular box.
#define GWIN_LABEL_ATTRIBUTE
Enable the API to use attributes in the label widget.
GHandle gwinGLabelCreate(GDisplay *g, GLabelObject *widget, GWidgetInit *pInit)
Create a label widget.
#define GLABEL_FLG_BORDER
The internal label flags.
void gwinLabelSetAttribute(GHandle gh, gCoord tab, const char *attr)
Add an text attribute in front of the normal label text.
void gwinLabelSetBorder(GHandle gh, gBool border)
Border settings for the default rendering routine.
void gwinLabelDrawJustifiedLeft(GWidgetObject *gw, void *param)
Renders a label with the text left jestified.
void gwinLabelDrawJustified(GWidgetObject *gw, void *param)
Renders a label with the text justified based on the parameter.
void gwinLabelDrawJustifiedCenter(GWidgetObject *gw, void *param)
Renders a label with the text center jestified.
void gwinLabelDrawJustifiedRight(GWidgetObject *gw, void *param)
Renders a label with the text right jestified.
gFont gwinGetDefaultFont(void)
Get the current default font.
void gwinRedraw(GHandle gh)
Redraw a window.
void gwinSetVisible(GHandle gh, gBool visible)
Sets whether a window is visible or not.
A window object structure.
const struct gwinVMT * vmt
The Virtual Method Table for a GWIN window.