From 90c8efb32deed8209d1a4ffb4e1cadbb54e7dbe3 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Sat, 26 Dec 2009 02:31:59 -0600 Subject: [PATCH] Make boxtype drawn on Fl_Sometimes_Input's up mode configurable. --- FL/Fl_Sometimes_Input.H | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/FL/Fl_Sometimes_Input.H b/FL/Fl_Sometimes_Input.H index a26e0a5..7a03457 100644 --- a/FL/Fl_Sometimes_Input.H +++ b/FL/Fl_Sometimes_Input.H @@ -28,14 +28,20 @@ class Fl_Sometimes_Input : public Fl_Input { + Fl_Boxtype _up_box; + public: Fl_Sometimes_Input ( int X, int Y, int W, int H, const char *L=0 ) : Fl_Input( X, Y, W, H, L ) { clear_visible_focus(); + up_box( FL_NO_BOX ); } + void up_box ( Fl_Boxtype b ) { _up_box = b; } + Fl_Boxtype up_box ( void ) const { return _up_box; } + virtual void draw ( void ) { @@ -43,7 +49,7 @@ public: Fl_Input::draw(); else { - fl_draw_box( FL_ROUNDED_BOX, x(), y(), w(), h(), color() ); + fl_draw_box( up_box(), x(), y(), w(), h(), color() ); fl_color( FL_FOREGROUND_COLOR /* textcolor() */ ); fl_font( textfont(), textsize() ); fl_draw( value(), x(), y(), w(), h(), FL_ALIGN_CENTER );