Curve

Description The GtkCurve widget allows the user to edit a curve covering a range of values. It is typically used to fine-tune color balances in graphics applications like the Gimp. The GtkCurve widget has 3 modes of operation - spline, linear and free. In spline mode the user places points on the curve which are automatically connected together into a smooth curve. In linear mode the user places points on the curve which are connected by straight lines. In free mode the user can draw the points of the curve freely, and they are not connected at all. As of GTK+ 2.20, GtkCurve has been deprecated since it is too specialized.

Constructors

this
this(GtkCurve* gtkCurve)

Sets our main struct and passes it to the parent class

this
this()

Warning gtk_curve_new has been deprecated since version 2.20 and should not be used in newly-written code. Don't use this widget anymore. Creates a new GtkCurve.

Members

Functions

addOnCurveTypeChanged
void addOnCurveTypeChanged(void delegate(Curve) dlg, ConnectFlags connectFlags)

Emitted when the curve type has been changed. The curve type can be changed explicitly with a call to gtk_curve_set_curve_type(). It is also changed as a side-effect of calling gtk_curve_reset() or gtk_curve_set_gamma(). See Also GtkGammaCurve a subclass for editing gamma curves.

getCurveStruct
GtkCurve* getCurveStruct()
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*

getVector
void getVector(float[] vector)

Warning gtk_curve_get_vector has been deprecated since version 2.20 and should not be used in newly-written code. Don't use this widget anymore. Returns a vector of points representing the curve.

reset
void reset()

Warning gtk_curve_reset has been deprecated since version 2.20 and should not be used in newly-written code. Don't use this widget anymore. Resets the curve to a straight line from the minimum x and y values to the maximum x and y values (i.e. from the bottom-left to the top-right corners). The curve type is not changed.

setCurveType
void setCurveType(GtkCurveType type)

Warning gtk_curve_set_curve_type has been deprecated since version 2.20 and should not be used in newly-written code. Don't use this widget anymore. Sets the type of the curve. The curve will remain unchanged except when changing from a free curve to a linear or spline curve, in which case the curve will be changed as little as possible.

setGamma
void setGamma(float gamma)

Warning gtk_curve_set_gamma has been deprecated since version 2.20 and should not be used in newly-written code. Don't use this widget anymore. Recomputes the entire curve using the given gamma value. A gamma value of 1 results in a straight line. Values greater than 1 result in a curve above the straight line. Values less than 1 result in a curve below the straight line. The curve type is changed to GTK_CURVE_TYPE_FREE. FIXME: Needs a more precise definition of gamma.

setRange
void setRange(float minX, float maxX, float minY, float maxY)

Warning gtk_curve_set_range has been deprecated since version 2.20 and should not be used in newly-written code. Don't use this widget anymore. Sets the minimum and maximum x and y values of the curve. The curve is also reset with a call to gtk_curve_reset().

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

Warning gtk_curve_set_vector has been deprecated since version 2.20 and should not be used in newly-written code. Don't use this widget anymore. Sets the vector of points on the curve. The curve type is set to GTK_CURVE_TYPE_FREE.

Static functions

callBackCurveTypeChanged
void callBackCurveTypeChanged(GtkCurve* curveStruct, Curve _curve)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

connectedSignals
int[string] connectedSignals;
gtkCurve
GtkCurve* gtkCurve;

the main Gtk struct

onCurveTypeChangedListeners
void delegate(Curve)[] onCurveTypeChangedListeners;
Undocumented in source.

Inherited Members

From DrawingArea

gtkDrawingArea
GtkDrawingArea* gtkDrawingArea;

the main Gtk struct

getDrawingAreaStruct
GtkDrawingArea* getDrawingAreaStruct()
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.
size
void size(int width, int height)

Warning gtk_drawing_area_size is deprecated and should not be used in newly-written code. Use gtk_widget_set_size_request() instead. Sets the size that the drawing area will request in response to a "size_request" signal. The drawing area may actually be allocated a size larger than this depending on how it is packed within the enclosing containers.

Meta