MiniGUI API Reference (MiniGUI-Processes)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Data Structures | Macros | Typedefs | Functions
scrollview.h File Reference

Go to the source code of this file.

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...
 
#define SVS_UPNOTIFY   0x0001L
 Sends the notification messages to parent window when the keys is up. More...
 
#define SVS_NOTIFY   0x0002L
 reserved. More...
 
#define SVS_AUTOSORT   0x0004L
 Automatically sorts strings entered in the scrollview control. More...
 
#define SVS_LOOP   0x0008L
 Loops the item automatically when user select item with down or up key. More...
 
#define SVM_ADDITEM   0xF300
 Adds an item in the scrollview. More...
 
#define SVM_DELITEM   0xF301
 Deletes an item from the scrollview. More...
 
#define SVM_SETITEMDRAW   0xF302
 Set the drawing operation of an item. More...
 
#define SVM_ADDCTRLS   0xF303
 Adds controls to the scrollview. More...
 
#define SVM_SETCONTWIDTH   0xF306
 Set the scrollview content area (scrollable area) width. More...
 
#define SVM_SETCONTHEIGHT   0xF307
 Set the scrollview content area (scrollable area) height. More...
 
#define SVM_GETCTRL   0xF308
 Get the control handle in the scrollview window by control id. More...
 
#define SVM_RESETCONTENT   0xF309
 Clears all the controls and the items added to the scrollview window. More...
 
#define SVM_SETITEMOPS   0xF30a
 Set the item operations of the items in the scrollview. More...
 
#define SVM_GETMARGINS   0xF30b
 Get the margin values of the scrollview. More...
 
#define SVM_SETMARGINS   0xF311
 Set the margin values of the scrollview. More...
 
#define SVM_GETLEFTMARGIN   0xF312
 Get the left margin value of the scrollview. More...
 
#define SVM_GETTOPMARGIN   0xF313
 Get the top margin value of the scrollview. More...
 
#define SVM_GETRIGHTMARGIN   0xF314
 Get the right margin value of the scrollview. More...
 
#define SVM_GETBOTTOMMARGIN   0xF315
 Get the bottom margin value of the scrollview. More...
 
#define SVM_GETVISIBLEWIDTH   0xF316
 Get the width of the visible content area. More...
 
#define SVM_GETVISIBLEHEIGHT   0xF317
 Get the height of the visible content area. More...
 
#define SVM_GETCONTWIDTH   0xF318
 Get the width of the content area. More...
 
#define SVM_GETCONTHEIGHT   0xF319
 Get the height of the content area. More...
 
#define SVM_SETCONTRANGE   0xF31a
 Set the width and height of the content area. More...
 
#define SVM_GETCONTENTX   0xF31b
 Get the content x offset in the viewport. More...
 
#define SVM_GETCONTENTY   0xF31c
 Get the content y offset in the viewport. More...
 
#define SVM_SETCONTPOS   0xF31d
 Set the content offset position in the viewport. More...
 
#define SVM_GETCURSEL   0xF31e
 Get the index of the current hilighted scrollview item. More...
 
#define SVM_SELECTITEM   0xF31f
 Selects or unselects an item in the scrollview item. More...
 
#define SVM_SHOWITEM   0xF320
 Makes an item visible in the scrollview item. More...
 
#define SVM_CHOOSEITEM   0xF321
 Makes an item selected and visible in the scrollview item. More...
 
#define SVM_SETCURSEL   0xF322
 Makes an item as the current hilighted item in the scrollview item. More...
 
#define SVM_SETITEMINIT   0xF323
 Set the init operation of the items in the scrollview. More...
 
#define SVM_SETITEMDESTROY   0xF324
 Set the destroy operation of the items in the scrollview. More...
 
#define SVM_SETITEMCMP   0xF327
 Set the item compare function. More...
 
#define SVM_MAKEPOSVISIBLE   0xF328
 Makes a position in the content area visible. More...
 
#define SVM_SETCONTAINERPROC   0xF329
 Set the window procedure of the container window in the scrollview. More...
 
#define SVM_GETFOCUSCHILD   0xF32a
 Get the focus control in the scrollview. More...
 
#define SVM_GETHSCROLLVAL   0xF32b
 Get the horizontal scroll value. More...
 
#define SVM_GETVSCROLLVAL   0xF32c
 Get the vertical scroll value. More...
 
#define SVM_GETHSCROLLPAGEVAL   0xF32d
 Get the horizontal page scroll value. More...
 
#define SVM_GETVSCROLLPAGEVAL   0xF32e
 Get the vertical page scroll value. More...
 
#define SVM_SETSCROLLVAL   0xF32f
 Set the horizontal and vertical scroll value. More...
 
#define SVM_SETSCROLLPAGEVAL   0xF330
 Set the horizontal and vertical page value. More...
 
#define SVM_SORTITEMS   0xF331
 Sorts the items according to a specified comparision function. More...
 
#define SVM_GETITEMCOUNT   0xF332
 Get the total number of the items. More...
 
#define SVM_GETITEMADDDATA   0xF333
 Get the additional data of the item. More...
 
#define SVM_SETITEMADDDATA   0xF334
 Set the additional data of the item. More...
 
#define SVM_REFRESHITEM   0xF335
 Refresh the item. More...
 
#define SVM_SETITEMHEIGHT   0xF336
 Set the height of an item. More...
 
#define SVM_GETFIRSTVISIBLEITEM   0xF337
 Get the index of the first visible item. More...
 
#define SVN_CLICKED   1
 
#define SVN_SELCHANGED   2
 
#define SVN_SELCHANGING   4
 

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

Author
Wei Yongming vince.nosp@m.nt@m.nosp@m.inigu.nosp@m.i.or.nosp@m.g
Date
2001/12/29
   This file is part of MiniGUI, a mature cross-platform windowing
   and Graphics User Interface (GUI) support system for embedded systems
   and smart IoT devices.

   Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
   Copyright (C) 1998~2002, WEI Yongming

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.

   Or,

   As this program is a library, any link to this program must follow
   GNU General Public License version 3 (GPLv3). If you cannot accept
   GPLv3, you need to be licensed from FMSoft.

   If you have got a commercial license of this program, please use it
   under the terms and conditions of the commercial license.

   For more information about the commercial license, please refer to
   <http://www.minigui.com/blog/minigui-licensing-policy/>.

Definition in file scrollview.h.