summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Editor.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-08-04 12:21:34 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-08-04 12:21:34 +0000
commite4727142d4c48198e708ba2bd4068daf8062abaf (patch)
treeb2394dd6b76d749af4deea2ebaf88e840adfad11 /src/Fl_Text_Editor.cxx
parent00f126367d73a2e860ca22a093a66fd1703f412a (diff)
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
Diffstat (limited to 'src/Fl_Text_Editor.cxx')
-rw-r--r--src/Fl_Text_Editor.cxx19
1 files changed, 7 insertions, 12 deletions
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 <fltk/Fl.h>
-#include <fltk/Fl_Text_Editor.h>
-#include <fltk/Fl_Style.h>
+#include <FL/Fl.H>
+#include <FL/Fl_Text_Editor.H>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-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 $".
//