HScale

Description 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.

Constructors

this
this(GtkHScale* gtkHScale)

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. Note that the way in which the precision is derived works best if step is a power of ten. If the resulting precision is not suitable for your needs, use gtk_scale_set_digits() to correct it.

Members

Functions

getHScaleStruct
GtkHScale* getHScaleStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
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.

Variables

gtkHScale
GtkHScale* gtkHScale;

the main Gtk struct

Inherited Members

From Scale

gtkScale
GtkScale* gtkScale;

the main Gtk struct

getScaleStruct
GtkScale* getScaleStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
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.
connectedSignals
int[string] connectedSignals;
onFormatValueListeners
string delegate(gdouble, Scale)[] onFormatValueListeners;
Undocumented in source.
addOnFormatValue
void addOnFormatValue(string delegate(gdouble, 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. Here's an example signal handler which displays a value 1.0 as with "-->1.0<--".

callBackFormatValue
void callBackFormatValue(GtkScale* scaleStruct, gdouble value, Scale _scale)
Undocumented in source. Be warned that the author may not have intended to support it.
setDigits
void setDigits(int digits)

Sets the number of decimal places that are displayed in the value. Also causes the value of the adjustment to be rounded off to this number of digits, so the retrieved value matches the value the user saw.

setDrawValue
void setDrawValue(int drawValue)

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

setValuePos
void setValuePos(GtkPositionType pos)

Sets the position in which the current value is displayed.

getDigits
int getDigits()

Gets the number of decimal places that are displayed in the value.

getDrawValue
int getDrawValue()

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

getValuePos
GtkPositionType getValuePos()

Gets the position in which the current value is displayed.

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. Since 2.4

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. If the "draw-value" property is FALSE, the return values are undefined. Since 2.4

addMark
void addMark(double value, GtkPositionType position, string markup)

Adds a mark at value. A mark is indicated visually by drawing a tick mark next to the scale, and GTK+ makes it easy for the user to position the scale exactly at the marks value. If markup is not NULL, text is shown next to the tick mark. To remove marks from a scale, use gtk_scale_clear_marks(). Since 2.16

clearMarks
void clearMarks()

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

Meta