diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-10-30 14:23:16 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-10-30 14:23:16 +0000 |
| commit | 299ebf295a9f729f68d1ad3b923cef9e6747132c (patch) | |
| tree | bb8ca12853e707816b69d83e2deaef40683a9dd7 | |
| parent | 4bed0a3665cfa558009b8ac9b995eac11278c7a7 (diff) | |
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
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | FL/Enumerations.H | 10 | ||||
| -rw-r--r-- | documentation/Fl_Tile.html | 54 | ||||
| -rw-r--r-- | documentation/enumerations.html | 5 | ||||
| -rw-r--r-- | src/Fl_Input.cxx | 12 | ||||
| -rw-r--r-- | src/Fl_Text_Editor.cxx | 13 |
6 files changed, 71 insertions, 25 deletions
@@ -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 @@ -<HTML><BODY> +<HTML> +<BODY> + <!-- NEW PAGE --> + <H2><A name=Fl_Tile>class Fl_Tile</A></H2> + <HR> + <H3>Class Hierarchy</H3> -<UL> -<PRE> + +<UL><PRE> <A href=Fl_Group.html#Fl_Group>Fl_Group</A> | +----<B>Fl_Tile</B> -</PRE> -</UL> +</PRE></UL> + <H3>Include Files</H3> -<UL> -<PRE> + +<UL><PRE> #include <FL/Fl_Tile.H> -</PRE> -</UL> +</PRE></UL> + <H3>Description</H3> - The <TT>Fl_Tile</TT> class lets you resize the children by dragging + +<P>The <TT>Fl_Tile</TT> class lets you resize the children by dragging the border between them: + <P ALIGN=CENTER><IMG src="Fl_Tile.gif" ALT="Fl_Tile widget."></P> + <P><TT>Fl_Tile</TT> allows objects to be resized to zero dimensions. - To prevent this you can use the <TT>resizable()</TT> to limit where -corners can be dragged to. </P> +To prevent this you can use the <TT>resizable()</TT> to limit where +corners can be dragged to.</P> + <P>Even though objects can be resized to zero sizes, they must initially have non-zero sizes so the <TT>Fl_Tile</TT> can figure out -their layout. If desired, call <TT>position()</TT> after creating the +their layout. If desired, call <TT>position()</TT> after creating the children but before displaying the window to set the borders where you -want. </P> -<P>The "borders" are part of the children, an - <TT>Fl_Tile</TT> does not -draw any graphics of it's own. In the above example all the final -children have <TT>FL_DOWN_BOX</TT> types, and the "ridges" you see are -two adjacent <TT>FL_DOWN_BOX</TT>'s drawn next to each other. </P> +want.</P> + +<P>The "borders" are part of the children - +<TT>Fl_Tile</TT> does not draw any graphics of its own. In the +example above, all of the children have <TT>FL_DOWN_BOX</TT> +types, and the "ridges" you see are actually two +adjacent <TT>FL_DOWN_BOX</TT>'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.</P> + <H3>Methods</H3> <UL> <LI><A href=#Fl_Tile.Fl_Tile>Fl_Tile</A></LI> 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</TT> and <TT>FL_SHORTCUT</TT> events: <LI><TT>FL_ALT</TT> - One of the alt keys is down. </LI> <LI><TT>FL_NUM_LOCK</TT> - The num lock is on. </LI> <LI><TT>FL_META</TT> - One of the meta/Windows keys is down. </LI> +<LI><TT>FL_COMMAND</TT> - An alias for <TT>FL_CTRL</TT> on WIN32 and X11, or +<TT>FL_META</TT> on MacOS X. </LI> <LI><TT>FL_SCROLL_LOCK</TT> - The scroll lock is on. </LI> <LI><TT>FL_BUTTON1</TT> - Mouse button 1 is pushed. </LI> <LI><TT>FL_BUTTON2</TT> - Mouse button 2 is pushed. </LI> <LI><TT>FL_BUTTON3</TT> - Mouse button 3 is pushed. </LI> +<LI><TT>FL_BUTTONS</TT> - Any mouse button is pushed. </LI> +<LI><TT>FL_BUTTON(n)</TT> - Mouse button N (N > 0) is pushed. </LI> + </UL> <!-- NEED 4in --> <H2><a name=align>Alignment Values</A></H2> 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 $". // |
