// widgetStatusBar.c — StatusBar widget #include "widgetInternal.h" // ============================================================ // wgtStatusBar // ============================================================ WidgetT *wgtStatusBar(WidgetT *parent) { WidgetT *w = widgetAlloc(parent, WidgetStatusBarE); if (w) { w->padding = wgtPixels(2); w->spacing = wgtPixels(2); } return w; } // ============================================================ // widgetStatusBarPaint // ============================================================ void widgetStatusBarPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) { (void)font; // Draw sunken border around each child for (WidgetT *c = w->firstChild; c; c = c->nextSibling) { if (!c->visible) { continue; } BevelStyleT bevel; bevel.highlight = colors->windowShadow; bevel.shadow = colors->windowHighlight; bevel.face = 0; bevel.width = 1; drawBevel(d, ops, c->x - 1, c->y - 1, c->w + 2, c->h + 2, &bevel); } }