diff options
| -rw-r--r-- | FL/Fl_Counter.H | 25 | ||||
| -rw-r--r-- | FL/Fl_Dial.H | 10 | ||||
| -rw-r--r-- | src/Fl_Dial.cxx | 15 |
3 files changed, 40 insertions, 10 deletions
diff --git a/FL/Fl_Counter.H b/FL/Fl_Counter.H index 40f6a719a..36d788807 100644 --- a/FL/Fl_Counter.H +++ b/FL/Fl_Counter.H @@ -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;} }; diff --git a/FL/Fl_Dial.H b/FL/Fl_Dial.H index 08f915e03..adfaf8005 100644 --- a/FL/Fl_Dial.H +++ b/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: diff --git a/src/Fl_Dial.cxx b/src/Fl_Dial.cxx index 26e54ffc4..25f471698 100644 --- a/src/Fl_Dial.cxx +++ b/src/Fl_Dial.cxx @@ -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()); } |
