From a7904da09a890a8b6b2bbfc11a4a32308dc82023 Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Fri, 15 Oct 1999 09:01:48 +0000 Subject: I fixed Fl_Tabs so that child tabs can be added/removed without any concern if they are selected, it uses the first visible() child to indicate the selected tab. Fixed up rather bogus fix for selecting entire text field when you click on it. This new version does not do it for multi-line and does not mess up the middle-mouse paste action. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@777 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Input_.cxx | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'src/Fl_Input_.cxx') diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 0dd258fbe..28c551039 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input_.cxx,v 1.21 1999/03/04 18:09:18 mike Exp $" +// "$Id: Fl_Input_.cxx,v 1.21.2.1 1999/10/15 09:01:44 bill Exp $" // // Common input widget routines for the Fast Light Tool Kit (FLTK). // @@ -170,7 +170,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { } int selstart, selend; - if (Fl::focus()!=this && Fl::selection_owner()!=this && Fl::pushed()!=this) + if (Fl::focus()!=this && /*Fl::selection_owner()!=this &&*/ Fl::pushed()!=this) selstart = selend = 0; else if (position() <= mark()) { selstart = position(); selend = mark(); @@ -352,14 +352,18 @@ void Fl_Input_::handle_mouse(int X, int Y, p = e; if (e >= value_+size_) break; } - const char *l, *r, *t; + const char *l, *r, *t; double f0 = 0; for (l = p, r = e; lsize()) m = size(); if (p == position_ && m == mark_) return 0; - if (Fl::selection_owner() == this) Fl::selection_owner(0); + //if (Fl::selection_owner() == this) Fl::selection_owner(0); if (p != m) { if (p != position_) minimal_update(position_, p); if (m != mark_) minimal_update(mark_, m); @@ -590,16 +594,15 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) { case FL_FOCUS: if (mark_ == position_) { minimal_update(size()+1); - } else if (Fl::selection_owner() != this) + } else //if (Fl::selection_owner() != this) minimal_update(mark_, position_); return 1; case FL_UNFOCUS: if (mark_ == position_) { if (!(damage()&FL_DAMAGE_EXPOSE)) {minimal_update(position_); erase_cursor_only = 1;} - } else if (Fl::selection_owner() != this) { + } else //if (Fl::selection_owner() != this) minimal_update(mark_, position_); - } if (when() & FL_WHEN_RELEASE) maybe_do_callback(); return 1; @@ -616,10 +619,10 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) { copy(); return 1; - case FL_SELECTIONCLEAR: - minimal_update(mark_, position_); - mark_ = position_; - return 1; +// case FL_SELECTIONCLEAR: +// minimal_update(mark_, position_); +// mark_ = position_; +// return 1; case FL_PASTE: { // strip trailing control characters and spaces before pasting: @@ -734,5 +737,5 @@ Fl_Input_::~Fl_Input_() { } // -// End of "$Id: Fl_Input_.cxx,v 1.21 1999/03/04 18:09:18 mike Exp $". +// End of "$Id: Fl_Input_.cxx,v 1.21.2.1 1999/10/15 09:01:44 bill Exp $". // -- cgit v1.2.3