DVX_GUI/dvx/widgets/widgetToolbar.c

36 lines
996 B
C

// widgetToolbar.c — Toolbar widget
#include "widgetInternal.h"
// ============================================================
// wgtToolbar
// ============================================================
WidgetT *wgtToolbar(WidgetT *parent) {
WidgetT *w = widgetAlloc(parent, WidgetToolbarE);
if (w) {
w->padding = wgtPixels(2);
w->spacing = wgtPixels(2);
}
return w;
}
// ============================================================
// widgetToolbarPaint
// ============================================================
void widgetToolbarPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
(void)font;
// Draw raised background and bottom separator
BevelStyleT bevel;
bevel.highlight = colors->windowHighlight;
bevel.shadow = colors->windowShadow;
bevel.face = colors->windowFace;
bevel.width = 1;
drawBevel(d, ops, w->x, w->y, w->w, w->h, &bevel);
}