mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 08:06:35 +08:00
Fl_Input didn't handle box type of FL_NO_BOX properly.
(patch from Curtis) git-svn-id: file:///fltk/svn/fltk/trunk@178 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+7
-5
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Input.cxx,v 1.5 1998/12/02 15:39:31 mike Exp $"
|
// "$Id: Fl_Input.cxx,v 1.6 1998/12/29 14:30:23 mike Exp $"
|
||||||
//
|
//
|
||||||
// Input widget for the Fast Light Tool Kit (FLTK).
|
// Input widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
void Fl_Input::draw() {
|
void Fl_Input::draw() {
|
||||||
if (type() == FL_HIDDEN_INPUT) return;
|
if (type() == FL_HIDDEN_INPUT) return;
|
||||||
Fl_Boxtype b = box() ? box() : FL_DOWN_BOX;
|
Fl_Boxtype b = box();
|
||||||
if (damage() & FL_DAMAGE_ALL) draw_box(b, color());
|
if (damage() & FL_DAMAGE_ALL) draw_box(b, color());
|
||||||
Fl_Input_::drawtext(x()+Fl::box_dx(b)+3, y()+Fl::box_dy(b),
|
Fl_Input_::drawtext(x()+Fl::box_dx(b)+3, y()+Fl::box_dy(b),
|
||||||
w()-Fl::box_dw(b)-6, h()-Fl::box_dh(b));
|
w()-Fl::box_dw(b)-6, h()-Fl::box_dh(b));
|
||||||
@@ -312,15 +312,17 @@ int Fl_Input::handle(int event) {
|
|||||||
if (Fl::event_button() == 2) return 0;
|
if (Fl::event_button() == 2) return 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Fl_Boxtype b = box() ? box() : FL_DOWN_BOX;
|
Fl_Boxtype b = box();
|
||||||
return Fl_Input_::handletext(event,
|
return Fl_Input_::handletext(event,
|
||||||
x()+Fl::box_dx(b)+3, y()+Fl::box_dy(b),
|
x()+Fl::box_dx(b)+3, y()+Fl::box_dy(b),
|
||||||
w()-Fl::box_dw(b)-6, h()-Fl::box_dh(b));
|
w()-Fl::box_dw(b)-6, h()-Fl::box_dh(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
Fl_Input::Fl_Input(int x, int y, int w, int h, const char *l)
|
Fl_Input::Fl_Input(int x, int y, int w, int h, const char *l)
|
||||||
: Fl_Input_(x, y, w, h, l) {}
|
: Fl_Input_(x, y, w, h, l) {
|
||||||
|
box(FL_DOWN_BOX);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Input.cxx,v 1.5 1998/12/02 15:39:31 mike Exp $".
|
// End of "$Id: Fl_Input.cxx,v 1.6 1998/12/29 14:30:23 mike Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user