diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-08-24 13:09:06 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-08-24 13:09:06 +0000 |
| commit | daccac9672a336b7eae79a2a4efc6c877442f132 (patch) | |
| tree | 6a4f998e20f9a00c118c583d49e2638a0a7eb8de /src/Fl_Choice.cxx | |
| parent | 6eef9839bb904bda686e239ab77db04f706c072c (diff) | |
Fl_Text_Display/Editor did not disable the current
selection when focus was shifted to another widget
(STR #131)
Fl_Choice didn't use the normal focus box when the
plastic scheme was in use (STR #129)
Fl_Text_Editor didn't use selection_color()
consistently (STR #130)
The fltk_forms, fltk_gl, and fltk_images DSO's and
HP-UX shared libraries are now linked against the fltk
shared library to provide complete dependency
resolution (STR #118)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3081 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Choice.cxx')
| -rw-r--r-- | src/Fl_Choice.cxx | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/src/Fl_Choice.cxx b/src/Fl_Choice.cxx index 83d5f6540..d14315e54 100644 --- a/src/Fl_Choice.cxx +++ b/src/Fl_Choice.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Choice.cxx,v 1.10.2.5.2.13 2003/01/30 21:41:34 easysw Exp $" +// "$Id: Fl_Choice.cxx,v 1.10.2.5.2.14 2003/08/24 13:09:06 easysw Exp $" // // Choice widget for the Fast Light Tool Kit (FLTK). // @@ -63,12 +63,33 @@ void Fl_Choice::draw() { if (mvalue()) { Fl_Menu_Item m = *mvalue(); if (active_r()) m.activate(); else m.deactivate(); - fl_clip(x() + dx, y() + dy + 1, w() - W, H - 2); - fl_draw_shortcut = 2; // hack value to make '&' disappear - m.draw(x() + dx, y() + dy + 1, w() - W, H - 2, this, - Fl::focus() == this); - fl_draw_shortcut = 0; - fl_pop_clip(); + + // ERCO + int xx = x() + dx, yy = y() + dy + 1, ww = w() - W, hh = H - 2; + if ( Fl::scheme() ) + { + Fl_Label l; + l.value = m.text; + l.image = 0; + l.deimage = 0; + l.type = m.labeltype_; + l.font = m.labelsize_ || m.labelfont_ ? m.labelfont_ : uchar(textfont()); + l.size = m.labelsize_ ? m.labelsize_ : textsize(); + l.color= m.labelcolor_ ? m.labelcolor_ : textcolor(); + if (!m.active()) l.color = fl_inactive((Fl_Color)l.color); + fl_draw_shortcut = 2; // hack value to make '&' disappear + l.draw(xx+3, yy, ww>6 ? ww-6 : 0, hh, FL_ALIGN_LEFT); + fl_draw_shortcut = 0; + if ( Fl::focus() == this ) draw_focus(box(), xx, yy, ww, hh); + } + else + { + fl_clip(xx, yy, ww, hh); + fl_draw_shortcut = 2; // hack value to make '&' disappear + m.draw(xx, yy, ww, hh, this, Fl::focus() == this); + fl_draw_shortcut = 0; + fl_pop_clip(); + } } draw_label(); @@ -130,5 +151,5 @@ int Fl_Choice::handle(int e) { } // -// End of "$Id: Fl_Choice.cxx,v 1.10.2.5.2.13 2003/01/30 21:41:34 easysw Exp $". +// End of "$Id: Fl_Choice.cxx,v 1.10.2.5.2.14 2003/08/24 13:09:06 easysw Exp $". // |
