#include <picture.h>
Public Member Functions | |
parampic_of_ (colour_picture_of_< PEL > *background, const double xstart, const double xend, const double xfirst, const double ystart, const double yend, const double yfirst, const char *name) | |
parampic_of_ (const double xstart, const double xend, const double xfirst, const char *name) | |
~parampic_of_ () | |
Destructor. | |
int | XY (double &xout, double &yout) |
int | X (double &xout) |
int | Y (double &yout) |
parampic is a particular kind of colour_picture_of_ providing easy facilities for a programmer to display one- and two-dimensional sliders via CLIP. It can be supplied with a background picture, or use default ramps, then it displays a hairline slider over the background. The range of the slider is set during construction, and thereafter, a user clicking in the picture moves the slider to the appropriate scaled value. The program can then easily read off the current value of the parameter(s) represented by the parampic. It is assumed that the parameter read functions are called often when input is expected because sensing of pointer (mouse) state and updating are only done when the functions are called.
|
Create a parameter picture with the given background or a default if the background pointer argument = 0, with X,Y control ranges as specified. The X parameter value can vary between xstart and xend, with initial value xfirst; the Y parameter value can vary between ystart and yend, with initial value yfirst. If xstart == xend, the slider is 1D and vertical; if ystart == yend, the slider is 1D and horizontal. Otherwise, both X and Y can be varied. |
|
Create the most common kind of parameter picture. 1D in X with default background. |
|
Get current X value into xout. Returns 1 if there has been a change, 0 otherwise. |
|
Get current X and Y values into xout and yout. Returns 1 if there has been a change, 0 otherwise. |
|
Get current Y value into yout. Returns 1 if there has been a change, 0 otherwise. |