From 299ebf295a9f729f68d1ad3b923cef9e6747132c Mon Sep 17 00:00:00 2001
From: Michael R Sweet
Date: Wed, 30 Oct 2002 14:23:16 +0000
Subject: Update tile documentation to be explicit about widgets touching and
doing their own borders.
Support CMD+[cxv] for copy/cut/paste on OSX.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2717 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
---
CHANGES | 2 ++
FL/Enumerations.H | 10 ++++++--
documentation/Fl_Tile.html | 54 ++++++++++++++++++++++++++---------------
documentation/enumerations.html | 5 ++++
src/Fl_Input.cxx | 12 +++++++--
src/Fl_Text_Editor.cxx | 13 ++++++++--
6 files changed, 71 insertions(+), 25 deletions(-)
diff --git a/CHANGES b/CHANGES
index 5ecfa16d8..24aa195b1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.2
+ - Added a new FL_COMMAND state bit which maps to FL_CTRL
+ on X11 and WIN32 and FL_META on MacOS.
- MacOS keyboard modifiers mapping corrections. Cmd and
Control are no longer swapped, event_key and event_text
return (mostly) the same values as on other platforms.
diff --git a/FL/Enumerations.H b/FL/Enumerations.H
index ffb67d46f..794ca81b5 100644
--- a/FL/Enumerations.H
+++ b/FL/Enumerations.H
@@ -1,5 +1,5 @@
//
-// "$Id: Enumerations.H,v 1.18.2.14.2.29 2002/10/29 19:45:08 easysw Exp $"
+// "$Id: Enumerations.H,v 1.18.2.14.2.30 2002/10/30 14:23:15 easysw Exp $"
//
// Enumerations for the Fast Light Tool Kit (FLTK).
//
@@ -148,6 +148,12 @@ enum Fl_When { // Fl_Widget::when():
#define FL_BUTTONS 0x7f000000 // All possible buttons
#define FL_BUTTON(n) (0x00800000<<(n))
+#ifdef __APPLE__
+# define FL_COMMAND FL_META
+#else
+# define FL_COMMAND FL_CTRL
+#endif // __APPLE__
+
enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.C):
FL_NO_BOX = 0, FL_FLAT_BOX,
@@ -408,5 +414,5 @@ enum Fl_Damage {
#endif
//
-// End of "$Id: Enumerations.H,v 1.18.2.14.2.29 2002/10/29 19:45:08 easysw Exp $".
+// End of "$Id: Enumerations.H,v 1.18.2.14.2.30 2002/10/30 14:23:15 easysw Exp $".
//
diff --git a/documentation/Fl_Tile.html b/documentation/Fl_Tile.html
index 977326308..13e4379e5 100644
--- a/documentation/Fl_Tile.html
+++ b/documentation/Fl_Tile.html
@@ -1,38 +1,54 @@
-
+
+
+
+
+
+
Class Hierarchy
-
+
+
Fl_Group
|
+----Fl_Tile
-
-
+
+
Include Files
-
+
+
#include <FL/Fl_Tile.H>
-
-
+
+
Description
- The Fl_Tile class lets you resize the children by dragging
+
+The Fl_Tile class lets you resize the children by dragging
the border between them:
+

+
Fl_Tile allows objects to be resized to zero dimensions.
- To prevent this you can use the resizable() to limit where
-corners can be dragged to.
+To prevent this you can use the resizable() to limit where
+corners can be dragged to.
+
Even though objects can be resized to zero sizes, they must
initially have non-zero sizes so the Fl_Tile can figure out
-their layout. If desired, call position() after creating the
+their layout. If desired, call position() after creating the
children but before displaying the window to set the borders where you
-want.
-The "borders" are part of the children, an
- Fl_Tile does not
-draw any graphics of it's own. In the above example all the final
-children have FL_DOWN_BOX types, and the "ridges" you see are
-two adjacent FL_DOWN_BOX's drawn next to each other.
+want.
+
+The "borders" are part of the children -
+Fl_Tile does not draw any graphics of its own. In the
+example above, all of the children have FL_DOWN_BOX
+types, and the "ridges" you see are actually two
+adjacent FL_DOWN_BOX's drawn next to each other. All
+neighboring widgets share the same edge - the widget's thick
+borders make it appear as though the widgets aren't actually
+touching, but they are. If the edges of adjacent widgets do not
+touch, then it will be impossible to drag the corresponding
+edges.
+
Methods
- Fl_Tile
diff --git a/documentation/enumerations.html b/documentation/enumerations.html
index c7c1460e1..c5aed2a1c 100644
--- a/documentation/enumerations.html
+++ b/documentation/enumerations.html
@@ -127,10 +127,15 @@ FL_KEYBOARD and FL_SHORTCUT events:
- FL_ALT - One of the alt keys is down.
- FL_NUM_LOCK - The num lock is on.
- FL_META - One of the meta/Windows keys is down.
+- FL_COMMAND - An alias for FL_CTRL on WIN32 and X11, or
+FL_META on MacOS X.
- FL_SCROLL_LOCK - The scroll lock is on.
- FL_BUTTON1 - Mouse button 1 is pushed.
- FL_BUTTON2 - Mouse button 2 is pushed.
- FL_BUTTON3 - Mouse button 3 is pushed.
+- FL_BUTTONS - Any mouse button is pushed.
+- FL_BUTTON(n) - Mouse button N (N > 0) is pushed.
+
diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx
index 236a4cc71..25f6cd00b 100644
--- a/src/Fl_Input.cxx
+++ b/src/Fl_Input.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Input.cxx,v 1.10.2.15.2.14 2002/10/10 19:39:49 easysw Exp $"
+// "$Id: Fl_Input.cxx,v 1.10.2.15.2.15 2002/10/30 14:23:15 easysw Exp $"
//
// Input widget for the Fast Light Tool Kit (FLTK).
//
@@ -145,6 +145,14 @@ int Fl_Input::handle_key() {
case FL_Tab:
if (Fl::event_state(FL_CTRL|FL_SHIFT) || input_type()!=FL_MULTILINE_INPUT || readonly()) return 0;
return replace(position(), mark(), &ascii, 1);
+#ifdef __APPLE__
+ case 'c' :
+ case 'v' :
+ case 'x' :
+ case 'z' :
+ if (Fl::event_state(FL_META)) ascii = ctrl(Fl::event_key());
+ break;
+#endif // __APPLE__
}
int i;
@@ -396,5 +404,5 @@ Fl_Input::Fl_Input(int X, int Y, int W, int H, const char *l)
}
//
-// End of "$Id: Fl_Input.cxx,v 1.10.2.15.2.14 2002/10/10 19:39:49 easysw Exp $".
+// End of "$Id: Fl_Input.cxx,v 1.10.2.15.2.15 2002/10/30 14:23:15 easysw Exp $".
//
diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx
index 29725ca42..25c9fe54b 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.2.9 2002/10/29 17:34:47 easysw Exp $"
+// "$Id: Fl_Text_Editor.cxx,v 1.9.2.10 2002/10/30 14:23:16 easysw Exp $"
//
// Copyright 2001-2002 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@@ -102,6 +102,15 @@ static struct {
{ 'v', FL_CTRL, Fl_Text_Editor::kf_paste },
{ FL_Insert, FL_SHIFT, Fl_Text_Editor::kf_paste },
{ 'a', FL_CTRL, ctrl_a },
+
+#ifdef __APPLE__
+ // Define CMD+key accelerators...
+ { 'x', FL_COMMAND, Fl_Text_Editor::kf_cut },
+ { 'c', FL_COMMAND, Fl_Text_Editor::kf_copy },
+ { 'v', FL_COMMAND, Fl_Text_Editor::kf_paste },
+ { 'a', FL_COMMAND, ctrl_a },
+#endif // __APPLE__
+
{ 0, 0, 0 }
};
@@ -442,5 +451,5 @@ int Fl_Text_Editor::handle(int event) {
}
//
-// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.9 2002/10/29 17:34:47 easysw Exp $".
+// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.10 2002/10/30 14:23:16 easysw Exp $".
//
--
cgit v1.2.3