Developer

API Reference

IWidget_Scroll()

Brew Release
Brew MP 1.0.2
See Also
Error Codes IWidget IWidget_ScrollHV IWidget_SetIncrement IWidget_GetIncrement IWidget_SetOffsetX IWidget_SetOffsetY IWidget_GetOffsetX IWidget_GetOffsetY IWidget_GetStartLine IWidget_GetNextLine IWidget_GetPreviousLine IWidget_GetCaretPos
Description

This function is used to scroll a widget in various ways. Using this function, it is possible to scroll a supporting widget in the horizontal direction either a single 'item' at at time, a single 'page' at a time, or to a specified offset on the widget. For most widgets, an 'item' corresponds to a single pixel. This is often customizable using the increment property, specified through IWidget_SetIncrement. The position based scroll types are similar to the IWidget_SetOffsetX and IWidget_SetOffsetY functions; however, they operate on abstract items rather than directly on pixels in some cases, such as characters and/or lines in a text widget.
Parameters
  • pif
    []:
    [in] Pointer to the IWidget interface object.
  • nScrollType
    []:
    [in] The scroll type to use.
  • nOffset
    []:
    [in] Used only in the positional scrolls, specifies the offset to use.
Interface
Prototype
   int IWidget_Scroll(IWidget *pif, uint16 nScrollType, int32 nOffset);
Return
AEE_SUCCESS : The widget was able to scroll to the specified position or amount. AEE_EFAILED : The widget was unable to scroll to the specified position or amount.
Side Effect
If successful, the widget will scroll based on the scroll type and possibly offset.
Comment
The nScrollType can be any one of the following constants:
- WSCROLL_UP: Scrolls the widget vertically upwards by one item.
- WSCROLL_DOWN: Scrolls the widget vertically downwards by one item.
- WSCROLL_PAGEUP: Scrolls the widget vertically upwards by one page.
- WSCROLL_PAGEDOWN: Scrolls the widget vertically downwards by one page.
- WSCROLL_VPOSITION: Scrolls the widget vertically to the specified position.
- WSCROLL_VPOSITION_UP: Scrolls the widget vertically upwards by specified pixels.
- WSCROLL_VPOSITION_DOWN: Scrolls the widget vertically downwards by specified pixels.
- WSCROLL_LEFT: Scrolls the widget horizontally to the left by one item.
- WSCROLL_RIGHT: Scrolls the widget horizontally to the right by one item.
- WSCROLL_PAGELEFT: Scrolls the widget horizontally to the left by one page.
- WSCROLL_PAGERIGHT: Scrolls the widget horizontally to the right by one page.
- WSCROLL_HPOSITION: Scrolls the widget horizontally to the specified position.
- WSCROLL_HPOSITION_LEFT: Scrolls the widget horizontally to the left by specified pixels.
- WSCROLL_HPOSITION_RIGHT: Scrolls the widget horizontally to the right by specified pixels.


A final option, WSCROLL_HVPOSITION is instead specified by using the IWidget_ScrollHV function.
  • Follow