From e4727142d4c48198e708ba2bd4068daf8062abaf Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sat, 4 Aug 2001 12:21:34 +0000 Subject: Fl_Text* widgets backported to 1.1 (Carl, please confirm that I haven't goofed with the layout->resize conversion. Also check fix for mMaxSize being 0 so I set it to textsize()) contrast,inactive -> fl_contrast, fl_inactive, with defines for old names. fl_rect() and fl_rectf() with color args. fl_height, etc. with font,size args. Send FL_RELEASE and FL_DRAG events to the pushed() widget by default. Fix file chooser so it doesn't automatically change dirs if the only matching name is a dir. Updated Fl_Browser_ and Fl_Scrollbar for better mouse wheel support. Moved DLL definitions to new Fl_Export.H. Restore callback functionality in file chooser. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1550 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Text_Editor.cxx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/Fl_Text_Editor.cxx') diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx index b1dc5e900..6e79891e3 100644 --- a/src/Fl_Text_Editor.cxx +++ b/src/Fl_Text_Editor.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Text_Editor.cxx,v 1.9 2001/07/23 09:50:05 spitzak Exp $" +// "$Id: Fl_Text_Editor.cxx,v 1.9.2.1 2001/08/04 12:21:33 easysw Exp $" // // Copyright Mark Edel. Permission to distribute under the LGPL for // the FLTK library granted by Mark Edel. @@ -23,20 +23,15 @@ // -#include -#include -#include +#include +#include #include #include #include -static void revert(Fl_Style*) {} -static Fl_Named_Style style("Text_Editor", revert, &Fl_Text_Editor::default_style); -Fl_Named_Style* Fl_Text_Editor::default_style = &::style; Fl_Text_Editor::Fl_Text_Editor(int X, int Y, int W, int H, const char* l) : Fl_Text_Display(X, Y, W, H, l) { - style(default_style); mCursorOn = 1; insert_mode_ = 1; key_bindings = 0; @@ -348,7 +343,7 @@ int Fl_Text_Editor::kf_delete(int, Fl_Text_Editor* e) { int Fl_Text_Editor::kf_copy(int, Fl_Text_Editor* e) { if (!e->buffer()->selected()) return 1; const char *copy = e->buffer()->selection_text(); - if (*copy) Fl::copy(copy, strlen(copy), true); + if (*copy) Fl::selection(*e, copy, strlen(copy)); free((void*)copy); e->show_insert_position(); return 1; @@ -362,7 +357,7 @@ int Fl_Text_Editor::kf_cut(int c, Fl_Text_Editor* e) { int Fl_Text_Editor::kf_paste(int, Fl_Text_Editor* e) { kill_selection(e); - Fl::paste(*e,true); + Fl::paste(*e); e->show_insert_position(); return 1; } @@ -406,7 +401,7 @@ int Fl_Text_Editor::handle(int event) { if (event == FL_PUSH && Fl::event_button() == 2) { dragType = -1; - Fl::paste(*this,false); + Fl::paste(*this); Fl::focus(this); return 1; } @@ -442,5 +437,5 @@ int Fl_Text_Editor::handle(int event) { } // -// End of "$Id: Fl_Text_Editor.cxx,v 1.9 2001/07/23 09:50:05 spitzak Exp $". +// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.1 2001/08/04 12:21:33 easysw Exp $". // -- cgit v1.2.3