MiniGUI API Reference (MiniGUI-Standalone)  v3.2.0
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
 Sets the drawing operation of an item. More...
 
#define SVM_ADDCTRLS   0xF303
 Adds controls to the scrollview. More...
 
#define SVM_SETCONTWIDTH   0xF306
 Sets the scrollview content area (scrollable area) width. More...
 
#define SVM_SETCONTHEIGHT   0xF307
 Sets the scrollview content area (scrollable area) height. More...
 
#define SVM_GETCTRL   0xF308
 Gets 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
 Sets the item operations of the items in the scrollview. More...
 
#define SVM_GETMARGINS   0xF30b
 Gets the margin values of the scrollview. More...
 
#define SVM_SETMARGINS   0xF311
 Sets the margin values of the scrollview. More...
 
#define SVM_GETLEFTMARGIN   0xF312
 Gets the left margin value of the scrollview. More...
 
#define SVM_GETTOPMARGIN   0xF313
 Gets the top margin value of the scrollview. More...
 
#define SVM_GETRIGHTMARGIN   0xF314
 Gets the right margin value of the scrollview. More...
 
#define SVM_GETBOTTOMMARGIN   0xF315
 Gets the bottom margin value of the scrollview. More...
 
#define SVM_GETVISIBLEWIDTH   0xF316
 Gets the width of the visible content area. More...
 
#define SVM_GETVISIBLEHEIGHT   0xF317
 Gets the height of the visible content area. More...
 
#define SVM_GETCONTWIDTH   0xF318
 Gets the width of the content area. More...
 
#define SVM_GETCONTHEIGHT   0xF319
 Gets the height of the content area. More...
 
#define SVM_SETCONTRANGE   0xF31a
 Sets the width and height of the content area. More...
 
#define SVM_GETCONTENTX   0xF31b
 Gets the content x offset in the viewport. More...
 
#define SVM_GETCONTENTY   0xF31c
 Gets the content y offset in the viewport. More...
 
#define SVM_SETCONTPOS   0xF31d
 Sets the content offset position in the viewport. More...
 
#define SVM_GETCURSEL   0xF31e
 Gets 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
 Sets the init operation of the items in the scrollview. More...
 
#define SVM_SETITEMDESTROY   0xF324
 Sets the destroy operation of the items in the scrollview. More...
 
#define SVM_SETITEMCMP   0xF327
 Sets the item compare function. More...
 
#define SVM_MAKEPOSVISIBLE   0xF328
 Makes a position in the content area visible. More...
 
#define SVM_SETCONTAINERPROC   0xF329
 Sets the window procedure of the container window in the scrollview. More...
 
#define SVM_GETFOCUSCHILD   0xF32a
 Gets the focus control in the scrollview. More...
 
#define SVM_GETHSCROLLVAL   0xF32b
 Gets the horizontal scroll value. More...
 
#define SVM_GETVSCROLLVAL   0xF32c
 Gets the vertical scroll value. More...
 
#define SVM_GETHSCROLLPAGEVAL   0xF32d
 Gets the horizontal page scroll value. More...
 
#define SVM_GETVSCROLLPAGEVAL   0xF32e
 Gets the vertical page scroll value. More...
 
#define SVM_SETSCROLLVAL   0xF32f
 Sets the horizontal and vertical scroll value. More...
 
#define SVM_SETSCROLLPAGEVAL   0xF330
 Sets 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
 Gets the total number of the items. More...
 
#define SVM_GETITEMADDDATA   0xF333
 Gets the additional data of the item. More...
 
#define SVM_SETITEMADDDATA   0xF334
 Sets the additional data of the item. More...
 
#define SVM_REFRESHITEM   0xF335
 Refresh the item. More...
 
#define SVM_SETITEMHEIGHT   0xF336
 Sets the height of an item. More...
 
#define SVM_GETFIRSTVISIBLEITEM   0xF337
 Gets 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)
 Sets 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/en/about/licensing-policy/>.

Definition in file scrollview.h.