Home | All Classes | Grouped Classes | Index | Search

Class CL_ScrollBar

ScrollBar component More...

Derived from: CL_Component
Derived by: none
Group: GUI (Controls)

#include <ClanLib/gui.h>

Construction:

CL_ScrollBar

ScrollBar Constructor

Attributes:

is_vertical

Returns the orientation of the scroll bar.

is_tracking

Returns true if tracking is enabled, or false if tracking is disabled. Tracking is initially enabled. See set_tracking for more info on tracking.

get_min_value

Returns the current min value.

get_max_value

Returns the current max value.

get_range

Returns the range (delta max-min).

get_value

Returns the current range control value.

is_dragging_slider

Returns true if the user has clicked the mouse on the slider and is currently dragging it, or false if not.

is_fixed_length_slider

Returns true if this is a fixed length slider, false otherwise.

get_slider_rect

Returns the scroll bar slider rectangle.

get_min_slider_length

Returns the minimum size of the slider. Only usable in variable-length sliders.

Operations:

set_fixed_length_mode

Sets the length-mode of the slider.

set_slider_length

Sets the current size of the slider. Only usable in fixed-length sliders.

set_min_slider_length

Sets the minimum size of the slider. Only usable in variable-length sliders.

set_vertical

Sets the scroll bar orientation to vertical if enable is true, horizontal otherwise.

set_tracking

Enables scroll bar tracking if enable is true, or disables tracking if enable is false.

set_range

Sets the range between min_value and max_value. If max_value is smaller than min_value, max_value is set to min_value.

set_min_value

Sets the range to start from value. If current maximum value is less than the minvalue, maxvalue is set to minvalue.

set_max_value

Sets the range to end at value. If current maximum value is less than the minvalue, maxvalue is set to minvalue.

set_value

Sets the range controls value to value and forces it to be within the legal range.

increase

Increases current value with step.

decrease

Decreases current value with step.

Signals:

sig_value_changed

This signal is emitted when the scroll bar value has changed, with the new scroll bar value as an argument. See set_tracking() for specifics on this signal.

sig_slider_pressed

This signal is emitted when the user presses the slider with the mouse.

sig_slider_moved

This signal is emitted when the slider is moved by the user, with the new scroll bar value as an argument. This signal is emitted even when tracking is turned off.

sig_slider_released

This signal is emitted when the user releases the slider with the mouse.

Detailed description:

!group=GUI/Controls! !header=gui.h!


Questions or comments, write to the
ClanLib mailing list.