scrollview.h

Go to the documentation of this file.
00001 
00019 /*
00020  * $Id: scrollview.h 10690 2008-08-18 09:32:47Z weiym $
00021  *
00022  *             MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, 
00023  *                     pSOS, ThreadX, NuCleus, OSE, and Win32.
00024  *
00025  *             Copyright (C) 2002-2008 Feynman Software.
00026  *             Copyright (C) 1999-2002 Wei Yongming.
00027  */
00028 
00029 #ifndef _MGUI_CTRL_SCROLLVIEW_H
00030 #define _MGUI_CTRL_SCROLLVIEW_H
00031  
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif  /* __cplusplus */
00036 
00060 #define CTRL_SCROLLVIEW           ("scrollview")
00061 
00068 #define CTRL_SCROLLWND            ("scrollwnd")
00069 
00073 MG_EXPORT int GUIAPI DefaultContainerProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
00074 
00076 typedef GHANDLE HSVITEM;
00077 
00081 typedef struct _CONTAINERINFO
00082 {
00083 #if 0
00084     DWORD       dwStyle;                
00085     DWORD       dwExStyle;              
00086     int         x, y, w, h;             
00087 #endif
00088 
00089     WNDPROC     user_proc;              
00091     int         controlnr;              
00093     PCTRLDATA   controls;               
00095     DWORD       dwAddData;              
00096 } CONTAINERINFO;
00098 typedef CONTAINERINFO* PCONTAINERINFO;
00099 
00105 MG_EXPORT DWORD mglist_get_item_adddata (GHANDLE hi);
00106 
00111 MG_EXPORT DWORD scrollview_get_item_adddata (HSVITEM hsvi);
00112 
00117 MG_EXPORT int scrollview_get_item_index (HWND hWnd, HSVITEM hsvi);
00118 
00123 MG_EXPORT BOOL scrollview_is_item_hilight (HWND hWnd, HSVITEM hsvi);
00124 
00129 MG_EXPORT BOOL scrollview_is_item_selected (HSVITEM hsvi);
00130 
00135 MG_EXPORT int scrollview_set_item_height (HWND hWnd, HSVITEM hsvi, int height);
00136 
00146 typedef int  (*SVITEM_INITFUNC)    (HWND hWnd, HSVITEM hsvi);
00147 
00155 typedef void (*SVITEM_DESTROYFUNC) (HWND hWnd, HSVITEM hsvi);
00156 
00166 typedef void (*SVITEM_DRAWFUNC) (HWND hWnd, HSVITEM hsvi, HDC hdc, RECT *rcDraw);
00167 
00172 typedef int (*SVITEM_CMP) (HSVITEM hsvi1, HSVITEM hsvi2);
00173 
00175 typedef struct _svitem_operations
00176 {
00178     SVITEM_INITFUNC     initItem;     
00180     SVITEM_DESTROYFUNC  destroyItem;  
00182     SVITEM_DRAWFUNC     drawItem;     
00183 } SVITEMOPS;
00185 typedef SVITEMOPS* PSVITEMOPS;
00186 
00188 typedef struct _SCROLLVIEWITEMINFO
00189 {
00191     int        nItem;           
00193     int        nItemHeight;     
00195     DWORD      addData;         
00196 } SVITEMINFO;
00198 typedef SVITEMINFO* PSVITEMINFO;
00199 
00209 #define SVS_UPNOTIFY            0x0001L
00210 
00215 #define SVS_NOTIFY              0x0002L
00216 
00221 #define SVS_AUTOSORT            0x0004L
00222 
00227 #define SVS_LOOP                0x0008L
00228 
00255 #define SVM_ADDITEM             0xF300
00256 
00276 #define SVM_DELITEM             0xF301
00277 
00297 #define SVM_SETITEMDRAW         0xF302
00298 
00317 #define SVM_ADDCTRLS            0xF303
00318 
00337 #define SVM_SETCONTWIDTH        0xF306
00338 
00357 #define SVM_SETCONTHEIGHT       0xF307
00358 
00375 #define SVM_GETCTRL             0xF308
00376 
00390 #define SVM_RESETCONTENT        0xF309
00391 
00410 #define SVM_SETITEMOPS          0xF30a
00411 
00430 #define SVM_GETMARGINS            0xF30b
00431 
00451 #define SVM_SETMARGINS            0xF311
00452 
00466 #define SVM_GETLEFTMARGIN         0xF312
00467 
00481 #define SVM_GETTOPMARGIN          0xF313
00482 
00496 #define SVM_GETRIGHTMARGIN        0xF314
00497 
00511 #define SVM_GETBOTTOMMARGIN       0xF315
00512 
00526 #define SVM_GETVISIBLEWIDTH       0xF316
00527 
00541 #define SVM_GETVISIBLEHEIGHT      0xF317
00542 
00556 #define SVM_GETCONTWIDTH          0xF318
00557 
00571 #define SVM_GETCONTHEIGHT         0xF319
00572 
00593 #define SVM_SETCONTRANGE          0xF31a
00594 
00608 #define SVM_GETCONTENTX           0xF31b
00609 
00623 #define SVM_GETCONTENTY           0xF31c
00624 
00642 #define SVM_SETCONTPOS            0xF31d
00643 
00662 #define SVM_GETCURSEL             0xF31e
00663 
00681 #define SVM_SELECTITEM            0xF31f
00682 
00701 #define SVM_SHOWITEM              0xF320
00702 
00721 #define SVM_CHOOSEITEM            0xF321
00722 
00741 #define SVM_SETCURSEL             0xF322
00742 
00762 #define SVM_SETITEMINIT            0xF323
00763 
00783 #define SVM_SETITEMDESTROY        0xF324
00784 
00801 #define SVM_SETITEMCMP            0xF327
00802 
00818 #define SVM_MAKEPOSVISIBLE        0xF328
00819 
00836 #define SVM_SETCONTAINERPROC       0xF329
00837 
00851 #define SVM_GETFOCUSCHILD          0xF32a
00852 
00866 #define SVM_GETHSCROLLVAL           0xF32b
00867 
00881 #define SVM_GETVSCROLLVAL           0xF32c
00882 
00896 #define SVM_GETHSCROLLPAGEVAL       0xF32d
00897 
00911 #define SVM_GETVSCROLLPAGEVAL       0xF32e
00912 
00930 #define SVM_SETSCROLLVAL           0xF32f
00931 
00949 #define SVM_SETSCROLLPAGEVAL       0xF330
00950 
00966 #define SVM_SORTITEMS              0xF331
00967 
00974 #define SVM_GETITEMCOUNT           0xF332
00975 
00995 #define SVM_GETITEMADDDATA         0xF333
00996 
01015 #define SVM_SETITEMADDDATA         0xF334
01016 
01035 #define SVM_REFRESHITEM            0xF335
01036 
01055 #define SVM_SETITEMHEIGHT         0xF336
01056 
01067 #define SVM_GETFIRSTVISIBLEITEM   0xF337
01068 
01069 
01078 #define SVN_CLICKED             1
01079 
01081 #define SVN_SELCHANGED          2
01082 
01084 #define SVN_SELCHANGING                 4
01085 
01092 #ifdef __cplusplus
01093 }
01094 #endif  /* __cplusplus */
01095 
01096 #endif /* _MGUI_CTRL_SCROLLVIEW_H */
01097 
Generated on Thu Apr 7 15:58:31 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3