📄 scrollview.h
字号:
#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 = cont_w; * 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 Gets the content offset position in the viewport. * * \code * SVM_SETCONTPOS * int cont_x, cont_y; * * wParam = cont_x; * 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 = nItem; * 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 = nItem; * 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 = nItem; * 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 = nItem; * 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 = pos_x; * 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 = hval; * 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 = hval; * lParam = 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 = nitem; * 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 = nitem; * lParam = hsvi; * \endcode * * \param nitem item index. If hsvi is not zero, nItem will be ignored. * \param hsvi item handle. * * \return 0. */#define SVM_REFRESHITEM 0xF335/** * \def SVM_SETITEMHEIGHT * \brief Sets the height of an item * * \code * SVM_SETITEMHEIGHT * int nitem; * int height; * * wParam = nitem; * 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 * * \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 /** @} 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 + -