Etk
Main Page Object Hierarchy Data Structures Related Pages
Etk

Etk_Scrollbar


Detailed Description

A scrollbar is a widget with a cursor that can be moved to change the scrolling value.

scrollbar.png
Etk_Scrollbar is an abstract class for two derived widgets: Etk_HScrollbar (a horizontal scrollbar) and Etk_VScrollbar (a vertical scrollbar).
You usually do not need to use Etk_Scrollbar directly. In most of the cases, you can use Etk_Scrolled_View instead.

Object Hierarchy:
  • Etk_Object
    • Etk_Widget
      • Etk_Range
        • Etk_Scrollbar
          • Etk_HScrollbar
          • Etk_VScrollbar


Data Structures

struct  Etk_Scrollbar
 [Widget] The structure of a scrollbar More...
struct  Etk_HScrollbar
 [Widget] The structure of a hscrollbar More...
struct  Etk_VScrollbar
 [Widget] The structure of a vscrollbar More...

Defines

#define ETK_SCROLLBAR_TYPE   (etk_scrollbar_type_get())
#define ETK_SCROLLBAR(obj)   (ETK_OBJECT_CAST((obj), ETK_SCROLLBAR_TYPE, Etk_Scrollbar))
#define ETK_IS_SCROLLBAR(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_SCROLLBAR_TYPE))
#define ETK_HSCROLLBAR_TYPE   (etk_hscrollbar_type_get())
#define ETK_HSCROLLBAR(obj)   (ETK_OBJECT_CAST((obj), ETK_HSCROLLBAR_TYPE, Etk_HScrollbar))
#define ETK_IS_HSCROLLBAR(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_HSCROLLBAR_TYPE))
#define ETK_VSCROLLBAR_TYPE   (etk_vscrollbar_type_get())
#define ETK_VSCROLLBAR(obj)   (ETK_OBJECT_CAST((obj), ETK_VSCROLLBAR_TYPE, Etk_VScrollbar))
#define ETK_IS_VSCROLLBAR(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_VSCROLLBAR_TYPE))

Functions

Etk_Widget * etk_hscrollbar_new (double lower, double upper, double value, double step_increment, double page_increment, double page_size)
 Creates a new horizontal scrollbar.
Etk_Widget * etk_vscrollbar_new (double lower, double upper, double value, double step_increment, double page_increment, double page_size)
 Creates a new vertical scrollbar.


Define Documentation

#define ETK_SCROLLBAR_TYPE   (etk_scrollbar_type_get())

Gets the type of a scrollbar

#define ETK_SCROLLBAR ( obj   )     (ETK_OBJECT_CAST((obj), ETK_SCROLLBAR_TYPE, Etk_Scrollbar))

Casts the object to an Etk_Scrollbar

#define ETK_IS_SCROLLBAR ( obj   )     (ETK_OBJECT_CHECK_TYPE((obj), ETK_SCROLLBAR_TYPE))

Checks if the object is an Etk_Scrollbar

#define ETK_HSCROLLBAR_TYPE   (etk_hscrollbar_type_get())

Gets the type of a horizontal scrollbar

#define ETK_HSCROLLBAR ( obj   )     (ETK_OBJECT_CAST((obj), ETK_HSCROLLBAR_TYPE, Etk_HScrollbar))

Casts the object to an Etk_HScrollbar

#define ETK_IS_HSCROLLBAR ( obj   )     (ETK_OBJECT_CHECK_TYPE((obj), ETK_HSCROLLBAR_TYPE))

Checks if the object is an Etk_HScrollbar

#define ETK_VSCROLLBAR_TYPE   (etk_vscrollbar_type_get())

Gets the type of a vertical scrollbar

#define ETK_VSCROLLBAR ( obj   )     (ETK_OBJECT_CAST((obj), ETK_VSCROLLBAR_TYPE, Etk_VScrollbar))

Casts the object to an Etk_VScrollbar

#define ETK_IS_VSCROLLBAR ( obj   )     (ETK_OBJECT_CHECK_TYPE((obj), ETK_VSCROLLBAR_TYPE))

Checks if the object is an Etk_VScrollbar


Function Documentation

Etk_Widget * etk_hscrollbar_new ( double  lower,
double  upper,
double  value,
double  step_increment,
double  page_increment,
double  page_size 
)

Creates a new horizontal scrollbar.

Parameters:
lower the lower bound of the scrollbar
upper the upper bound of the scrollbar
value the initial value of the scrollbar
step_increment the step-increment value. This value is added or substracted to the current value of the scrollbar when an arrow button of the scrollbar is clicked, or when the mouse wheel is used
page_increment the page-increment value. This value is added or substracted to the current value of the scrollbar when the page up/down keys are pressed or when the user clicks on the trough of the scrollbar
page_size the page size value: this value will determine the size of the drag button of the scrollbar
Returns:
Returns the new horizontal scrollbar widget

Etk_Widget * etk_vscrollbar_new ( double  lower,
double  upper,
double  value,
double  step_increment,
double  page_increment,
double  page_size 
)

Creates a new vertical scrollbar.

Parameters:
lower the lower bound of the scrollbar
upper the upper bound of the scrollbar
value the initial value of the scrollbar
step_increment the-step increment value. This value is added or substracted to the current value of the scrollbar when an arrow button of the scrollbar is clicked, or when the mouse wheel is used
page_increment the page-increment value. This value is added or substracted to the current value of the scrollbar when the page up/down keys are pressed or when the user clicks on the trough of the scrollbar
page_size the page size value: this value will determine the size of the drag button of the scrollbar
Returns:
Returns the new vertical scrollbar widget