|
@@ -104,8 +104,8 @@ type
|
|
|
procedure SetLineCount(count: Integer); override;
|
|
|
|
|
|
// Clipboard support
|
|
|
- //function GetClipboard: String; override;
|
|
|
- //procedure SetClipboard(Content: String); override;
|
|
|
+ function GetClipboard: String; override;
|
|
|
+ procedure SetClipboard(Content: String); override;
|
|
|
|
|
|
public
|
|
|
Widget: PGtkWidget; // this is the outer editor widget
|
|
@@ -123,6 +123,8 @@ type
|
|
|
|
|
|
implementation
|
|
|
|
|
|
+var
|
|
|
+ InternalClipboardContent: String;
|
|
|
|
|
|
{*****************************************************************************
|
|
|
GTK/GDK Callbacks
|
|
@@ -160,6 +162,7 @@ begin
|
|
|
Result := 1;
|
|
|
|
|
|
case Event^.KeyVal of
|
|
|
+ GDK_Return : KeyCode:=13;
|
|
|
GDK_KP_Insert : KeyCode:=GDK_Insert;
|
|
|
GDK_KP_Home : KeyCode:=GDK_Home;
|
|
|
GDK_KP_Left : KeyCode:=GDK_Left;
|
|
@@ -530,6 +533,18 @@ begin
|
|
|
end;
|
|
|
|
|
|
|
|
|
+function TGtkSHWidget.GetClipboard: String;
|
|
|
+begin
|
|
|
+ Result := InternalClipboardContent;
|
|
|
+end;
|
|
|
+
|
|
|
+
|
|
|
+procedure TGtkSHWidget.SetClipboard(Content: String);
|
|
|
+begin
|
|
|
+ InternalClipboardContent := Content;
|
|
|
+end;
|
|
|
+
|
|
|
+
|
|
|
function TGtkSHWidget.GetHorzPos: Integer;
|
|
|
begin
|
|
|
Result := Trunc(hadj^.value);
|
|
@@ -573,7 +588,67 @@ end.
|
|
|
|
|
|
{
|
|
|
$Log$
|
|
|
- Revision 1.2 2000-07-13 11:33:02 michael
|
|
|
- + removed logs
|
|
|
-
|
|
|
-}
|
|
|
+ Revision 1.1.2.1 2001-02-04 14:29:29 sg
|
|
|
+ Improvements as suggested by Vasily Volchenko:
|
|
|
+ * Added mapping for Enter key (= it works now :) )
|
|
|
+ * Simple clipboard implementation. (although the keys for clipboard
|
|
|
+ functions don't work yet)
|
|
|
+
|
|
|
+ Revision 1.1 2000/07/13 06:33:44 michael
|
|
|
+ + Initial import
|
|
|
+
|
|
|
+ Revision 1.4 2000/02/22 14:31:04 sg
|
|
|
+ * Added destructor, to fix memory leaks
|
|
|
+
|
|
|
+ Revision 1.3 2000/01/31 19:26:13 sg
|
|
|
+ * Changed to the new interface
|
|
|
+
|
|
|
+ Revision 1.2 2000/01/07 01:24:34 peter
|
|
|
+ * updated copyright to 2000
|
|
|
+
|
|
|
+ Revision 1.1 2000/01/06 16:03:26 peter
|
|
|
+ * moved gtkshedit to gtk dir
|
|
|
+
|
|
|
+ Revision 1.12 2000/01/06 01:20:34 peter
|
|
|
+ * moved out of packages/ back to topdir
|
|
|
+
|
|
|
+ Revision 1.1 2000/01/03 19:33:09 peter
|
|
|
+ * moved to packages dir
|
|
|
+
|
|
|
+ Revision 1.10 1999/12/30 21:05:08 sg
|
|
|
+ * Lot of renamings
|
|
|
+
|
|
|
+ Revision 1.8 1999/12/22 22:28:08 peter
|
|
|
+ * updates for cursor setting
|
|
|
+ * button press event works
|
|
|
+
|
|
|
+ Revision 1.7 1999/12/12 17:50:50 sg
|
|
|
+ * Fixed drawing of selection
|
|
|
+ * Several small corrections (removed superfluous local variables etc.)
|
|
|
+
|
|
|
+ Revision 1.6 1999/12/10 15:01:02 peter
|
|
|
+ * first things for selection
|
|
|
+ * Better Adjusting of range/cursor
|
|
|
+
|
|
|
+ Revision 1.5 1999/12/09 23:16:41 peter
|
|
|
+ * cursor walking is now possible, both horz and vert ranges are now
|
|
|
+ adapted
|
|
|
+ * filter key modifiers
|
|
|
+ * selection move routines added, but still no correct output to the
|
|
|
+ screen
|
|
|
+
|
|
|
+ Revision 1.4 1999/12/08 01:03:15 peter
|
|
|
+ * changes so redrawing and walking with the cursor finally works
|
|
|
+ correct
|
|
|
+
|
|
|
+ Revision 1.3 1999/12/08 00:42:54 sg
|
|
|
+ * The cursor should be displayed correctly now
|
|
|
+
|
|
|
+ Revision 1.2 1999/12/06 21:27:27 peter
|
|
|
+ * gtk updates, redrawing works now much better and clears only between
|
|
|
+ x1 and x2
|
|
|
+
|
|
|
+ Revision 1.1 1999/11/15 21:47:36 peter
|
|
|
+ * first working keypress things
|
|
|
+
|
|
|
+}
|