mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
Back-ported cut & paste code from fltk2.0.
This code splits the cut & paste into two buffers. The "SELECTION" is used for the currently highlighted text and for middle-mouse paste and (if possible) for handling drag & drop. The "CLIPBOARD" is for Ctrl+C and Ctrl+V style cut & paste. This matches how Motif, GTK, and KDE 3.0 work. But many older X applications (including KDE 2) can only see SELECTION, this results in cut & paste incompatability that is familiar to X users. However this now moves fltk over to the majority camp. On all systems this eliminates the annoying inability to select a region and replace it with Ctrl+V. On Mac and Win32 the SELECTION is local to the application, so middle-mouse paste only works between fields in the application. There may be tricks (special clipboard data types? use drag & drop?) to make it communicate, but unless there are standards it would be fltk-only. The file Fl_cutpaste.cxx has been deleted, so update the IDE files! The Win32 and Mac versions have NOT BEEN TESTED! I tried to be careful editing them but they may need some work. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Input_.H,v 1.6.2.4.2.2 2002/01/01 15:11:27 easysw Exp $"
|
||||
// "$Id: Fl_Input_.H,v 1.6.2.4.2.3 2002/03/07 19:22:56 spitzak Exp $"
|
||||
//
|
||||
// Input base class header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
int cut(int n) {return replace(position(), position()+n, 0);}
|
||||
int cut(int a, int b) {return replace(a, b, 0);}
|
||||
int insert(const char* t, int l=0){return replace(position_, mark_, t, l);}
|
||||
FL_EXPORT int copy();
|
||||
FL_EXPORT int copy(int clipboard);
|
||||
FL_EXPORT int undo();
|
||||
FL_EXPORT int copy_cuts();
|
||||
|
||||
@@ -122,5 +122,5 @@ public:
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Input_.H,v 1.6.2.4.2.2 2002/01/01 15:11:27 easysw Exp $".
|
||||
// End of "$Id: Fl_Input_.H,v 1.6.2.4.2.3 2002/03/07 19:22:56 spitzak Exp $".
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user