MiniGUI API Reference (MiniGUI-Standalone)  v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
scrollview.h
Go to the documentation of this file.
1 
43 /*
44  * $Id: scrollview.h 10690 2008-08-18 09:32:47Z weiym $
45  *
46  * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
47  * pSOS, ThreadX, NuCleus, OSE, and Win32.
48  */
49 
50 #ifndef _MGUI_CTRL_SCROLLVIEW_H
51 #define _MGUI_CTRL_SCROLLVIEW_H
52 
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif /* __cplusplus */
57 
81 #define CTRL_SCROLLVIEW ("scrollview")
82 
89 #define CTRL_SCROLLWND ("scrollwnd")
90 
94 MG_EXPORT LRESULT GUIAPI DefaultContainerProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
95 
97 typedef GHANDLE HSVITEM;
98 
102 typedef struct _CONTAINERINFO
103 {
104 #if 0
105  DWORD dwStyle;
106  DWORD dwExStyle;
107  int x, y, w, h;
108 #endif
109 
112  int controlnr;
117 } CONTAINERINFO;
120 
126 MG_EXPORT DWORD mglist_get_item_adddata (GHANDLE hi);
127 
132 MG_EXPORT DWORD scrollview_get_item_adddata (HSVITEM hsvi);
133 
138 MG_EXPORT int scrollview_get_item_index (HWND hWnd, HSVITEM hsvi);
139 
144 MG_EXPORT BOOL scrollview_is_item_hilight (HWND hWnd, HSVITEM hsvi);
145 
150 MG_EXPORT BOOL scrollview_is_item_selected (HSVITEM hsvi);
151 
156 MG_EXPORT int scrollview_set_item_height (HWND hWnd, HSVITEM hsvi, int height);
157 
167 typedef int (*SVITEM_INITFUNC) (HWND hWnd, HSVITEM hsvi);
168 
176 typedef void (*SVITEM_DESTROYFUNC) (HWND hWnd, HSVITEM hsvi);
177 
187 typedef void (*SVITEM_DRAWFUNC) (HWND hWnd, HSVITEM hsvi, HDC hdc, RECT *rcDraw);
188 
193 typedef int (*SVITEM_CMP) (HSVITEM hsvi1, HSVITEM hsvi2);
194 
196 typedef struct _svitem_operations
197 {
204 } SVITEMOPS;
207 
209 typedef struct _SCROLLVIEWITEMINFO
210 {
212  int nItem;
217 } SVITEMINFO;
220 
230 #define SVS_UPNOTIFY 0x0001L
231 
236 #define SVS_NOTIFY 0x0002L
237 
242 #define SVS_AUTOSORT 0x0004L
243 
248 #define SVS_LOOP 0x0008L
249 
276 #define SVM_ADDITEM 0xF300
277 
297 #define SVM_DELITEM 0xF301
298 
318 #define SVM_SETITEMDRAW 0xF302
319 
338 #define SVM_ADDCTRLS 0xF303
339 
358 #define SVM_SETCONTWIDTH 0xF306
359 
378 #define SVM_SETCONTHEIGHT 0xF307
379 
396 #define SVM_GETCTRL 0xF308
397 
411 #define SVM_RESETCONTENT 0xF309
412 
431 #define SVM_SETITEMOPS 0xF30a
432 
451 #define SVM_GETMARGINS 0xF30b
452 
472 #define SVM_SETMARGINS 0xF311
473 
487 #define SVM_GETLEFTMARGIN 0xF312
488 
502 #define SVM_GETTOPMARGIN 0xF313
503 
517 #define SVM_GETRIGHTMARGIN 0xF314
518 
532 #define SVM_GETBOTTOMMARGIN 0xF315
533 
547 #define SVM_GETVISIBLEWIDTH 0xF316
548 
562 #define SVM_GETVISIBLEHEIGHT 0xF317
563 
577 #define SVM_GETCONTWIDTH 0xF318
578 
592 #define SVM_GETCONTHEIGHT 0xF319
593 
614 #define SVM_SETCONTRANGE 0xF31a
615 
629 #define SVM_GETCONTENTX 0xF31b
630 
644 #define SVM_GETCONTENTY 0xF31c
645 
663 #define SVM_SETCONTPOS 0xF31d
664 
683 #define SVM_GETCURSEL 0xF31e
684 
702 #define SVM_SELECTITEM 0xF31f
703 
722 #define SVM_SHOWITEM 0xF320
723 
742 #define SVM_CHOOSEITEM 0xF321
743 
762 #define SVM_SETCURSEL 0xF322
763 
783 #define SVM_SETITEMINIT 0xF323
784 
804 #define SVM_SETITEMDESTROY 0xF324
805 
822 #define SVM_SETITEMCMP 0xF327
823 
839 #define SVM_MAKEPOSVISIBLE 0xF328
840 
857 #define SVM_SETCONTAINERPROC 0xF329
858 
872 #define SVM_GETFOCUSCHILD 0xF32a
873 
887 #define SVM_GETHSCROLLVAL 0xF32b
888 
902 #define SVM_GETVSCROLLVAL 0xF32c
903 
917 #define SVM_GETHSCROLLPAGEVAL 0xF32d
918 
932 #define SVM_GETVSCROLLPAGEVAL 0xF32e
933 
951 #define SVM_SETSCROLLVAL 0xF32f
952 
970 #define SVM_SETSCROLLPAGEVAL 0xF330
971 
987 #define SVM_SORTITEMS 0xF331
988 
995 #define SVM_GETITEMCOUNT 0xF332
996 
1016 #define SVM_GETITEMADDDATA 0xF333
1017 
1036 #define SVM_SETITEMADDDATA 0xF334
1037 
1056 #define SVM_REFRESHITEM 0xF335
1057 
1076 #define SVM_SETITEMHEIGHT 0xF336
1077 
1088 #define SVM_GETFIRSTVISIBLEITEM 0xF337
1089 
1090 
1099 #define SVN_CLICKED 1
1100 
1102 #define SVN_SELCHANGED 2
1103 
1105 #define SVN_SELCHANGING 4
1106 
1113 #ifdef __cplusplus
1114 }
1115 #endif /* __cplusplus */
1116 
1117 #endif /* _MGUI_CTRL_SCROLLVIEW_H */
1118 
struct _svitem_operations SVITEMOPS
int BOOL
A type definition for boolean value.
Definition: common.h:294
SVITEMINFO * PSVITEMINFO
Definition: scrollview.h:219
LRESULT(* WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Type of the window callback procedure.
Definition: window.h:4964
SVITEM_INITFUNC initItem
Definition: scrollview.h:199
struct _CONTAINERINFO CONTAINERINFO
Definition: common.h:843
SVITEMOPS * PSVITEMOPS
Definition: scrollview.h:206
SVITEM_DESTROYFUNC destroyItem
Definition: scrollview.h:201
GHANDLE HDC
Handle to device context.
Definition: common.h:363
MG_EXPORT int scrollview_set_item_height(HWND hWnd, HSVITEM hsvi, int height)
Sets the height of an item.
GHANDLE HSVITEM
Definition: scrollview.h:97
void(* SVITEM_DESTROYFUNC)(HWND hWnd, HSVITEM hsvi)
Type of the scrollview item destroy callback procedure.
Definition: scrollview.h:176
SVITEM_DRAWFUNC drawItem
Definition: scrollview.h:203
MG_EXPORT BOOL scrollview_is_item_selected(HSVITEM hsvi)
To decide whether an item is a selected.
GHANDLE HWND
Handle to main window or control.
Definition: common.h:358
MG_EXPORT DWORD scrollview_get_item_adddata(HSVITEM hsvi)
Use this to get additional data from scrollview item.
CONTAINERINFO * PCONTAINERINFO
Definition: scrollview.h:119
PVOID GHANDLE
General handle.
Definition: common.h:353
UINT_PTR LPARAM
A type definition for the second message paramter.
Definition: common.h:642
int(* SVITEM_CMP)(HSVITEM hsvi1, HSVITEM hsvi2)
Type of the scrollview item compare function.
Definition: scrollview.h:193
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...
WNDPROC user_proc
Definition: scrollview.h:110
PCTRLDATA controls
Definition: scrollview.h:114
struct _SCROLLVIEWITEMINFO SVITEMINFO
int(* SVITEM_INITFUNC)(HWND hWnd, HSVITEM hsvi)
Type of the scrollview item initialization callback procedure.
Definition: scrollview.h:167
MG_EXPORT BOOL scrollview_is_item_hilight(HWND hWnd, HSVITEM hsvi)
To decide whether an item is the current hilighted item.
UINT_PTR WPARAM
A type definition for the first message paramter.
Definition: common.h:636
MG_EXPORT LRESULT GUIAPI DefaultContainerProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
Definition: common.h:555
LONG_PTR LRESULT
Signed result of message processing.
Definition: common.h:534
unsigned int UINT
A type definition for unsigned integer.
Definition: common.h:594
MG_EXPORT int scrollview_get_item_index(HWND hWnd, HSVITEM hsvi)
To get item index.
void(* SVITEM_DRAWFUNC)(HWND hWnd, HSVITEM hsvi, HDC hdc, RECT *rcDraw)
Type of the scrollview item drawing callback procedure.
Definition: scrollview.h:187