doxygen comments for undocumented features of Fl_Dial, Fl_Counter
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6334 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
9ce5dd8c73
commit
efd1647a25
@ -38,8 +38,8 @@
|
||||
#endif
|
||||
|
||||
// values for type():
|
||||
#define FL_NORMAL_COUNTER 0
|
||||
#define FL_SIMPLE_COUNTER 1
|
||||
#define FL_NORMAL_COUNTER 0 /**< type() for counter with fast buttons */
|
||||
#define FL_SIMPLE_COUNTER 1 /**< type() for counter without fast buttons */
|
||||
|
||||
/**
|
||||
\class Fl_Counter
|
||||
@ -77,19 +77,36 @@ public:
|
||||
~Fl_Counter();
|
||||
|
||||
/**
|
||||
Set the increment for the double-arrow buttons.
|
||||
Set the increment for the large step buttons.
|
||||
The default value is 1.0.
|
||||
\param[in] a increment value
|
||||
\param[in] a large step increment.
|
||||
*/
|
||||
void lstep(double a) {lstep_ = a;}
|
||||
|
||||
/**
|
||||
Set the increments for the normal and large step buttons.
|
||||
\param[in] a, b normal and large step increments.
|
||||
*/
|
||||
void step(double a,double b) {Fl_Valuator::step(a); lstep_ = b;}
|
||||
/**
|
||||
Set the increment for the normal step buttons.
|
||||
\param[in] a normal step increment.
|
||||
*/
|
||||
void step(double a) {Fl_Valuator::step(a);}
|
||||
|
||||
/** Gets the text font */
|
||||
Fl_Font textfont() const {return textfont_;}
|
||||
/** Sets the text font to \a s */
|
||||
void textfont(Fl_Font s) {textfont_ = s;}
|
||||
|
||||
/** Gets the font size */
|
||||
Fl_Fontsize textsize() const {return textsize_;}
|
||||
/** Sets the font size to \a s */
|
||||
void textsize(Fl_Fontsize s) {textsize_ = s;}
|
||||
|
||||
/** Gets the font color */
|
||||
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
|
||||
/** Sets the font color to \p a */
|
||||
void textcolor(unsigned s) {textcolor_ = s;}
|
||||
|
||||
};
|
||||
|
||||
10
FL/Fl_Dial.H
10
FL/Fl_Dial.H
@ -36,9 +36,9 @@
|
||||
#endif
|
||||
|
||||
// values for type():
|
||||
#define FL_NORMAL_DIAL 0
|
||||
#define FL_LINE_DIAL 1
|
||||
#define FL_FILL_DIAL 2
|
||||
#define FL_NORMAL_DIAL 0 /**< type() for dial variant with dot */
|
||||
#define FL_LINE_DIAL 1 /**< type() for dial variant with line */
|
||||
#define FL_FILL_DIAL 2 /**< type() for dial variant with filled arc */
|
||||
|
||||
/**
|
||||
The Fl_Dial widget provides a circular dial to control a
|
||||
@ -59,8 +59,8 @@ class FL_EXPORT Fl_Dial : public Fl_Valuator {
|
||||
protected:
|
||||
|
||||
// these allow subclasses to put the dial in a smaller area:
|
||||
void draw(int, int, int, int);
|
||||
int handle(int, int, int, int, int);
|
||||
void draw(int X, int Y, int W, int H);
|
||||
int handle(int event, int X, int Y, int W, int H);
|
||||
void draw();
|
||||
|
||||
public:
|
||||
|
||||
@ -32,7 +32,10 @@
|
||||
#include <FL/math.h>
|
||||
|
||||
// All angles are measured with 0 to the right and counter-clockwise
|
||||
|
||||
/**
|
||||
Draws dial at given position and size.
|
||||
\param[in] X, Y, W, H position and size
|
||||
*/
|
||||
void Fl_Dial::draw(int X, int Y, int W, int H) {
|
||||
if (damage()&FL_DAMAGE_ALL) draw_box(box(), X, Y, W, H, color());
|
||||
X += Fl::box_dx(box());
|
||||
@ -92,11 +95,18 @@ void Fl_Dial::draw(int X, int Y, int W, int H) {
|
||||
fl_pop_matrix();
|
||||
}
|
||||
|
||||
/**
|
||||
Draws dial at current position and size.
|
||||
*/
|
||||
void Fl_Dial::draw() {
|
||||
draw(x(), y(), w(), h());
|
||||
draw_label();
|
||||
}
|
||||
|
||||
/**
|
||||
Allow subclasses to handle event based on given position and size.
|
||||
\param[in] X, Y, W, H position and size
|
||||
*/
|
||||
int Fl_Dial::handle(int event, int X, int Y, int W, int H) {
|
||||
switch (event) {
|
||||
case FL_PUSH:
|
||||
@ -130,6 +140,9 @@ int Fl_Dial::handle(int event, int X, int Y, int W, int H) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Allow subclasses to handle event based on current position and size.
|
||||
*/
|
||||
int Fl_Dial::handle(int e) {
|
||||
return handle(e, x(), y(), w(), h());
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user