Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::Gtk::Curve Class Reference

A GtkCurve C++ wrapper class. More...

#include <inti/gtk/curve.h>

Inheritance diagram for Inti::Gtk::Curve:

Inti::Gtk::DrawingArea Inti::Gtk::Widget Inti::Gtk::Object Inti::Atk::Implementor Inti::G::Object Inti::G::TypeInterface Inti::G::TypeInstance Inti::MemoryHandler Inti::G::TypeInstance Inti::ReferencedBase Inti::ReferencedBase List of all members.

Public Member Functions

Constructors
Accessors
Methods
Property Proxies
Signal Proxies

Protected Member Functions

Constructors
Signal Handlers

Detailed Description

A GtkCurve C++ wrapper class.

Curve is a widget that 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. Curve 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.

NOTE this widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it's just not of general interest.


Constructor & Destructor Documentation

Inti::Gtk::Curve::Curve GtkCurve *  curve,
bool  reference = false
[explicit, protected]
 

Construct a new Curve from an existing GtkCurve.

Parameters:
curve A pointer to a GtkCurve.
reference Set false if the initial reference count is floating, set true if it's not.

The curve can be a newly created GtkCurve or an existing GtkCurve. (see G::Object::Object).


Member Function Documentation

void Inti::Gtk::Curve::get_vector int  count,
float  data[]
const
 

Returns a vector of points representing the curve.

Parameters:
count The number of points to calculate.
data The points.

virtual void Inti::Gtk::Curve::on_curve_type_changed  )  [protected, virtual]
 

Called when the curve type changes.

The curve type can be changed explicitly with a call to set_curve_type(). It is also changed as a side-effect of calling reset() or set_gamma().

void Inti::Gtk::Curve::set_curve_type CurveType  type  ) 
 

Sets the type of the curve.

Parameters:
type 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.

void Inti::Gtk::Curve::set_gamma float  gamma  ) 
 

Recomputes the entire curve using the given gamma value.

Parameters:
gamma The 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 CURVE_TYPE_FREE.

void Inti::Gtk::Curve::set_range float  min_x,
float  max_x,
float  min_y,
float  max_y
 

Sets the minimum and maximum x and y values of the curve.

Parameters:
min_x The minimum x value.
max_x The maximum x value.
min_y The minimum y value.
max_y The maximum y value.

The curve is also reset with a call to reset().

void Inti::Gtk::Curve::set_vector int  count,
float  data[]
 

Sets the vector of points on the curve; the curve type is set to CURVE_TYPE_FREE.

Parameters:
count The number of points.
data The points on the curve.


The documentation for this class was generated from the following file: Main Page - Footer


Generated on Sun Sep 14 20:08:14 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002