HScale

The #GtkHScale widget is used to allow the user to select a value using a horizontal slider. To create one, use gtk_hscale_new_with_range().

The position to show the current value, and the number of decimal places shown can be set using the parent #GtkScale class’s functions.

GtkHScale has been deprecated, use #GtkScale instead.

Constructors

this
this(GtkHScale* gtkHScale, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(Adjustment adjustment)

Creates a new #GtkHScale.

this
this(double min, double max, double step)

Creates a new horizontal scale widget that lets the user input a number between @min and @max (including @min and @max) with the increment @step. @step must be nonzero; it’s the distance the slider moves when using the arrow keys to adjust the scale value.

Members

Functions

getHScaleStruct
GtkHScale* getHScaleStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

getType
GType getType()

Variables

gtkHScale
GtkHScale* gtkHScale;

the main Gtk struct

Inherited Members

From Scale

gtkScale
GtkScale* gtkScale;

the main Gtk struct

getScaleStruct
GtkScale* getScaleStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
getType
GType getType()
addMark
void addMark(double value, GtkPositionType position, string markup)

Adds a mark at @value.

clearMarks
void clearMarks()

Removes any marks that have been added with gtk_scale_add_mark().

getDigits
int getDigits()

Gets the number of decimal places to which the value is rounded on change. This number is also used by the default #GtkScale::format-value handler.

getDrawValue
bool getDrawValue()

Returns whether the current value is displayed as a string next to the slider.

getHasOrigin
bool getHasOrigin()

Returns whether the scale has an origin.

getLayout
PgLayout getLayout()

Gets the #PangoLayout used to display the scale. The returned object is owned by the scale so does not need to be freed by the caller.

getLayoutOffsets
void getLayoutOffsets(int x, int y)

Obtains the coordinates where the scale will draw the #PangoLayout representing the text in the scale. Remember when using the #PangoLayout function you need to convert to and from pixels using PANGO_PIXELS() or #PANGO_SCALE.

getValuePos
GtkPositionType getValuePos()

Gets the position in which the current value is displayed.

setDigits
void setDigits(int digits)

Sets the number of decimal places to which the value is rounded when it is changed. This also sets the number of digits shown in the displayed value when using the default handler for the #GtkScale::format-value signal.

setDrawValue
void setDrawValue(bool drawValue)

Specifies whether the current value is displayed as a string next to the slider.

setHasOrigin
void setHasOrigin(bool hasOrigin)

If @has_origin is set to %TRUE (the default), the scale will highlight the part of the scale between the origin (bottom or left side) of the scale and the current value.

setValuePos
void setValuePos(GtkPositionType pos)

Sets the position in which the current value is displayed.

OnFormatValueDelegateWrapper
class OnFormatValueDelegateWrapper
Undocumented in source.
addOnFormatValue
gulong addOnFormatValue(string delegate(double, Scale) dlg, ConnectFlags connectFlags)

Signal which allows you to change how the scale value is displayed. Connect a signal handler which returns an allocated string representing @value. That string will then be used to display the scale's value.

callBackFormatValue
string callBackFormatValue(GtkScale* scaleStruct, double value, OnFormatValueDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackFormatValueDestroy
void callBackFormatValueDestroy(OnFormatValueDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta