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
This commit is contained in:
Michael R Sweet
2002-10-30 14:23:16 +00:00
parent 4bed0a3665
commit 299ebf295a
6 changed files with 71 additions and 25 deletions
+2
View File
@@ -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.
+8 -2
View File
@@ -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 $".
//
+35 -19
View File
@@ -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 &lt;FL/Fl_Tile.H&gt;
</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 &quot;borders&quot; 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 &quot;ridges&quot; you see are
two adjacent <TT>FL_DOWN_BOX</TT>'s drawn next to each other. </P>
want.</P>
<P>The &quot;borders&quot; 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 &quot;ridges&quot; 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>
+5
View File
@@ -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>
+10 -2
View File
@@ -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 $".
//
+11 -2
View File
@@ -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 $".
//