Reformatted wrapped lines of code.
This commit is contained in:
parent
90c6ab68e3
commit
10b49868cd
27 changed files with 73 additions and 159 deletions
16
dvx/dvxApp.c
16
dvx/dvxApp.c
|
|
@ -316,11 +316,7 @@ static void dispatchEvents(AppContextT *ctx) {
|
|||
static void drawCursorAt(AppContextT *ctx, int32_t x, int32_t y) {
|
||||
const CursorT *cur = &ctx->cursors[ctx->cursorId];
|
||||
|
||||
drawMaskedBitmap(&ctx->display, &ctx->blitOps,
|
||||
x - cur->hotX, y - cur->hotY,
|
||||
cur->width, cur->height,
|
||||
cur->andMask, cur->xorData,
|
||||
ctx->cursorFg, ctx->cursorBg);
|
||||
drawMaskedBitmap(&ctx->display, &ctx->blitOps, x - cur->hotX, y - cur->hotY, cur->width, cur->height, cur->andMask, cur->xorData, ctx->cursorFg, ctx->cursorBg);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -328,11 +324,8 @@ static void drawCursorAt(AppContextT *ctx, int32_t x, int32_t y) {
|
|||
// dvxCreateWindow
|
||||
// ============================================================
|
||||
|
||||
WindowT *dvxCreateWindow(AppContextT *ctx, const char *title,
|
||||
int32_t x, int32_t y, int32_t w, int32_t h,
|
||||
bool resizable) {
|
||||
WindowT *win = wmCreateWindow(&ctx->stack, &ctx->display,
|
||||
title, x, y, w, h, resizable);
|
||||
WindowT *dvxCreateWindow(AppContextT *ctx, const char *title, int32_t x, int32_t y, int32_t w, int32_t h, bool resizable) {
|
||||
WindowT *win = wmCreateWindow(&ctx->stack, &ctx->display, title, x, y, w, h, resizable);
|
||||
|
||||
if (win) {
|
||||
// Raise and focus
|
||||
|
|
@ -451,8 +444,7 @@ int32_t dvxInit(AppContextT *ctx, int32_t requestedW, int32_t requestedH, int32_
|
|||
// dvxInvalidateRect
|
||||
// ============================================================
|
||||
|
||||
void dvxInvalidateRect(AppContextT *ctx, WindowT *win,
|
||||
int32_t x, int32_t y, int32_t w, int32_t h) {
|
||||
void dvxInvalidateRect(AppContextT *ctx, WindowT *win, int32_t x, int32_t y, int32_t w, int32_t h) {
|
||||
// Convert from content-relative to screen coordinates
|
||||
int32_t screenX = win->x + win->contentX + x;
|
||||
int32_t screenY = win->y + win->contentY + y;
|
||||
|
|
|
|||
|
|
@ -61,8 +61,7 @@ WindowT *dvxCreateWindow(AppContextT *ctx, const char *title,
|
|||
void dvxDestroyWindow(AppContextT *ctx, WindowT *win);
|
||||
|
||||
// Invalidate a region of a window's content area (triggers repaint)
|
||||
void dvxInvalidateRect(AppContextT *ctx, WindowT *win,
|
||||
int32_t x, int32_t y, int32_t w, int32_t h);
|
||||
void dvxInvalidateRect(AppContextT *ctx, WindowT *win, int32_t x, int32_t y, int32_t w, int32_t h);
|
||||
|
||||
// Invalidate entire window content
|
||||
void dvxInvalidateWindow(AppContextT *ctx, WindowT *win);
|
||||
|
|
|
|||
|
|
@ -11,31 +11,23 @@ void drawInit(BlitOpsT *ops, const DisplayT *d);
|
|||
void rectFill(DisplayT *d, const BlitOpsT *ops, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color);
|
||||
|
||||
// Copy rectangle from source buffer to backbuffer (clips to display clip rect)
|
||||
void rectCopy(DisplayT *d, const BlitOpsT *ops, int32_t dstX, int32_t dstY,
|
||||
const uint8_t *srcBuf, int32_t srcPitch, int32_t srcX, int32_t srcY,
|
||||
int32_t w, int32_t h);
|
||||
void rectCopy(DisplayT *d, const BlitOpsT *ops, int32_t dstX, int32_t dstY, const uint8_t *srcBuf, int32_t srcPitch, int32_t srcX, int32_t srcY, int32_t w, int32_t h);
|
||||
|
||||
// Draw a beveled frame
|
||||
void drawBevel(DisplayT *d, const BlitOpsT *ops, int32_t x, int32_t y, int32_t w, int32_t h,
|
||||
const BevelStyleT *style);
|
||||
void drawBevel(DisplayT *d, const BlitOpsT *ops, int32_t x, int32_t y, int32_t w, int32_t h, const BevelStyleT *style);
|
||||
|
||||
// Draw a single character, returns advance width
|
||||
int32_t drawChar(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font,
|
||||
int32_t x, int32_t y, char ch, uint32_t fg, uint32_t bg, bool opaque);
|
||||
int32_t drawChar(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, int32_t x, int32_t y, char ch, uint32_t fg, uint32_t bg, bool opaque);
|
||||
|
||||
// Draw a null-terminated string
|
||||
void drawText(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font,
|
||||
int32_t x, int32_t y, const char *text, uint32_t fg, uint32_t bg, bool opaque);
|
||||
void drawText(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, int32_t x, int32_t y, const char *text, uint32_t fg, uint32_t bg, bool opaque);
|
||||
|
||||
// Measure text width in pixels
|
||||
int32_t textWidth(const BitmapFontT *font, const char *text);
|
||||
|
||||
// Draw a 1-bit bitmap with mask (for cursors, icons)
|
||||
// andMask/xorData are arrays of uint16_t, one per row
|
||||
void drawMaskedBitmap(DisplayT *d, const BlitOpsT *ops,
|
||||
int32_t x, int32_t y, int32_t w, int32_t h,
|
||||
const uint16_t *andMask, const uint16_t *xorData,
|
||||
uint32_t fgColor, uint32_t bgColor);
|
||||
void drawMaskedBitmap(DisplayT *d, const BlitOpsT *ops, int32_t x, int32_t y, int32_t w, int32_t h, const uint16_t *andMask, const uint16_t *xorData, uint32_t fgColor, uint32_t bgColor);
|
||||
|
||||
// Horizontal line
|
||||
void drawHLine(DisplayT *d, const BlitOpsT *ops, int32_t x, int32_t y, int32_t w, uint32_t color);
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@ static int32_t setVesaMode(uint16_t mode);
|
|||
// findBestMode
|
||||
// ============================================================
|
||||
|
||||
static int32_t findBestMode(int32_t requestedW, int32_t requestedH, int32_t preferredBpp,
|
||||
uint16_t *outMode, DisplayT *d) {
|
||||
static int32_t findBestMode(int32_t requestedW, int32_t requestedH, int32_t preferredBpp, uint16_t *outMode, DisplayT *d) {
|
||||
__dpmi_regs r;
|
||||
uint16_t bestMode = 0;
|
||||
int32_t bestScore = -1;
|
||||
|
|
@ -119,8 +118,7 @@ static int32_t findBestMode(int32_t requestedW, int32_t requestedH, int32_t pref
|
|||
// getModeInfo
|
||||
// ============================================================
|
||||
|
||||
static void getModeInfo(uint16_t mode, DisplayT *d, int32_t *score,
|
||||
int32_t requestedW, int32_t requestedH, int32_t preferredBpp) {
|
||||
static void getModeInfo(uint16_t mode, DisplayT *d, int32_t *score, int32_t requestedW, int32_t requestedH, int32_t preferredBpp) {
|
||||
__dpmi_regs r;
|
||||
|
||||
*score = -1;
|
||||
|
|
|
|||
|
|
@ -461,11 +461,9 @@ void wgtSetDebugLayout(bool enabled);
|
|||
int32_t wgtResolveSize(int32_t taggedSize, int32_t parentSize, int32_t charWidth);
|
||||
|
||||
// Run layout on the entire widget tree
|
||||
void wgtLayout(WidgetT *root, int32_t availW, int32_t availH,
|
||||
const BitmapFontT *font);
|
||||
void wgtLayout(WidgetT *root, int32_t availW, int32_t availH, const BitmapFontT *font);
|
||||
|
||||
// Paint the entire widget tree
|
||||
void wgtPaint(WidgetT *root, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors);
|
||||
void wgtPaint(WidgetT *root, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors);
|
||||
|
||||
#endif // DVX_WIDGET_H
|
||||
|
|
|
|||
75
dvx/dvxWm.c
75
dvx/dvxWm.c
|
|
@ -15,23 +15,14 @@
|
|||
// ============================================================
|
||||
|
||||
static void computeMenuBarPositions(WindowT *win, const BitmapFontT *font);
|
||||
static void drawBorderFrame(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
int32_t x, int32_t y, int32_t w, int32_t h);
|
||||
static void drawMenuBar(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font,
|
||||
const ColorSchemeT *colors, WindowT *win);
|
||||
static void drawResizeBreaks(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
WindowT *win);
|
||||
static void drawScaledRect(DisplayT *d, int32_t dstX, int32_t dstY, int32_t dstW, int32_t dstH,
|
||||
const uint8_t *src, int32_t srcW, int32_t srcH, int32_t srcPitch,
|
||||
int32_t bpp);
|
||||
static void drawScrollbar(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
const ScrollbarT *sb, int32_t winX, int32_t winY);
|
||||
static void drawScrollbarArrow(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
int32_t x, int32_t y, int32_t size, int32_t dir);
|
||||
static void drawTitleBar(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font,
|
||||
const ColorSchemeT *colors, WindowT *win);
|
||||
static void drawTitleGadget(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
int32_t x, int32_t y, int32_t size);
|
||||
static void drawBorderFrame(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, int32_t x, int32_t y, int32_t w, int32_t h);
|
||||
static void drawMenuBar(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors, WindowT *win);
|
||||
static void drawResizeBreaks(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, WindowT *win);
|
||||
static void drawScaledRect(DisplayT *d, int32_t dstX, int32_t dstY, int32_t dstW, int32_t dstH, const uint8_t *src, int32_t srcW, int32_t srcH, int32_t srcPitch, int32_t bpp);
|
||||
static void drawScrollbar(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, const ScrollbarT *sb, int32_t winX, int32_t winY);
|
||||
static void drawScrollbarArrow(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, int32_t x, int32_t y, int32_t size, int32_t dir);
|
||||
static void drawTitleBar(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors, WindowT *win);
|
||||
static void drawTitleGadget(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, int32_t x, int32_t y, int32_t size);
|
||||
static void minimizedIconPos(const DisplayT *d, int32_t index, int32_t *x, int32_t *y);
|
||||
static int32_t scrollbarThumbInfo(const ScrollbarT *sb, int32_t *thumbPos, int32_t *thumbSize);
|
||||
static void wmMinWindowSize(const WindowT *win, int32_t *minW, int32_t *minH);
|
||||
|
|
@ -69,8 +60,7 @@ static void computeMenuBarPositions(WindowT *win, const BitmapFontT *font) {
|
|||
// Top/Left, outside to inside: highlight, highlight, face, shadow
|
||||
// Bottom/Right, outside to inside: shadow, shadow, face, highlight
|
||||
|
||||
static void drawBorderFrame(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
int32_t x, int32_t y, int32_t w, int32_t h) {
|
||||
static void drawBorderFrame(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, int32_t x, int32_t y, int32_t w, int32_t h) {
|
||||
uint32_t hi = colors->windowHighlight;
|
||||
uint32_t face = colors->windowFace;
|
||||
uint32_t sh = colors->windowShadow;
|
||||
|
|
@ -109,8 +99,7 @@ static void drawBorderFrame(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT
|
|||
// ============================================================
|
||||
// Draws a small raised beveled square gadget (GEOS Motif style).
|
||||
|
||||
static void drawTitleGadget(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
int32_t x, int32_t y, int32_t size) {
|
||||
static void drawTitleGadget(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, int32_t x, int32_t y, int32_t size) {
|
||||
BevelStyleT bevel;
|
||||
bevel.highlight = colors->windowHighlight;
|
||||
bevel.shadow = colors->windowShadow;
|
||||
|
|
@ -124,8 +113,7 @@ static void drawTitleGadget(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT
|
|||
// drawMenuBar
|
||||
// ============================================================
|
||||
|
||||
static void drawMenuBar(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font,
|
||||
const ColorSchemeT *colors, WindowT *win) {
|
||||
static void drawMenuBar(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors, WindowT *win) {
|
||||
if (!win->menuBar) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -162,8 +150,7 @@ static void drawMenuBar(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *fon
|
|||
// Each groove is a shadow+highlight line pair cutting across the
|
||||
// border width, perpendicular to the edge direction.
|
||||
|
||||
static void drawResizeBreaks(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
WindowT *win) {
|
||||
static void drawResizeBreaks(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, WindowT *win) {
|
||||
if (!win->resizable) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -213,9 +200,7 @@ static void drawResizeBreaks(DisplayT *d, const BlitOpsT *ops, const ColorScheme
|
|||
// drawScaledRect
|
||||
// ============================================================
|
||||
|
||||
static void drawScaledRect(DisplayT *d, int32_t dstX, int32_t dstY, int32_t dstW, int32_t dstH,
|
||||
const uint8_t *src, int32_t srcW, int32_t srcH, int32_t srcPitch,
|
||||
int32_t bpp) {
|
||||
static void drawScaledRect(DisplayT *d, int32_t dstX, int32_t dstY, int32_t dstW, int32_t dstH, const uint8_t *src, int32_t srcW, int32_t srcH, int32_t srcPitch, int32_t bpp) {
|
||||
for (int32_t dy = 0; dy < dstH; dy++) {
|
||||
int32_t sy = (dy * srcH) / dstH;
|
||||
int32_t screenY = dstY + dy;
|
||||
|
|
@ -254,8 +239,7 @@ static void drawScaledRect(DisplayT *d, int32_t dstX, int32_t dstY, int32_t dstW
|
|||
// drawScrollbar
|
||||
// ============================================================
|
||||
|
||||
static void drawScrollbar(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
const ScrollbarT *sb, int32_t winX, int32_t winY) {
|
||||
static void drawScrollbar(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, const ScrollbarT *sb, int32_t winX, int32_t winY) {
|
||||
int32_t x = winX + sb->x;
|
||||
int32_t y = winY + sb->y;
|
||||
|
||||
|
|
@ -328,8 +312,7 @@ static void drawScrollbar(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *
|
|||
// Draws a small triangle arrow glyph inside a scrollbar button.
|
||||
// dir: 0=up, 1=down, 2=left, 3=right
|
||||
|
||||
static void drawScrollbarArrow(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
int32_t x, int32_t y, int32_t size, int32_t dir) {
|
||||
static void drawScrollbarArrow(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, int32_t x, int32_t y, int32_t size, int32_t dir) {
|
||||
int32_t cx = x + size / 2;
|
||||
int32_t cy = y + size / 2;
|
||||
uint32_t fg = colors->contentFg;
|
||||
|
|
@ -361,8 +344,7 @@ static void drawScrollbarArrow(DisplayT *d, const BlitOpsT *ops, const ColorSche
|
|||
// drawTitleBar
|
||||
// ============================================================
|
||||
|
||||
static void drawTitleBar(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font,
|
||||
const ColorSchemeT *colors, WindowT *win) {
|
||||
static void drawTitleBar(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors, WindowT *win) {
|
||||
int32_t titleX = win->x + CHROME_BORDER_WIDTH;
|
||||
int32_t titleY = win->y + CHROME_BORDER_WIDTH;
|
||||
int32_t titleW = win->w - CHROME_BORDER_WIDTH * 2;
|
||||
|
|
@ -621,9 +603,7 @@ ScrollbarT *wmAddVScrollbar(WindowT *win, int32_t min, int32_t max, int32_t page
|
|||
// wmCreateWindow
|
||||
// ============================================================
|
||||
|
||||
WindowT *wmCreateWindow(WindowStackT *stack, DisplayT *d,
|
||||
const char *title, int32_t x, int32_t y,
|
||||
int32_t w, int32_t h, bool resizable) {
|
||||
WindowT *wmCreateWindow(WindowStackT *stack, DisplayT *d, const char *title, int32_t x, int32_t y, int32_t w, int32_t h, bool resizable) {
|
||||
if (stack->count >= MAX_WINDOWS) {
|
||||
fprintf(stderr, "WM: Maximum windows (%d) reached\n", MAX_WINDOWS);
|
||||
return NULL;
|
||||
|
|
@ -778,8 +758,7 @@ void wmDragMove(WindowStackT *stack, DirtyListT *dl, int32_t mouseX, int32_t mou
|
|||
// wmDrawChrome
|
||||
// ============================================================
|
||||
|
||||
void wmDrawChrome(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font,
|
||||
const ColorSchemeT *colors, WindowT *win, const RectT *clipTo) {
|
||||
void wmDrawChrome(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors, WindowT *win, const RectT *clipTo) {
|
||||
// Save and set clip rect
|
||||
int32_t savedClipX = d->clipX;
|
||||
int32_t savedClipY = d->clipY;
|
||||
|
|
@ -872,8 +851,7 @@ void wmDrawContent(DisplayT *d, const BlitOpsT *ops, WindowT *win, const RectT *
|
|||
// wmDrawMinimizedIcons
|
||||
// ============================================================
|
||||
|
||||
void wmDrawMinimizedIcons(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
const WindowStackT *stack, const RectT *clipTo) {
|
||||
void wmDrawMinimizedIcons(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, const WindowStackT *stack, const RectT *clipTo) {
|
||||
int32_t iconIdx = 0;
|
||||
|
||||
for (int32_t i = 0; i < stack->count; i++) {
|
||||
|
|
@ -927,8 +905,7 @@ void wmDrawMinimizedIcons(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *
|
|||
// wmDrawScrollbars
|
||||
// ============================================================
|
||||
|
||||
void wmDrawScrollbars(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
WindowT *win, const RectT *clipTo) {
|
||||
void wmDrawScrollbars(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, WindowT *win, const RectT *clipTo) {
|
||||
int32_t savedClipX = d->clipX;
|
||||
int32_t savedClipY = d->clipY;
|
||||
int32_t savedClipW = d->clipW;
|
||||
|
|
@ -1162,8 +1139,7 @@ void wmMinimize(WindowStackT *stack, DirtyListT *dl, WindowT *win) {
|
|||
// wmMinimizedIconHit
|
||||
// ============================================================
|
||||
|
||||
int32_t wmMinimizedIconHit(const WindowStackT *stack, const DisplayT *d,
|
||||
int32_t mx, int32_t my) {
|
||||
int32_t wmMinimizedIconHit(const WindowStackT *stack, const DisplayT *d, int32_t mx, int32_t my) {
|
||||
int32_t iconIdx = 0;
|
||||
|
||||
for (int32_t i = 0; i < stack->count; i++) {
|
||||
|
|
@ -1344,8 +1320,7 @@ int32_t wmReallocContentBuf(WindowT *win, const DisplayT *d) {
|
|||
// wmResizeBegin
|
||||
// ============================================================
|
||||
|
||||
void wmResizeBegin(WindowStackT *stack, int32_t idx, int32_t edge,
|
||||
int32_t mouseX, int32_t mouseY) {
|
||||
void wmResizeBegin(WindowStackT *stack, int32_t idx, int32_t edge, int32_t mouseX, int32_t mouseY) {
|
||||
stack->resizeWindow = idx;
|
||||
stack->resizeEdge = edge;
|
||||
stack->dragOffX = mouseX;
|
||||
|
|
@ -1395,8 +1370,7 @@ void wmResizeEnd(WindowStackT *stack) {
|
|||
// wmResizeMove
|
||||
// ============================================================
|
||||
|
||||
void wmResizeMove(WindowStackT *stack, DirtyListT *dl, const DisplayT *d,
|
||||
int32_t mouseX, int32_t mouseY) {
|
||||
void wmResizeMove(WindowStackT *stack, DirtyListT *dl, const DisplayT *d, int32_t mouseX, int32_t mouseY) {
|
||||
if (stack->resizeWindow < 0 || stack->resizeWindow >= stack->count) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1567,8 +1541,7 @@ void wmRestoreMinimized(WindowStackT *stack, DirtyListT *dl, WindowT *win) {
|
|||
// wmScrollbarClick
|
||||
// ============================================================
|
||||
|
||||
void wmScrollbarClick(WindowStackT *stack, DirtyListT *dl, int32_t idx,
|
||||
int32_t orient, int32_t mx, int32_t my) {
|
||||
void wmScrollbarClick(WindowStackT *stack, DirtyListT *dl, int32_t idx, int32_t orient, int32_t mx, int32_t my) {
|
||||
if (idx < 0 || idx >= stack->count) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
25
dvx/dvxWm.h
25
dvx/dvxWm.h
|
|
@ -8,9 +8,7 @@
|
|||
void wmInit(WindowStackT *stack);
|
||||
|
||||
// Create a new window and add it to the stack (raised to top)
|
||||
WindowT *wmCreateWindow(WindowStackT *stack, DisplayT *d,
|
||||
const char *title, int32_t x, int32_t y,
|
||||
int32_t w, int32_t h, bool resizable);
|
||||
WindowT *wmCreateWindow(WindowStackT *stack, DisplayT *d, const char *title, int32_t x, int32_t y, int32_t w, int32_t h, bool resizable);
|
||||
|
||||
// Destroy a window and remove from stack
|
||||
void wmDestroyWindow(WindowStackT *stack, WindowT *win);
|
||||
|
|
@ -46,19 +44,16 @@ ScrollbarT *wmAddVScrollbar(WindowT *win, int32_t min, int32_t max, int32_t page
|
|||
ScrollbarT *wmAddHScrollbar(WindowT *win, int32_t min, int32_t max, int32_t pageSize);
|
||||
|
||||
// Draw window chrome (frame, title bar, menu bar) clipped to a dirty rect
|
||||
void wmDrawChrome(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font,
|
||||
const ColorSchemeT *colors, WindowT *win, const RectT *clipTo);
|
||||
void wmDrawChrome(DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors, WindowT *win, const RectT *clipTo);
|
||||
|
||||
// Draw window content clipped to a dirty rect
|
||||
void wmDrawContent(DisplayT *d, const BlitOpsT *ops, WindowT *win, const RectT *clipTo);
|
||||
|
||||
// Draw scrollbars for a window
|
||||
void wmDrawScrollbars(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
WindowT *win, const RectT *clipTo);
|
||||
void wmDrawScrollbars(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, WindowT *win, const RectT *clipTo);
|
||||
|
||||
// Draw minimized window icons at bottom of screen
|
||||
void wmDrawMinimizedIcons(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors,
|
||||
const WindowStackT *stack, const RectT *clipTo);
|
||||
void wmDrawMinimizedIcons(DisplayT *d, const BlitOpsT *ops, const ColorSchemeT *colors, const WindowStackT *stack, const RectT *clipTo);
|
||||
|
||||
// Hit test: which part of which window is at screen position (mx, my)?
|
||||
// Returns stack index or -1 if no window hit
|
||||
|
|
@ -73,8 +68,7 @@ int32_t wmResizeEdgeHit(const WindowT *win, int32_t mx, int32_t my);
|
|||
void wmDragMove(WindowStackT *stack, DirtyListT *dl, int32_t mouseX, int32_t mouseY);
|
||||
|
||||
// Handle window resize (call each mouse move during resize)
|
||||
void wmResizeMove(WindowStackT *stack, DirtyListT *dl, const DisplayT *d,
|
||||
int32_t mouseX, int32_t mouseY);
|
||||
void wmResizeMove(WindowStackT *stack, DirtyListT *dl, const DisplayT *d, int32_t mouseX, int32_t mouseY);
|
||||
|
||||
// Begin dragging a window
|
||||
void wmDragBegin(WindowStackT *stack, int32_t idx, int32_t mouseX, int32_t mouseY);
|
||||
|
|
@ -83,8 +77,7 @@ void wmDragBegin(WindowStackT *stack, int32_t idx, int32_t mouseX, int32_t mouse
|
|||
void wmDragEnd(WindowStackT *stack);
|
||||
|
||||
// Begin resizing a window
|
||||
void wmResizeBegin(WindowStackT *stack, int32_t idx, int32_t edge,
|
||||
int32_t mouseX, int32_t mouseY);
|
||||
void wmResizeBegin(WindowStackT *stack, int32_t idx, int32_t edge, int32_t mouseX, int32_t mouseY);
|
||||
|
||||
// End resizing
|
||||
void wmResizeEnd(WindowStackT *stack);
|
||||
|
|
@ -93,8 +86,7 @@ void wmResizeEnd(WindowStackT *stack);
|
|||
void wmSetTitle(WindowT *win, DirtyListT *dl, const char *title);
|
||||
|
||||
// Handle scrollbar click (arrow buttons, trough, or begin thumb drag)
|
||||
void wmScrollbarClick(WindowStackT *stack, DirtyListT *dl, int32_t idx,
|
||||
int32_t orient, int32_t mx, int32_t my);
|
||||
void wmScrollbarClick(WindowStackT *stack, DirtyListT *dl, int32_t idx, int32_t orient, int32_t mx, int32_t my);
|
||||
|
||||
// Handle ongoing scrollbar thumb drag
|
||||
void wmScrollbarDrag(WindowStackT *stack, DirtyListT *dl, int32_t mx, int32_t my);
|
||||
|
|
@ -110,8 +102,7 @@ void wmMinimize(WindowStackT *stack, DirtyListT *dl, WindowT *win);
|
|||
|
||||
// Hit-test minimized icons at bottom of screen
|
||||
// Returns stack index of the minimized window, or -1
|
||||
int32_t wmMinimizedIconHit(const WindowStackT *stack, const DisplayT *d,
|
||||
int32_t mx, int32_t my);
|
||||
int32_t wmMinimizedIconHit(const WindowStackT *stack, const DisplayT *d, int32_t mx, int32_t my);
|
||||
|
||||
// Restore a maximized window to its pre-maximize geometry
|
||||
void wmRestore(WindowStackT *stack, DirtyListT *dl, const DisplayT *d, WindowT *win);
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
// widgetFramePaint
|
||||
// ============================================================
|
||||
|
||||
void widgetFramePaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetFramePaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
int32_t fb = widgetFrameBorderWidth(w);
|
||||
int32_t boxY = w->y + font->charHeight / 2;
|
||||
int32_t boxH = w->h - font->charHeight / 2;
|
||||
|
|
|
|||
|
|
@ -49,8 +49,7 @@ void widgetButtonOnMouse(WidgetT *hit) {
|
|||
// widgetButtonPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetButtonPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetButtonPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
uint32_t fg = w->fgColor ? w->fgColor : colors->contentFg;
|
||||
uint32_t bgFace = w->bgColor ? w->bgColor : colors->buttonFace;
|
||||
|
||||
|
|
|
|||
|
|
@ -441,8 +441,7 @@ void widgetCanvasOnMouse(WidgetT *hit, int32_t vx, int32_t vy) {
|
|||
// widgetCanvasPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetCanvasPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetCanvasPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
(void)font;
|
||||
|
||||
if (!w->as.canvas.data) {
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ void widgetCheckboxOnMouse(WidgetT *hit) {
|
|||
// widgetCheckboxPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetCheckboxPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetCheckboxPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
uint32_t fg = w->fgColor ? w->fgColor : colors->contentFg;
|
||||
uint32_t bg = w->bgColor ? w->bgColor : colors->contentBg;
|
||||
int32_t boxY = w->y + (w->h - CHECKBOX_BOX_SIZE) / 2;
|
||||
|
|
|
|||
|
|
@ -138,8 +138,7 @@ void widgetComboBoxOnMouse(WidgetT *hit, WidgetT *root, int32_t vx) {
|
|||
// widgetComboBoxPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetComboBoxPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetComboBoxPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
uint32_t fg = w->fgColor ? w->fgColor : colors->contentFg;
|
||||
uint32_t bg = w->bgColor ? w->bgColor : colors->contentBg;
|
||||
|
||||
|
|
@ -202,8 +201,7 @@ void widgetComboBoxPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
|||
// widgetComboBoxPaintPopup
|
||||
// ============================================================
|
||||
|
||||
void widgetComboBoxPaintPopup(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetComboBoxPaintPopup(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
int32_t popX;
|
||||
int32_t popY;
|
||||
int32_t popW;
|
||||
|
|
|
|||
|
|
@ -124,8 +124,7 @@ void widgetDestroyChildren(WidgetT *w) {
|
|||
//
|
||||
// Calculate the rectangle for a dropdown/combobox popup list.
|
||||
|
||||
void widgetDropdownPopupRect(WidgetT *w, const BitmapFontT *font, int32_t contentH,
|
||||
int32_t *popX, int32_t *popY, int32_t *popW, int32_t *popH) {
|
||||
void widgetDropdownPopupRect(WidgetT *w, const BitmapFontT *font, int32_t contentH, int32_t *popX, int32_t *popY, int32_t *popW, int32_t *popH) {
|
||||
int32_t itemCount = 0;
|
||||
|
||||
if (w->type == WidgetDropdownE) {
|
||||
|
|
|
|||
|
|
@ -99,8 +99,7 @@ void widgetDropdownOnMouse(WidgetT *hit) {
|
|||
// widgetDropdownPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetDropdownPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetDropdownPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
uint32_t fg = w->fgColor ? w->fgColor : colors->contentFg;
|
||||
uint32_t bg = w->bgColor ? w->bgColor : colors->contentBg;
|
||||
|
||||
|
|
@ -142,8 +141,7 @@ void widgetDropdownPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
|||
// widgetDropdownPaintPopup
|
||||
// ============================================================
|
||||
|
||||
void widgetDropdownPaintPopup(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetDropdownPaintPopup(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
int32_t popX;
|
||||
int32_t popY;
|
||||
int32_t popW;
|
||||
|
|
|
|||
|
|
@ -143,8 +143,7 @@ void widgetImageOnMouse(WidgetT *hit) {
|
|||
// widgetImagePaint
|
||||
// ============================================================
|
||||
|
||||
void widgetImagePaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetImagePaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
(void)font;
|
||||
(void)colors;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@ void widgetLabelCalcMinSize(WidgetT *w, const BitmapFontT *font) {
|
|||
// widgetLabelPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetLabelPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetLabelPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
uint32_t fg = w->fgColor ? w->fgColor : colors->contentFg;
|
||||
uint32_t bg = w->bgColor ? w->bgColor : colors->contentBg;
|
||||
|
||||
|
|
|
|||
|
|
@ -342,8 +342,7 @@ void widgetLayoutChildren(WidgetT *w, const BitmapFontT *font) {
|
|||
// wgtLayout
|
||||
// ============================================================
|
||||
|
||||
void wgtLayout(WidgetT *root, int32_t availW, int32_t availH,
|
||||
const BitmapFontT *font) {
|
||||
void wgtLayout(WidgetT *root, int32_t availW, int32_t availH, const BitmapFontT *font) {
|
||||
if (!root) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,8 +44,7 @@ static void debugContainerBorder(WidgetT *w, DisplayT *d, const BlitOpsT *ops) {
|
|||
// Paint a single widget and its children. Dispatches to per-widget
|
||||
// paint functions defined in their respective files.
|
||||
|
||||
void widgetPaintOne(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetPaintOne(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
if (!w->visible) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -157,8 +156,7 @@ void widgetPaintOne(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
|||
// Paints popup overlays (open dropdowns/comboboxes) on top of
|
||||
// the widget tree. Called after the main paint pass.
|
||||
|
||||
void widgetPaintOverlays(WidgetT *root, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetPaintOverlays(WidgetT *root, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
if (!sOpenPopup) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -345,8 +343,7 @@ void wgtInvalidate(WidgetT *w) {
|
|||
// wgtPaint
|
||||
// ============================================================
|
||||
|
||||
void wgtPaint(WidgetT *root, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void wgtPaint(WidgetT *root, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
if (!root) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,8 +67,7 @@ void widgetProgressBarCalcMinSize(WidgetT *w, const BitmapFontT *font) {
|
|||
// widgetProgressBarPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetProgressBarPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetProgressBarPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
(void)font;
|
||||
uint32_t fg = w->fgColor ? w->fgColor : colors->activeTitleBg;
|
||||
uint32_t bg = w->bgColor ? w->bgColor : colors->contentBg;
|
||||
|
|
|
|||
|
|
@ -74,8 +74,7 @@ void widgetRadioOnMouse(WidgetT *hit) {
|
|||
// widgetRadioPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetRadioPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetRadioPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
uint32_t fg = w->fgColor ? w->fgColor : colors->contentFg;
|
||||
uint32_t bg = w->bgColor ? w->bgColor : colors->contentBg;
|
||||
int32_t boxY = w->y + (w->h - CHECKBOX_BOX_SIZE) / 2;
|
||||
|
|
|
|||
|
|
@ -37,8 +37,7 @@ WidgetT *wgtVSeparator(WidgetT *parent) {
|
|||
// widgetSeparatorPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetSeparatorPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetSeparatorPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
(void)font;
|
||||
|
||||
if (w->as.separator.vertical) {
|
||||
|
|
|
|||
|
|
@ -140,8 +140,7 @@ void widgetSliderOnMouse(WidgetT *hit, int32_t vx, int32_t vy) {
|
|||
// widgetSliderPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetSliderPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetSliderPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
(void)font;
|
||||
uint32_t fg = w->fgColor ? w->fgColor : colors->contentFg;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ WidgetT *wgtStatusBar(WidgetT *parent) {
|
|||
// widgetStatusBarPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetStatusBarPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetStatusBarPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
(void)font;
|
||||
|
||||
// Draw sunken border around each child
|
||||
|
|
|
|||
|
|
@ -168,8 +168,7 @@ void widgetTabControlOnMouse(WidgetT *hit, WidgetT *root, int32_t vx, int32_t vy
|
|||
// widgetTabControlPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetTabControlPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetTabControlPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
int32_t tabH = font->charHeight + TAB_PAD_V * 2;
|
||||
|
||||
// Content panel
|
||||
|
|
|
|||
|
|
@ -86,8 +86,7 @@ void widgetTextInputOnMouse(WidgetT *hit, WidgetT *root, int32_t vx) {
|
|||
// widgetTextInputPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetTextInputPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetTextInputPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
uint32_t fg = w->fgColor ? w->fgColor : colors->contentFg;
|
||||
uint32_t bg = w->bgColor ? w->bgColor : colors->contentBg;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ WidgetT *wgtToolbar(WidgetT *parent) {
|
|||
// widgetToolbarPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetToolbarPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetToolbarPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
(void)font;
|
||||
|
||||
// Draw raised background and bottom separator
|
||||
|
|
|
|||
|
|
@ -73,8 +73,7 @@ static int32_t calcTreeItemsMaxWidth(WidgetT *parent, const BitmapFontT *font, i
|
|||
// layoutTreeItems
|
||||
// ============================================================
|
||||
|
||||
static void layoutTreeItems(WidgetT *parent, const BitmapFontT *font,
|
||||
int32_t x, int32_t *y, int32_t width, int32_t depth) {
|
||||
static void layoutTreeItems(WidgetT *parent, const BitmapFontT *font, int32_t x, int32_t *y, int32_t width, int32_t depth) {
|
||||
for (WidgetT *c = parent->firstChild; c; c = c->nextSibling) {
|
||||
if (c->type != WidgetTreeItemE || !c->visible) {
|
||||
continue;
|
||||
|
|
@ -97,10 +96,7 @@ static void layoutTreeItems(WidgetT *parent, const BitmapFontT *font,
|
|||
// paintTreeItems
|
||||
// ============================================================
|
||||
|
||||
static void paintTreeItems(WidgetT *parent, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors,
|
||||
int32_t baseX, int32_t *itemY, int32_t depth,
|
||||
int32_t clipTop, int32_t clipBottom) {
|
||||
static void paintTreeItems(WidgetT *parent, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors, int32_t baseX, int32_t *itemY, int32_t depth, int32_t clipTop, int32_t clipBottom) {
|
||||
for (WidgetT *c = parent->firstChild; c; c = c->nextSibling) {
|
||||
if (c->type != WidgetTreeItemE || !c->visible) {
|
||||
continue;
|
||||
|
|
@ -174,8 +170,7 @@ static void paintTreeItems(WidgetT *parent, DisplayT *d, const BlitOpsT *ops,
|
|||
//
|
||||
// Find the tree item at a given Y coordinate.
|
||||
|
||||
static WidgetT *treeItemAtY(WidgetT *parent, int32_t targetY, int32_t *curY,
|
||||
const BitmapFontT *font) {
|
||||
static WidgetT *treeItemAtY(WidgetT *parent, int32_t targetY, int32_t *curY, const BitmapFontT *font) {
|
||||
for (WidgetT *c = parent->firstChild; c; c = c->nextSibling) {
|
||||
if (c->type != WidgetTreeItemE || !c->visible) {
|
||||
continue;
|
||||
|
|
@ -343,8 +338,7 @@ void widgetTreeViewOnMouse(WidgetT *hit, WidgetT *root, int32_t vx, int32_t vy)
|
|||
// widgetTreeViewPaint
|
||||
// ============================================================
|
||||
|
||||
void widgetTreeViewPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops,
|
||||
const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
void widgetTreeViewPaint(WidgetT *w, DisplayT *d, const BlitOpsT *ops, const BitmapFontT *font, const ColorSchemeT *colors) {
|
||||
uint32_t bg = w->bgColor ? w->bgColor : colors->contentBg;
|
||||
|
||||
// Sunken border
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue