MiniGUI API Reference (MiniGUI-Threads)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Data Fields
_WINDOW_ELEMENT_RENDERER Struct Reference

#include <window.h>

Data Fields

const char name [LEN_RENDERER_NAME+1]
 
int(* init )(PWERENDERER renderer)
 
int(* deinit )(PWERENDERER renderer)
 
DWORD(* calc_3dbox_color )(DWORD color, int flag)
 
void(* draw_3dbox )(HDC hdc, const RECT *pRect, DWORD color, DWORD flag)
 
void(* draw_radio )(HDC hdc, const RECT *pRect, DWORD color, int status)
 
void(* draw_checkbox )(HDC hdc, const RECT *pRect, DWORD color, int status)
 
void(* draw_checkmark )(HDC hdc, const RECT *pRect, DWORD color, int status)
 
void(* draw_arrow )(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color, int status)
 
void(* draw_fold )(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color, int status, int next)
 
void(* draw_focus_frame )(HDC hdc, const RECT *pRect, DWORD color)
 
void(* draw_normal_item )(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
 
void(* draw_hilite_item )(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
 
void(* draw_disabled_item )(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
 
void(* draw_significant_item )(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
 
void(* draw_push_button )(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color1, DWORD color2, int status)
 
void(* draw_radio_button )(HWND hWnd, HDC hdc, const RECT *pRect, int status)
 
void(* draw_check_button )(HWND hWnd, HDC hdc, const RECT *pRect, int status)
 
void(* draw_border )(HWND hWnd, HDC hdc, BOOL is_active)
 
void(* draw_caption )(HWND hWnd, HDC hdc, BOOL is_active)
 
void(* draw_caption_button )(HWND hwnd, HDC hdc, int ht_code, int state)
 
void(* draw_scrollbar )(HWND hWnd, HDC hdc, int sb_pos)
 
void(* calc_trackbar_rect )(HWND hWnd, LFRDR_TRACKBARINFO *info, DWORD dwStyle, const RECT *rcClient, RECT *rcRuler, RECT *rcBar, RECT *rcBorder)
 
void(* draw_trackbar )(HWND hWnd, HDC hdc, LFRDR_TRACKBARINFO *info)
 
int(* calc_we_area )(HWND hWnd, int which, RECT *we_area)
 
int(* calc_we_metrics )(HWND hWnd, LFRDR_WINSTYLEINFO *style_info, int which)
 
int(* hit_test )(HWND hWnd, int x, int y)
 
int(* on_click_hotspot )(HWND hWnd, int which)
 
void(* draw_custom_hotspot )(HWND hWnd, HDC hdc, int ht_code, int state)
 
void(* calc_thumb_area )(HWND hWnd, BOOL vertical, LFSCROLLBARINFO *sb_info)
 
void(* disabled_text_out )(HWND hWnd, HDC hdc, const char *spText, PRECT rc, DWORD dt_fmt)
 
void(* draw_tab )(HWND hWnd, HDC hdc, RECT *rect, char *title, DWORD color, int flag, HICON icon)
 
void(* draw_progress )(HWND hWnd, HDC hdc, int nMax, int nMin, int nPos, BOOL fVertical)
 
void(* draw_header )(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
 
DWORD(* on_get_rdr_attr )(struct _WINDOW_ELEMENT_RENDERER *, int we_attr_id)
 
DWORD(* on_set_rdr_attr )(struct _WINDOW_ELEMENT_RENDERER *, int we_attr_id, DWORD we_attr, BOOL change)
 
void(* erase_background )(HWND hWnd, HDC hdc, const RECT *rect)
 
void(* draw_normal_menu_item )(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
 
void(* draw_hilite_menu_item )(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
 
void(* draw_disabled_menu_item )(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
 
int we_metrics [WE_METRICS_NUMBER]
 
DWORD we_colors [WE_COLORS_NUMBER][3]
 
PLOGFONT we_fonts [WE_FONTS_NUMBER]
 
HICON we_icon [2][SYSICO_ITEM_NUMBER]
 
unsigned int refcount
 
const void * private_info
 

Detailed Description

The window element renderer structure.

Definition at line 5229 of file window.h.

Field Documentation

◆ calc_3dbox_color

DWORD(* calc_3dbox_color(DWORD color, int flag)

The function pointer to calculate lighter, lightest, darker and darkest color according to main color.

Parameters
colorThe main color.
flagThe color type, can be one of the values:
  • LFRDR_3DBOX_COLOR_DARKER
    darker color.
  • LFRDR_3DBOX_COLOR_DARKEST
    darkest color.
  • LFRDR_3DBOX_COLOR_LIGHTER
    lighter color.
  • LFRDR_3DBOX_COLOR_LIGHTEST
    lightest color.

Definition at line 5259 of file window.h.

◆ calc_thumb_area

void(* calc_thumb_area(HWND hWnd, BOOL vertical, LFSCROLLBARINFO *sb_info)

The pointer to calculate scrollbar's thumb area function.

Parameters
verticalVertical scrollbar or Horizontal scrollbar.
sb_infoThe scrollbar information for calculating result.

Definition at line 5517 of file window.h.

◆ calc_trackbar_rect

void(* calc_trackbar_rect(HWND hWnd, LFRDR_TRACKBARINFO *info, DWORD dwStyle, const RECT *rcClient, RECT *rcRuler, RECT *rcBar, RECT *rcBorder)

The pointer to get trackbar rect function.

Definition at line 5450 of file window.h.

◆ calc_we_area

int(* calc_we_area(HWND hWnd, int which, RECT *we_area)

The pointer to calculate window element area function.

Parameters
whichThe hit test code of the part to be calculated.
we_areaThe reactangle for calculating result.

Definition at line 5463 of file window.h.

◆ calc_we_metrics

int(* calc_we_metrics(HWND hWnd, LFRDR_WINSTYLEINFO *style_info, int which)

The pointer to calculate window element metrics function.

Parameters
which,canbe one of the following values:
  • LFRDR_METRICS_BORDER
    The metrics of window border.
  • LFRDR_METRICS_CAPTION_H
    The height of window caption.
  • LFRDR_METRICS_MENU_H
    The height of window menu.
  • LFRDR_METRICS_VSCROLL_W
    The width of vertical scrollbar.
  • LFRDR_METRICS_HSCROLL_H
    The height of horizontal scrollbar.
  • LFRDR_METRICS_ICON_H
    The height of window icon.
  • LFRDR_METRICS_ICON_W
    The width of window icon.
  • LFRDR_METRICS_MINWIN_WIDTH
    The minimize width of window.
  • LFRDR_METRICS_MINWIN_HEIGHT
    The minimize height of window.

Definition at line 5487 of file window.h.

◆ deinit

int(* deinit(PWERENDERER renderer)

The pointer to release function. It is used to release renderer resource.

See also
init

Definition at line 5243 of file window.h.

◆ disabled_text_out

void(* disabled_text_out(HWND hWnd, HDC hdc, const char *spText, PRECT rc, DWORD dt_fmt)

The pointer to output disabled text function.

Definition at line 5521 of file window.h.

◆ draw_3dbox

void(* draw_3dbox(HDC hdc, const RECT *pRect, DWORD color, DWORD flag)

The pointer to draw 3dbox function.

Parameters
flag,canbe OR'ed by the following values:
  • LFRDR_BTN_STATUS_NORMAL
    Normal status.
  • LFRDR_BTN_STATUS_HILITE
    Highlight status.
  • LFRDR_BTN_STATUS_PRESSED
    Pushed status.
  • LFRDR_BTN_STATUS_DISABLED
    Disabled status.
  • LFRDR_BTN_STATUS_SELECTED
    Selected status.
  • LFRDR_3DBOX_THICKFRAME
    Use thick/thin frame.
  • LFRDR_3DBOX_FILLED
    Filled rectangle.

Definition at line 5280 of file window.h.

◆ draw_arrow

void(* draw_arrow(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color, int status)

The pointer to draw arrow function.

Parameters
status,canbe OR'ed by the following values:
  • LFRDR_ARROW_LEFT
    Left arrow.
  • LFRDR_ARROW_RIGHT
    Right arrow.
  • LFRDR_ARROW_UP
    Up arrow.
  • LFRDR_ARROW_DOWN
    Down arrow.
  • LFRDR_ARROW_NOFILL
    No filled arrow area.
  • LFRDR_ARROW_HAVESHELL
    Have shell for arrow.

Definition at line 5323 of file window.h.

◆ draw_border

void(* draw_border(HWND hWnd, HDC hdc, BOOL is_active)

The pointer to draw window border function.

Definition at line 5413 of file window.h.

◆ draw_caption

void(* draw_caption(HWND hWnd, HDC hdc, BOOL is_active)

The pointer to draw window text and icon function.

Definition at line 5416 of file window.h.

◆ draw_caption_button

void(* draw_caption_button(HWND hwnd, HDC hdc, int ht_code, int state)

The pointer to draw caption button function.

Parameters
ht_codeThe hittest code. If 0, it should draw all buttons.
stateThe button state, can be one of the values:
  • LFRDR_BTN_STATUS_NORMAL
    Normal status.
  • LFRDR_BTN_STATUS_HILITE
    Highlight status.
  • LFRDR_BTN_STATUS_PRESSED
    Pushed status.
  • LFRDR_BTN_STATUS_DISABLED
    Disabled status.

Definition at line 5431 of file window.h.

◆ draw_check_button

void(* draw_check_button(HWND hWnd, HDC hdc, const RECT *pRect, int status)

The pointer to draw check button function, this function used by button.

Parameters
status,canbe OR'ed by the following values:
  • LFRDR_BTN_STATUS_NORMAL
    Normal status.
  • LFRDR_BTN_STATUS_HILITE
    Highlight status.
  • LFRDR_BTN_STATUS_PRESSED
    Pushed status.
  • LFRDR_BTN_STATUS_DISABLED
    Disabled status.
  • LFRDR_BTN_STATUS_SELECTED
    Selected status.

Definition at line 5410 of file window.h.

◆ draw_checkbox

void(* draw_checkbox(HDC hdc, const RECT *pRect, DWORD color, int status)

The pointer to draw checkbox function.

See also
draw_radio

Definition at line 5298 of file window.h.

◆ draw_checkmark

void(* draw_checkmark(HDC hdc, const RECT *pRect, DWORD color, int status)

The pointer to draw checkmark function.

See also
draw_radio

Definition at line 5304 of file window.h.

◆ draw_custom_hotspot

void(* draw_custom_hotspot(HWND hWnd, HDC hdc, int ht_code, int state)

The pointer to draw user-defined hotspot function.

Parameters
ht_codeThe hittest code. If 0, it should draw all user-defined hotspot.
stateThe button state, can be one of the values:
  • LFRDR_BTN_STATUS_NORMAL
  • LFRDR_BTN_STATUS_HILITE
  • LFRDR_BTN_STATUS_PRESSED

Definition at line 5509 of file window.h.

◆ draw_disabled_item

void(* draw_disabled_item(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)

The pointer to draw disabled item function, this function used by listbox.

Definition at line 5353 of file window.h.

◆ draw_disabled_menu_item

void(* draw_disabled_menu_item(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)

The pointer to draw menu disabled item function.

Definition at line 5572 of file window.h.

◆ draw_focus_frame

void(* draw_focus_frame(HDC hdc, const RECT *pRect, DWORD color)

The pointer to draw focus frame function.

Definition at line 5342 of file window.h.

◆ draw_fold

void(* draw_fold(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color, int status, int next)

The pointer to draw fold function, this function used by listview and treeview.

Parameters
status,canbe OR'ed by the following values:
  • LFRDR_TREE_FOLD
    Draw opening/closing folder.
  • LFRDR_TREE_CHILD
    Draw connecting status between parent and child node.
  • LFRDR_TREE_NEXT
    Draw connecting status between current and next node.
nextThe number of child node.

Definition at line 5338 of file window.h.

◆ draw_header

void(* draw_header(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)

The pointer to draw table header function. this function used by listview and gridview.

Definition at line 5544 of file window.h.

◆ draw_hilite_item

void(* draw_hilite_item(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)

The pointer to draw highlight item function, this function used by listbox.

Definition at line 5349 of file window.h.

◆ draw_hilite_menu_item

void(* draw_hilite_menu_item(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)

The pointer to draw menu highlight item function.

Definition at line 5568 of file window.h.

◆ draw_normal_item

void(* draw_normal_item(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)

The pointer to draw normal item function, this function used by listbox.

Definition at line 5345 of file window.h.

◆ draw_normal_menu_item

void(* draw_normal_menu_item(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)

The pointer to draw menu normal item function.

Definition at line 5564 of file window.h.

◆ draw_progress

void(* draw_progress(HWND hWnd, HDC hdc, int nMax, int nMin, int nPos, BOOL fVertical)

The pointer to draw progressbar's chunk/bar function.

Definition at line 5538 of file window.h.

◆ draw_push_button

void(* draw_push_button(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color1, DWORD color2, int status)

The pointer to draw push button function, this function used by button.

Parameters
status,canbe OR'ed by the following values:
  • BST_NORMAL
  • BST_HILITE
  • BST_PUSHED
  • BST_DISABLE
  • BST_UNCHECKED
  • BST_CHECKED
  • BST_INDETERMINATE
  • BST_FOCUS

Definition at line 5373 of file window.h.

◆ draw_radio

void(* draw_radio(HDC hdc, const RECT *pRect, DWORD color, int status)

The pointer to draw radio function.

Parameters
status,canbe OR'ed by the following values:
  • LFRDR_MARK_ALL_SELECTED
    All selected status.
  • LFRDR_MARK_HALF_SELECTED
    Half selected status.
  • LFRDR_MARK_HAVESHELL
    Have shell for mark.

Definition at line 5293 of file window.h.

◆ draw_radio_button

void(* draw_radio_button(HWND hWnd, HDC hdc, const RECT *pRect, int status)

The pointer to draw radio button function, the function ued by button.

Parameters
status,canbe OR'ed by the following values:
  • LFRDR_BTN_STATUS_NORMAL
    Normal status.
  • LFRDR_BTN_STATUS_HILITE
    Highlight status.
  • LFRDR_BTN_STATUS_PRESSED
    Pushed status.
  • LFRDR_BTN_STATUS_DISABLED
    Disabled status.
  • LFRDR_BTN_STATUS_SELECTED
    Selected status.

Definition at line 5392 of file window.h.

◆ draw_scrollbar

void(* draw_scrollbar(HWND hWnd, HDC hdc, int sb_pos)

The pointer to draw scrollbar function.

Parameters
sb_posThe position need to be paint. If 0, it should draw all the scrollbar.
status,whichis one of the value:
  • LFRDR_BTN_STATUS_NORMAL
    Normal status.
  • LFRDR_BTN_STATUS_HILITE
    Highlight status.
  • LFRDR_BTN_STATUS_PRESSED
    Pushed status.
  • LFRDR_BTN_STATUS_DISABLED
    Disabled status.

Definition at line 5447 of file window.h.

◆ draw_significant_item

void(* draw_significant_item(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)

The pointer to draw significant item function, this function used by listbox.

Definition at line 5357 of file window.h.

◆ draw_tab

void(* draw_tab(HWND hWnd, HDC hdc, RECT *rect, char *title, DWORD color, int flag, HICON icon)

The pointer to draw propsheet's tab function.

Parameters
flag,canbe OR'ed by the following values:
  • LFRDR_TAB_BOTTOM
    Use bottom tab.
  • LFRDR_TAB_ACTIVE
    Active tab.
  • LFRDR_TAB_ICON
    With icon.

Definition at line 5534 of file window.h.

◆ draw_trackbar

void(* draw_trackbar(HWND hWnd, HDC hdc, LFRDR_TRACKBARINFO *info)

The pointer to draw trackbar function.

Definition at line 5455 of file window.h.

◆ erase_background

void(* erase_background(HWND hWnd, HDC hdc, const RECT *rect)

The pointer to erase background function.

Definition at line 5561 of file window.h.

◆ hit_test

int(* hit_test(HWND hWnd, int x, int y)

The pointer to hittest function.

Parameters
x,yThe position of the mouse in screen coordinates.
Returns
HT_XXX or HT_USER_XXX, hittest value.

Definition at line 5495 of file window.h.

◆ init

int(* init(PWERENDERER renderer)

The pointer to initialize function. It is used to initialize basic renderer information (metrics, color, font, icon, etc) and private information.

Definition at line 5237 of file window.h.

◆ name

const char name[LEN_RENDERER_NAME+1]

The renderer name.

Definition at line 5231 of file window.h.

◆ on_click_hotspot

int(* on_click_hotspot(HWND hWnd, int which)

The pointer to user-defined hotspot function.

Definition at line 5498 of file window.h.

◆ on_get_rdr_attr

DWORD(* on_get_rdr_attr(struct _WINDOW_ELEMENT_RENDERER *, int we_attr_id)

The pointer to get renderer private data function.

Parameters
we_attr_idThe id pointed renderer private data.

Definition at line 5550 of file window.h.

◆ on_set_rdr_attr

DWORD(* on_set_rdr_attr(struct _WINDOW_ELEMENT_RENDERER *, int we_attr_id, DWORD we_attr, BOOL change)

The pointer to set renderer private data function.

Parameters
we_attr_idThe id pointed renderer private data.
we_attrThe new renderer private data.

Definition at line 5558 of file window.h.

◆ private_info

const void* private_info

The private information.

Definition at line 5591 of file window.h.

◆ refcount

unsigned int refcount

The reference count.

Definition at line 5588 of file window.h.

◆ we_colors

DWORD we_colors[WE_COLORS_NUMBER][3]

The window element color information.

Definition at line 5579 of file window.h.

◆ we_fonts

The window element font information.

Definition at line 5582 of file window.h.

◆ we_icon

HICON we_icon[2][SYSICO_ITEM_NUMBER]

The renderer icon information.

Definition at line 5585 of file window.h.

◆ we_metrics

int we_metrics[WE_METRICS_NUMBER]

The window element metrics information.

Definition at line 5576 of file window.h.


The documentation for this struct was generated from the following file: