MiniGUI API Reference (MiniGUI-Standalone)  v5.0.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Modules | Data Structures | Macros | Typedefs | Functions
ScrollView control

Modules

 Styles of scrollview control
 
 Messages of scrollview control
 
 Notification codes of scrollview control
 

Data Structures

struct  _CONTAINERINFO
 
struct  _svitem_operations
 
struct  _SCROLLVIEWITEMINFO
 

Macros

#define CTRL_SCROLLVIEW   ("scrollview")
 The class name of scrollview control, uses this name to create a scrollable window that consists of items. More...
 
#define CTRL_SCROLLWND   ("scrollwnd")
 The class name of scrollwnd control, uses this name to create a scrollable window to which you can add controls. More...
 

Typedefs

typedef GHANDLE HSVITEM
 
typedef struct _CONTAINERINFO CONTAINERINFO
 
typedef CONTAINERINFOPCONTAINERINFO
 
typedef int(* SVITEM_INITFUNC) (HWND hWnd, HSVITEM hsvi)
 Type of the scrollview item initialization callback procedure. More...
 
typedef void(* SVITEM_DESTROYFUNC) (HWND hWnd, HSVITEM hsvi)
 Type of the scrollview item destroy callback procedure. More...
 
typedef void(* SVITEM_DRAWFUNC) (HWND hWnd, HSVITEM hsvi, HDC hdc, RECT *rcDraw)
 Type of the scrollview item drawing callback procedure. More...
 
typedef int(* SVITEM_CMP) (HSVITEM hsvi1, HSVITEM hsvi2)
 Type of the scrollview item compare function. More...
 
typedef struct _svitem_operations SVITEMOPS
 
typedef SVITEMOPSPSVITEMOPS
 
typedef struct _SCROLLVIEWITEMINFO SVITEMINFO
 
typedef SVITEMINFOPSVITEMINFO
 

Functions

MG_EXPORT LRESULT GUIAPI DefaultContainerProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
MG_EXPORT DWORD mglist_get_item_adddata (GHANDLE hi)
 Use this to get additional data from a list item in a control, such as scrollview and iconview. More...
 
MG_EXPORT DWORD scrollview_get_item_adddata (HSVITEM hsvi)
 Use this to get additional data from scrollview item. More...
 
MG_EXPORT int scrollview_get_item_index (HWND hWnd, HSVITEM hsvi)
 To get item index. More...
 
MG_EXPORT BOOL scrollview_is_item_hilight (HWND hWnd, HSVITEM hsvi)
 To decide whether an item is the current hilighted item. More...
 
MG_EXPORT BOOL scrollview_is_item_selected (HSVITEM hsvi)
 To decide whether an item is a selected. More...
 
MG_EXPORT int scrollview_set_item_height (HWND hWnd, HSVITEM hsvi, int height)
 Set the height of an item. More...
 

Detailed Description

Scrollview control is a scrollable window, which has a visible area and normally a larger content area, user can browse content area using scrollbar. Contents of the content area is totally user-defined, you can add controls in it, add customed listed items, or anything you want.

In fact, you can build a control needing scrolled window support on scrollview.

Macro Definition Documentation

◆ CTRL_SCROLLVIEW

#define CTRL_SCROLLVIEW   ("scrollview")

The class name of scrollview control, uses this name to create a scrollable window that consists of items.

Definition at line 93 of file scrollview.h.

◆ CTRL_SCROLLWND

#define CTRL_SCROLLWND   ("scrollwnd")

The class name of scrollwnd control, uses this name to create a scrollable window to which you can add controls.

Definition at line 101 of file scrollview.h.

Typedef Documentation

◆ CONTAINERINFO

typedef struct _CONTAINERINFO CONTAINERINFO

Structure which defines a container.

◆ HSVITEM

typedef GHANDLE HSVITEM

Scrollview item object, use this handle to access a scrollview item

Definition at line 109 of file scrollview.h.

◆ PCONTAINERINFO

Data type of pointer to a CONTAINERINFO

Definition at line 131 of file scrollview.h.

◆ PSVITEMINFO

Data type of pointer to a SVITEMINFO

Definition at line 231 of file scrollview.h.

◆ PSVITEMOPS

Data type of pointer to a SVITEMOPS

Definition at line 218 of file scrollview.h.

◆ SVITEM_CMP

typedef int(* SVITEM_CMP)(HSVITEM hsvi1, HSVITEM hsvi2)

Type of the scrollview item compare function.

Definition at line 205 of file scrollview.h.

◆ SVITEM_DESTROYFUNC

typedef void(* SVITEM_DESTROYFUNC)(HWND hWnd, HSVITEM hsvi)

Type of the scrollview item destroy callback procedure.

Parameters
hWndHandle of the scrollview control .
hsviScrollview item handle.

Definition at line 188 of file scrollview.h.

◆ SVITEM_DRAWFUNC

typedef void(* SVITEM_DRAWFUNC)(HWND hWnd, HSVITEM hsvi, HDC hdc, RECT *rcDraw)

Type of the scrollview item drawing callback procedure.

Parameters
hWndHandle of the scrollview control.
hsviScrollview item handle.
hdcDrawing device context.
rcDrawDrawing rect area.

Definition at line 199 of file scrollview.h.

◆ SVITEM_INITFUNC

typedef void(* SVITEM_INITFUNC)(HWND hWnd, HSVITEM hsvi)

Type of the scrollview item initialization callback procedure.

Parameters
hWndHandle of the scrollview control .
hsviScrollview item handle.
Returns
Zero on success; otherwise -1.

Definition at line 179 of file scrollview.h.

◆ SVITEMINFO

Structure of the scrollview item info

◆ SVITEMOPS

typedef struct _svitem_operations SVITEMOPS

Structure of item operations

Function Documentation

◆ DefaultContainerProc()

MG_EXPORT LRESULT GUIAPI DefaultContainerProc ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Default container window procedure

See also
DefaultDialogProc

◆ mglist_get_item_adddata()

DWORD mglist_get_item_adddata ( GHANDLE  hi)

Use this to get additional data from a list item in a control, such as scrollview and iconview.

◆ scrollview_get_item_adddata()

DWORD scrollview_get_item_adddata ( HSVITEM  hsvi)

Use this to get additional data from scrollview item.

◆ scrollview_get_item_index()

int scrollview_get_item_index ( HWND  hWnd,
HSVITEM  hsvi 
)

To get item index.

◆ scrollview_is_item_hilight()

int scrollview_is_item_hilight ( HWND  hWnd,
HSVITEM  hsvi 
)

To decide whether an item is the current hilighted item.

◆ scrollview_is_item_selected()

int scrollview_is_item_selected ( HSVITEM  hsvi)

To decide whether an item is a selected.

◆ scrollview_set_item_height()

int scrollview_set_item_height ( HWND  hWnd,
HSVITEM  hsvi,
int  height 
)

Set the height of an item.