diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2017-05-15 15:30:52 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2017-05-15 15:30:52 +0000 |
| commit | a1d39365542272f6036461fee391e86c0c3be59c (patch) | |
| tree | f67599cf56e8bf92661452ff6a12524c461dbda1 /FL | |
| parent | 034148b289ded6e5b4c8231d089c8c82ee39cea9 (diff) | |
Allow to disable shadows in Fl_Clock and derived widgets.
As discussed on 2017-05-15 in fltk.general, thread "Fl_clock".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12237 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Clock.H | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/FL/Fl_Clock.H b/FL/Fl_Clock.H index dccc549e6..72dac8b7b 100644 --- a/FL/Fl_Clock.H +++ b/FL/Fl_Clock.H @@ -67,6 +67,7 @@ class FL_EXPORT Fl_Clock_Output : public Fl_Widget { int hour_, minute_, second_; ulong value_; + int shadow_; // draw shadows of hands void drawhands(Fl_Color,Fl_Color); // part of draw protected: void draw(); @@ -103,6 +104,29 @@ public: \see value(), hour(), minute() */ int second() const {return second_;} + + /** + Returns the shadow drawing mode of the hands. + + \returns shadow drawing mode of the hands + \retval 0 no shadows + \retval 1 draw shadows of hands (default) + */ + int shadow() const {return shadow_;} + + /** + Sets the shadow drawing mode of the hands. + + Enable (1) or disable (0) drawing the hands with shadows. + + Values except 0 and 1 are reserved for future extensions and + yield undefined behavior. + + The default is to draw the shadows (1). + + \param[in] mode 1 = shadows (default), 0 = no shadows + */ + void shadow(int mode) { shadow_ = mode ? 1 : 0; } }; // a Fl_Clock displays the current time always by using a timeout: |
