📄 scrollview.h
字号:
*
* \return Width of the content area on success, otherwise -1.
*/
#define SVM_GETCONTWIDTH 0xF318
/**
* \def SVM_GETCONTHEIGHT
* \brief Gets the height of the content area.
*
* \code
* SVM_GETCONTHEIGHT
*
* wParam = 0;
* lParam = 0;
* \endcode
*
* \return Height of the content area on success, otherwise -1.
*/
#define SVM_GETCONTHEIGHT 0xF319
/**
* \def SVM_SETCONTRANGE
* \brief Sets the width and height of the content area.
*
* If you want to change width and height, give a value large than zero.
* If you give -1, this value will remain untouched.
*
* \code
* SVM_SETCONTRANGE
* int cont_w, cont_h;
*
* wParam = (WPARAM)cont_w;
* lParam = (LPARAM)cont_h;
* \endcode
*
* \param cont_w Width of the content area.
* \param cont_h Height of the content area.
*
* \return 0 on success, otherwise -1.
*/
#define SVM_SETCONTRANGE 0xF31a
/**
* \def SVM_GETCONTENTX
* \brief Gets the content x offset in the viewport.
*
* \code
* SVM_GETCONTENTX
*
* wParam = 0;
* lParam = 0;
* \endcode
*
* \return Content x coordinate in the viewport on success, otherwise -1.
*/
#define SVM_GETCONTENTX 0xF31b
/**
* \def SVM_GETCONTENTY
* \brief Gets the content y offset in the viewport.
*
* \code
* SVM_GETCONTENTY
*
* wParam = 0;
* lParam = 0;
* \endcode
*
* \return Content y coordinate in the viewport on success, otherwise -1.
*/
#define SVM_GETCONTENTY 0xF31c
/**
* \def SVM_SETCONTPOS
* \brief Sets the content offset position in the viewport.
*
* \code
* SVM_SETCONTPOS
* int cont_x, cont_y;
*
* wParam = (WPARAM)cont_x;
* lParam = (LPARAM)cont_y;
* \endcode
*
* \param cont_x New content x offset
* \param cont_y New content y offset
*
* \return 0 on success, otherwise -1.
*/
#define SVM_SETCONTPOS 0xF31d
/**
* \def SVM_GETCURSEL
* \brief Gets the index of the current hilighted scrollview item.
*
* An application sends an this message to a scrollview window to get the index of
* the currently selected item, if there is one, in a single-selection scrollview.
* For multiple-selection case, appliction send this message to a scrollview
* to get the index of the current highlighted item.
*
* \code
* SVM_GETCURSEL
*
* wParam = 0;
* lParam = 0;
* \endcode
*
* \return Index of current hilighted item.
*/
#define SVM_GETCURSEL 0xF31e
/**
* \def SVM_SELECTITEM
* \brief Selects or unselects an item in the scrollview item.
*
* \code
* SVM_SELECTITEM
* int nItem;
*
* wParam = (WPARAM)nItem;
* lParam = (LPARAM)bSel;
* \endcode
*
* \param nItem Index of the item to select or unselect.
* \param bSel To select or unselect.
*
* \return 0 on success, otherwise -1.
*/
#define SVM_SELECTITEM 0xF31f
/**
* \def SVM_SHOWITEM
* \brief Makes an item visible in the scrollview item.
*
* \code
* SVM_SHOWITEM
* int nItem;
* HSVITEM hsvi;
*
* wParam = (WPARAM)nItem;
* lParam = (LPARAM)hsvi;
* \endcode
*
* \param nItem Item index. Be useful when hsvi is zero.
* \param hsvi Item handle.
*
* \return 0 on success, otherwise -1.
*/
#define SVM_SHOWITEM 0xF320
/**
* \def SVM_CHOOSEITEM
* \brief Makes an item selected and visible in the scrollview item.
*
* \code
* SVM_CHOOSEITEM
* int nItem;
* HSVITEM hsvi;
*
* wParam = (WPARAM)nItem;
* lParam = (LPARAM)hsvi;
* \endcode
*
* \param nItem Item index. Be useful when hsvi is zero.
* \param hsvi Item handle.
*
* \return 0 on success, otherwise -1.
*/
#define SVM_CHOOSEITEM 0xF321
/**
* \def SVM_SETCURSEL
* \brief Makes an item as the current hilighted item in the scrollview item.
*
* \code
* SVM_SETCURSEL
* int nItem;
* BOOL bVisible;
*
* wParam = (WPARAM)nItem;
* lParam = (LPARAM)bVisible;
* \endcode
*
* \param nitem Item index.
* \param bVisible If bVisible is TRUE, this item wille be made visible.
*
* \return old hilighted item index on success, otherwise -1.
*/
#define SVM_SETCURSEL 0xF322
/**
* \def SVM_SETITEMINIT
* \brief Sets the init operation of the items in the scrollview.
*
* Normally item operations should be set before adding items.
* The initialization callback function will be called when adding an item.
*
* \code
* SVM_SETITEMINIT
* SVITEM_INITFUNC *pfn;
*
* wParam = 0;
* lParam = (LPARAM)pfn;
* \endcode
*
* \param pfn Item init operation function
*
* \return Old function on success; otherwise NULL.
*/
#define SVM_SETITEMINIT 0xF323
/**
* \def SVM_SETITEMDESTROY
* \brief Sets the destroy operation of the items in the scrollview.
*
* Normally item operations should be set before adding items.
* The destroy callback function will be called when deleting an item
*
* \code
* SVM_SETITEMDESTROY
* SVITEM_DESTROYFUNC *pfn;
*
* wParam = 0;
* lParam = (LPARAM)pfn;
* \endcode
*
* \param pfn Item destroy operation function
*
* \return Old function on success; otherwise NULL.
*/
#define SVM_SETITEMDESTROY 0xF324
/**
* \def SVM_SETITEMCMP
* \brief Sets the item compare function.
*
* \code
* SVM_SETITEMCMP
* SVITEM_CMP *pfn;
*
* wParam = 0;
* lParam = (LPARAM)pfn;
* \endcode
*
* \param pfn New item compare function
*
* \return Old function on success; otherwise NULL.
*/
#define SVM_SETITEMCMP 0xF327
/**
* \def SVM_MAKEPOSVISIBLE
* \brief Makes a position in the content area visible.
*
* \code
* SVM_MAKEPOSVISIBLE
* int pos_x, pos_y;
*
* wParam = (WPARAM)pos_x;
* lParam = (LPARAM)pos_y;
* \endcode
*
* \param pos_x X coordinate of the position to be made visible
* \param pos_y Y coordinate of the position to be made visible
*/
#define SVM_MAKEPOSVISIBLE 0xF328
/**
* \def SVM_SETCONTAINERPROC
* \brief Sets the window procedure of the container window in the scrollview.
*
* \code
* SVM_SETCONTAINERPROC
* WNDPROC pfn;
*
* wParam = 0;
* lParam = (LPARAM)pfn;
* \endcode
*
* \param pfn New container procedure function.
*
* \return Old container procedure.
*/
#define SVM_SETCONTAINERPROC 0xF329
/**
* \def SVM_GETFOCUSCHILD
* \brief Gets the focus control in the scrollview.
*
* \code
* SVM_GETFOCUSCHILD
*
* wParam = 0;
* lParam = 0;
* \endcode
*
* \return Handle of the focus control.
*/
#define SVM_GETFOCUSCHILD 0xF32a
/**
* \def SVM_GETHSCROLLVAL
* \brief Gets the horizontal scroll value.
*
* \code
* SVM_GETHSCROLLVAL
*
* wParam = 0;
* lParam = 0;
* \endcode
*
* \return Current horizontal scroll value.
*/
#define SVM_GETHSCROLLVAL 0xF32b
/**
* \def SVM_GETVSCROLLVAL
* \brief Gets the vertical scroll value.
*
* \code
* SVM_GETVSCROLLVAL
*
* wParam = 0;
* lParam = 0;
* \endcode
*
* \return Current vertical scroll value.
*/
#define SVM_GETVSCROLLVAL 0xF32c
/**
* \def SVM_GETHSCROLLPAGEVAL
* \brief Gets the horizontal page scroll value.
*
* \code
* SVM_GETHSCROLLPAGEVAL
*
* wParam = 0;
* lParam = 0;
* \endcode
*
* \return Current horizontal page scroll value.
*/
#define SVM_GETHSCROLLPAGEVAL 0xF32d
/**
* \def SVM_GETVSCROLLPAGEVAL
* \brief Gets the vertical page scroll value.
*
* \code
* SVM_GETVSCROLLPAGEVAL
*
* wParam = 0;
* lParam = 0;
* \endcode
*
* \return Current vertical page scroll value.
*/
#define SVM_GETVSCROLLPAGEVAL 0xF32e
/**
* \def SVM_SETSCROLLVAL
* \brief Sets the horizontal and vertical scroll value.
*
* \code
* SVM_SETSCROLLVAL
* int hval, vval;
*
* wParam = (WPARAM)hval;
* lParam = (LPARAM)vval;
* \endcode
*
* \param hval New horizontal scroll value.
* \param vval New vertical scroll value.
*
* \return Zero.
*/
#define SVM_SETSCROLLVAL 0xF32f
/**
* \def SVM_SETSCROLLPAGEVAL
* \brief Sets the horizontal and vertical page value.
*
* \code
* SVM_SETSCROLLPAGEVAL
* int hval, vval;
*
* wParam = (WPARAM)hval;
* lParam = (WPARAM)vval;
* \endcode
*
* \param hval New horizontal page value.
* \param vval New vertical page value.
*
* \return Zero.
*/
#define SVM_SETSCROLLPAGEVAL 0xF330
/**
* \def SVM_SORTITEMS
* \brief Sorts the items according to a specified comparision function.
*
* \code
* SVM_SORTITEMS
* SVITEM_CMP pfn;
*
* lParam = pfn;
* \endcode
*
* \param pfn Comparision function.
*
* \return Zero.
*/
#define SVM_SORTITEMS 0xF331
/**
* \def SVM_GETITEMCOUNT
* \brief Gets the total number of the items.
*
* \return Number of the items.
*/
#define SVM_GETITEMCOUNT 0xF332
/**
* \def SVM_GETITEMADDDATA
* \brief Gets the additional data of the item
*
* \code
* SVM_GETITEMADDDATA
* int nItem;
* HSVITEM hsvi;
*
* wParam = (WPARAM)nItem;
* lParam = (LPARAM)hsvi;
* \endcode
*
* \param nItem Scrollview item index to access.
* If hsvi is not zero, nItem will be ignored.
* \param hsvi Scrollview item handle to access.
*
* \return Item additional data.
*/
#define SVM_GETITEMADDDATA 0xF333
/**
* \def SVM_SETITEMADDDATA
* \brief Sets the additional data of the item
*
* \code
* SVM_SETITEMADDDATA
* int nitem;
* int addData;
*
* wParam = (WPARAM)nitem;
* lParam = (LPARAM)addData;
* \endcode
*
* \param nitem Item index.
* \param addData Additional data
*
* \return Old item additional data.
*/
#define SVM_SETITEMADDDATA 0xF334
/**
* \def SVM_REFRESHITEM
* \brief Refresh the item
*
* \code
* SVM_REFRESHITEM
* int nitem;
* HSVITEM hsvi;
*
* wParam = (WPARAM)nitem;
* lParam = (LPARAM)hsvi;
* \endcode
*
* \param nitem Item index. If hsvi is not zero, nItem will be ignored.
* \param hsvi Item handle.
*
* \return Returns 0.
*/
#define SVM_REFRESHITEM 0xF335
/**
* \def SVM_SETITEMHEIGHT
* \brief Sets the height of an item
*
* \code
* SVM_SETITEMHEIGHT
* int nitem;
* int height;
*
* wParam = (WPARAM)nitem;
* lParam = (LPARAM)height;
* \endcode
*
* \param nitem Item index.
* \param height New height of the item
*
* \return Old item height.
*/
#define SVM_SETITEMHEIGHT 0xF336
/**
* \def SVM_GETFIRSTVISIBLEITEM
* \brief Gets the index of the first visible item
*
* \code
* SVM_GETFIRSTVISIBLEITEM
* \endcode
*
* \return Item index.
*/
#define SVM_GETFIRSTVISIBLEITEM 0xF337
/** @} end of ctrl_scrollview_msgs */
/**
* \defgroup ctrl_scrollview_ncs Notification codes of scrollview control
* @{
*/
/** Indicates clicking on the item */
#define SVN_CLICKED 1
/** Indicates the hilighted item changed */
#define SVN_SELCHANGED 2
/** Indicates the hilighted item changing */
#define SVN_SELCHANGING 4
/** @} end of ctrl_scrollview_ncs */
/** @} end of ctrl_scrollview */
/** @} end of controls */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _MGUI_CTRL_SCROLLVIEW_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -