MiniGUI API Reference (MiniGUI-Threads)  v3.2.0
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 3756 of file window.h.

Field Documentation

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 3786 of file window.h.

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 4044 of file window.h.

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 3977 of file window.h.

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 3990 of file window.h.

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 4014 of file window.h.

int(* deinit) (PWERENDERER renderer)

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

See also
init

Definition at line 3770 of file window.h.

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 4048 of file window.h.

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 3807 of file window.h.

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 3850 of file window.h.

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

The pointer to draw window border function.

Definition at line 3940 of file window.h.

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

The pointer to draw window text and icon function.

Definition at line 3943 of file window.h.

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 3958 of file window.h.

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 3937 of file window.h.

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 3825 of file window.h.

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 3831 of file window.h.

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 4036 of file window.h.

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 3880 of file window.h.

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 4099 of file window.h.

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

The pointer to draw focus frame function.

Definition at line 3869 of file window.h.

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 3865 of file window.h.

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 4071 of file window.h.

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 3876 of file window.h.

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 4095 of file window.h.

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 3872 of file window.h.

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 4091 of file window.h.

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 4065 of file window.h.

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 3900 of file window.h.

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 3820 of file window.h.

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 3919 of file window.h.

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 3974 of file window.h.

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 3884 of file window.h.

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 4061 of file window.h.

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

The pointer to draw trackbar function.

Definition at line 3982 of file window.h.

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

The pointer to erase background function.

Definition at line 4088 of file window.h.

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 4022 of file window.h.

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 3764 of file window.h.

const char name[LEN_RENDERER_NAME+1]

The renderer name.

Definition at line 3758 of file window.h.

int(* on_click_hotspot) (HWND hWnd, int which)

The pointer to user-defined hotspot function.

Definition at line 4025 of file window.h.

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 4077 of file window.h.

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 4085 of file window.h.

const void* private_info

The private information.

Definition at line 4118 of file window.h.

unsigned int refcount

The reference count.

Definition at line 4115 of file window.h.

DWORD we_colors[WE_COLORS_NUMBER][3]

The window element color information.

Definition at line 4106 of file window.h.

The window element font information.

Definition at line 4109 of file window.h.

HICON we_icon[2][SYSICO_ITEM_NUMBER]

The renderer icon information.

Definition at line 4112 of file window.h.

int we_metrics[WE_METRICS_NUMBER]

The window element metrics information.

Definition at line 4103 of file window.h.


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