MiniGUI API Reference (MiniGUI-Threads)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
scrollview.h
Go to the documentation of this file.
1 //
3 // IMPORTANT NOTICE
4 //
5 // The following open source license statement does not apply to any
6 // entity in the Exception List published by FMSoft.
7 //
8 // For more information, please visit:
9 //
10 // https://www.fmsoft.cn/exception-list
11 //
13 
55 /*
56  * $Id: scrollview.h 10690 2008-08-18 09:32:47Z weiym $
57  *
58  * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
59  * pSOS, ThreadX, NuCleus, OSE, and Win32.
60  */
61 
62 #ifndef _MGUI_CTRL_SCROLLVIEW_H
63 #define _MGUI_CTRL_SCROLLVIEW_H
64 
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif /* __cplusplus */
69 
93 #define CTRL_SCROLLVIEW ("scrollview")
94 
101 #define CTRL_SCROLLWND ("scrollwnd")
102 
106 MG_EXPORT LRESULT GUIAPI DefaultContainerProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
107 
109 typedef GHANDLE HSVITEM;
110 
114 typedef struct _CONTAINERINFO
115 {
116 #if 0
117  DWORD dwStyle;
118  DWORD dwExStyle;
119  int x, y, w, h;
120 #endif
121 
129 } CONTAINERINFO;
132 
138 MG_EXPORT DWORD mglist_get_item_adddata (GHANDLE hi);
139 
144 MG_EXPORT DWORD scrollview_get_item_adddata (HSVITEM hsvi);
145 
150 MG_EXPORT int scrollview_get_item_index (HWND hWnd, HSVITEM hsvi);
151 
156 MG_EXPORT BOOL scrollview_is_item_hilight (HWND hWnd, HSVITEM hsvi);
157 
162 MG_EXPORT BOOL scrollview_is_item_selected (HSVITEM hsvi);
163 
168 MG_EXPORT int scrollview_set_item_height (HWND hWnd, HSVITEM hsvi, int height);
169 
179 typedef int (*SVITEM_INITFUNC) (HWND hWnd, HSVITEM hsvi);
180 
188 typedef void (*SVITEM_DESTROYFUNC) (HWND hWnd, HSVITEM hsvi);
189 
199 typedef void (*SVITEM_DRAWFUNC) (HWND hWnd, HSVITEM hsvi, HDC hdc, RECT *rcDraw);
200 
205 typedef int (*SVITEM_CMP) (HSVITEM hsvi1, HSVITEM hsvi2);
206 
208 typedef struct _svitem_operations
209 {
216 } SVITEMOPS;
219 
221 typedef struct _SCROLLVIEWITEMINFO
222 {
224  int nItem;
229 } SVITEMINFO;
232 
242 #define SVS_UPNOTIFY 0x0001L
243 
248 #define SVS_NOTIFY 0x0002L
249 
254 #define SVS_AUTOSORT 0x0004L
255 
260 #define SVS_LOOP 0x0008L
261 
288 #define SVM_ADDITEM 0xF300
289 
309 #define SVM_DELITEM 0xF301
310 
330 #define SVM_SETITEMDRAW 0xF302
331 
350 #define SVM_ADDCTRLS 0xF303
351 
370 #define SVM_SETCONTWIDTH 0xF306
371 
390 #define SVM_SETCONTHEIGHT 0xF307
391 
408 #define SVM_GETCTRL 0xF308
409 
423 #define SVM_RESETCONTENT 0xF309
424 
443 #define SVM_SETITEMOPS 0xF30a
444 
463 #define SVM_GETMARGINS 0xF30b
464 
484 #define SVM_SETMARGINS 0xF311
485 
499 #define SVM_GETLEFTMARGIN 0xF312
500 
514 #define SVM_GETTOPMARGIN 0xF313
515 
529 #define SVM_GETRIGHTMARGIN 0xF314
530 
544 #define SVM_GETBOTTOMMARGIN 0xF315
545 
559 #define SVM_GETVISIBLEWIDTH 0xF316
560 
574 #define SVM_GETVISIBLEHEIGHT 0xF317
575 
589 #define SVM_GETCONTWIDTH 0xF318
590 
604 #define SVM_GETCONTHEIGHT 0xF319
605 
626 #define SVM_SETCONTRANGE 0xF31a
627 
641 #define SVM_GETCONTENTX 0xF31b
642 
656 #define SVM_GETCONTENTY 0xF31c
657 
675 #define SVM_SETCONTPOS 0xF31d
676 
695 #define SVM_GETCURSEL 0xF31e
696 
714 #define SVM_SELECTITEM 0xF31f
715 
734 #define SVM_SHOWITEM 0xF320
735 
754 #define SVM_CHOOSEITEM 0xF321
755 
774 #define SVM_SETCURSEL 0xF322
775 
795 #define SVM_SETITEMINIT 0xF323
796 
816 #define SVM_SETITEMDESTROY 0xF324
817 
834 #define SVM_SETITEMCMP 0xF327
835 
851 #define SVM_MAKEPOSVISIBLE 0xF328
852 
869 #define SVM_SETCONTAINERPROC 0xF329
870 
884 #define SVM_GETFOCUSCHILD 0xF32a
885 
899 #define SVM_GETHSCROLLVAL 0xF32b
900 
914 #define SVM_GETVSCROLLVAL 0xF32c
915 
929 #define SVM_GETHSCROLLPAGEVAL 0xF32d
930 
944 #define SVM_GETVSCROLLPAGEVAL 0xF32e
945 
963 #define SVM_SETSCROLLVAL 0xF32f
964 
982 #define SVM_SETSCROLLPAGEVAL 0xF330
983 
999 #define SVM_SORTITEMS 0xF331
1000 
1007 #define SVM_GETITEMCOUNT 0xF332
1008 
1028 #define SVM_GETITEMADDDATA 0xF333
1029 
1048 #define SVM_SETITEMADDDATA 0xF334
1049 
1068 #define SVM_REFRESHITEM 0xF335
1069 
1088 #define SVM_SETITEMHEIGHT 0xF336
1089 
1100 #define SVM_GETFIRSTVISIBLEITEM 0xF337
1101 
1102 
1111 #define SVN_CLICKED 1
1112 
1114 #define SVN_SELCHANGED 2
1115 
1117 #define SVN_SELCHANGING 4
1118 
1125 #ifdef __cplusplus
1126 }
1127 #endif /* __cplusplus */
1128 
1129 #endif /* _MGUI_CTRL_SCROLLVIEW_H */
1130 
_CONTAINERINFO::dwAddData
DWORD dwAddData
Definition: scrollview.h:128
_SCROLLVIEWITEMINFO::nItemHeight
int nItemHeight
Definition: scrollview.h:226
DWORD
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
Definition: common.h:604
CONTAINERINFO
struct _CONTAINERINFO CONTAINERINFO
HWND
GHANDLE HWND
Handle to main window or control.
Definition: common.h:407
WNDPROC
LRESULT(* WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Type of the window callback procedure.
Definition: window.h:4992
_CONTAINERINFO::user_proc
WNDPROC user_proc
Definition: scrollview.h:122
HDC
GHANDLE HDC
Handle to device context.
Definition: common.h:412
_CONTAINERINFO::controls
PCTRLDATA controls
Definition: scrollview.h:126
SVITEM_DRAWFUNC
void(* SVITEM_DRAWFUNC)(HWND hWnd, HSVITEM hsvi, HDC hdc, RECT *rcDraw)
Type of the scrollview item drawing callback procedure.
Definition: scrollview.h:199
DefaultContainerProc
MG_EXPORT LRESULT GUIAPI DefaultContainerProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
_svitem_operations::destroyItem
SVITEM_DESTROYFUNC destroyItem
Definition: scrollview.h:213
scrollview_get_item_adddata
MG_EXPORT DWORD scrollview_get_item_adddata(HSVITEM hsvi)
Use this to get additional data from scrollview item.
SVITEM_INITFUNC
int(* SVITEM_INITFUNC)(HWND hWnd, HSVITEM hsvi)
Type of the scrollview item initialization callback procedure.
Definition: scrollview.h:179
WPARAM
UINT_PTR WPARAM
A type definition for the first message paramter.
Definition: common.h:706
_SCROLLVIEWITEMINFO::addData
DWORD addData
Definition: scrollview.h:228
LRESULT
LONG_PTR LRESULT
Signed result of message processing.
Definition: common.h:583
GHANDLE
PVOID GHANDLE
General handle.
Definition: common.h:402
UINT
unsigned int UINT
A type definition for unsigned integer.
Definition: common.h:664
_svitem_operations::drawItem
SVITEM_DRAWFUNC drawItem
Definition: scrollview.h:215
_CTRLDATA
Definition: window.h:11525
_RECT
Definition: common.h:936
SVITEM_CMP
int(* SVITEM_CMP)(HSVITEM hsvi1, HSVITEM hsvi2)
Type of the scrollview item compare function.
Definition: scrollview.h:205
SVITEMOPS
struct _svitem_operations SVITEMOPS
PSVITEMOPS
SVITEMOPS * PSVITEMOPS
Definition: scrollview.h:218
_SCROLLVIEWITEMINFO
Definition: scrollview.h:221
BOOL
int BOOL
A type definition for boolean value.
Definition: common.h:343
SVITEMINFO
struct _SCROLLVIEWITEMINFO SVITEMINFO
PSVITEMINFO
SVITEMINFO * PSVITEMINFO
Definition: scrollview.h:231
SVITEM_DESTROYFUNC
void(* SVITEM_DESTROYFUNC)(HWND hWnd, HSVITEM hsvi)
Type of the scrollview item destroy callback procedure.
Definition: scrollview.h:188
scrollview_set_item_height
MG_EXPORT int scrollview_set_item_height(HWND hWnd, HSVITEM hsvi, int height)
Set the height of an item.
scrollview_get_item_index
MG_EXPORT int scrollview_get_item_index(HWND hWnd, HSVITEM hsvi)
To get item index.
PCONTAINERINFO
CONTAINERINFO * PCONTAINERINFO
Definition: scrollview.h:131
_svitem_operations
Definition: scrollview.h:208
mglist_get_item_adddata
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.
HSVITEM
GHANDLE HSVITEM
Definition: scrollview.h:109
_CONTAINERINFO::controlnr
int controlnr
Definition: scrollview.h:124
_SCROLLVIEWITEMINFO::nItem
int nItem
Definition: scrollview.h:224
_svitem_operations::initItem
SVITEM_INITFUNC initItem
Definition: scrollview.h:211
_CONTAINERINFO
Definition: scrollview.h:114
scrollview_is_item_selected
MG_EXPORT BOOL scrollview_is_item_selected(HSVITEM hsvi)
To decide whether an item is a selected.
scrollview_is_item_hilight
MG_EXPORT BOOL scrollview_is_item_hilight(HWND hWnd, HSVITEM hsvi)
To decide whether an item is the current hilighted item.
LPARAM
UINT_PTR LPARAM
A type definition for the second message paramter.
Definition: common.h:712