Added clipping suggested by Dmitry Potapov
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@434 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
860eda9df2
commit
4163d5b5ad
@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Choice.cxx,v 1.10.2.1 1999/03/13 20:45:20 bill Exp $"
|
// "$Id: Fl_Choice.cxx,v 1.10.2.2 1999/03/16 08:51:02 bill Exp $"
|
||||||
//
|
//
|
||||||
// Choice widget for the Fast Light Tool Kit (FLTK).
|
// Choice widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@ -41,10 +41,12 @@ void Fl_Choice::draw() {
|
|||||||
if (mvalue()) {
|
if (mvalue()) {
|
||||||
Fl_Menu_Item m = *mvalue();
|
Fl_Menu_Item m = *mvalue();
|
||||||
if (active_r()) m.activate(); else m.deactivate();
|
if (active_r()) m.activate(); else m.deactivate();
|
||||||
fl_draw_shortcut = 2; // hack value to make '&' disappear
|
|
||||||
int BW = Fl::box_dx(box());
|
int BW = Fl::box_dx(box());
|
||||||
|
fl_clip(x(), y(), w()-3*H, h());
|
||||||
|
fl_draw_shortcut = 2; // hack value to make '&' disappear
|
||||||
m.draw(x()+BW, y(), w()-2*BW-3*H, h(), this);
|
m.draw(x()+BW, y(), w()-2*BW-3*H, h(), this);
|
||||||
fl_draw_shortcut = 0;
|
fl_draw_shortcut = 0;
|
||||||
|
fl_pop_clip();
|
||||||
}
|
}
|
||||||
draw_label();
|
draw_label();
|
||||||
}
|
}
|
||||||
@ -88,5 +90,5 @@ int Fl_Choice::handle(int e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Choice.cxx,v 1.10.2.1 1999/03/13 20:45:20 bill Exp $".
|
// End of "$Id: Fl_Choice.cxx,v 1.10.2.2 1999/03/16 08:51:02 bill Exp $".
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user