class scrollbar : public frame
Usually, a scrollbar is used together with a window which visualizes data that is too large for that window. The scrollbar enables the user to scroll the data through the window. The slider within the scrollbar represents the portion of the data which is visible in that window. The figure below shows how the dimensions of the scrollbar are defined:
Two sizes are involved in positioning the slider in the scrollbar:
The sizes of the scrollbar and the slider, as well as the position of the slider are defined in logical coordinates, rather than the actual number of pixels of the scrollbar itself. The logical coordinates correspond to the data that is actually being viewed. This may be a number of pixels, but may also be the number of items in a list or the number of lines in a text document. The scrollbar object maps these logical coordinates to physical coordinates on the workstation's screen. Since the bar_size represents the total size of the data being viewed, this size dictates the ratio for the other sizes.
Member Functions | |
---|---|
scrollbar | Construct a scrollbar object |