GiwHSlider
GiwHSlider - A hslider widget
Synopsis
Object Hierarchy
GObject
+----GtkObject
+----GtkWidget
+----GiwHSlider
|
Description
GiwHSlider is a hslider like a mercury hslider. It
has
the column (like the mercury column) and the legends, a title and a
label representing the current value.
It can be created with a giw_hslider_new(), an cofigured with the
functions below.
The receive signals when the value is changed, get the adjustment of
the hslider and receive the signal from it.
Details
GiwHSlider
typedef struct
GiwHSlider _GiwHSlider
|
The GiwHSlider struct contains private data only, and should be
manipulated using the functions below.
giw_hslider_new()
| GtkWidget*
giw_hslider_new
(void); |
Creates a new hslider, with all default options.
Returns: a new hslider.
giw_hslider_new_with_adjustment()
| GtkWidget*
giw_hslider_new_with_adjustment
(gdouble value, gdouble lower, gdouble upper); |
A convenience function, wich don't need to receive a
adjustement as
paramenter, but his fields.
min: The
lower value.
upper: The
upper value.
lower: The
initial value.
Returns: a new hslider.
giw_hslider_get_adjustment()
| GtkAdjustment*
giw_hslider_get_adjustment
(GiwHSlider *hslider); |
Gets the adjusment that the hslider uses.
hslider: A
hslider.
Return: The
adjusment.
giw_hslider_set_adjustment()
| void
giw_hslider_set_adjustment
(GiwHSlider *hslider, GtkAdjustment
*adjustment); |
Sets a new adjusment to be used.
hslider: A
hslider.
adjustment: The new adjusment.
giw_hslider_set_value()
| void
giw_hslider_set_value
(GiwHSlider *hslider, gdouble value); |
Sets the value (the size of the column) of the hslider, is
has
to be between the min_value and max_value (wich can be set with the
gtk_temometer_set_min_value and gtk_temometer_set_max_value),
or nothing will be drawn. The default value is 50.
hslider: A
hslider.
value: The
new value.
giw_hslider_get_value()
| gdouble
giw_hslider_set_value
(GiwHSlider *hslider); |
Gets the value (the size of the column) of the hslider.
hslider: A
hslider.
Returns: The
value.
giw_hslider_set_legends_digits()
| void
giw_hslider_set_legends_digits
(GiwHSlider *hslider, int digits); |
Sets the number os digits to be used by the legends (counting the "."
and the signal "-" if exists). If no legends is desired, set the
digitis to 0. The default is
5.
hslider: A
hslider.
digits: The
number of digits.
giw_hslider_set_mouse_policy()
Sets the policy for using mouse on changing hslider's value
hslider: A
hslider.
policy: The
policy to be used.
enum
GiwHSliderMousePolicy
typedef enum{
GIW_HSLIDER_MOUSE_DISABLED,
GIW_HSLIDER_MOUSE_AUTOMATICALLY,
GIW_HSLIDER_MOUSE_DELAYED
}GiwHSliderMousePolicy;
|
Used to set the way the mouse will be used.
GIW_HSLIDER_MOUSE_DISABLED
Mouse can't be used to change value.
GIW_HSLIDER_MOUSE_AUTOMATICALLY The
pointer folows mouse aftre a button is pressed.
GIW_HSLIDER_MOUSE_DELAYED
The pointer assumes mouse position only when
the button is relased.
giw_hslider_set_major_ticks_number()
| void
giw_hslider_set_major_ticks_number (GiwHSlider
*hslider, gint number); |
Sets the number oj major ticks to be drawn in all the hslider, if
it's 0, there are no ticks (and no legends too).
hslider: A
hslider.
option: The number of ticks
desired.
giw_hslider_set_minor_ticks_number()
| void
giw_hslider_set_minor_ticks_number (GiwHSlider
*hslider, gint number); |
Sets the number oj minor ticks to be drawn between each major ticks, if
it's 0 there are no minor ticks.
hslider: A
hslider.
option: The
number of minor
ticks desired.