Update documentation to contain DND stuff.
I am missing a decent Linux machine. Could someone please check if DND works smoothly on those machines? Just run the 'Input' test and mark and drag text out of the text widgets into another app. Then drag'n'drop text into the FLTK widgets. Finally drag text from one widget into another widget within the same FLTK app. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1972 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
4603756ed1
commit
2cde58f966
@ -49,6 +49,7 @@ state information and global methods for the current application.</P>
|
||||
<LI><A HREF="#Fl.damage">damage</A></LI>
|
||||
<LI><A HREF="#Fl.default_atclose">default_atclose</A></LI>
|
||||
<LI><A HREF="#Fl.display">display</A></LI>
|
||||
<LI><A HREF="#Fl.dnd">dnd</A></LI>
|
||||
<LI><A HREF="#Fl.error">error</A></LI>
|
||||
<LI><A HREF="#Fl.event">event</A></LI>
|
||||
<LI><A HREF="#Fl.event_alt">event_alt</A></LI>
|
||||
@ -414,6 +415,12 @@ the environment variable $DISPLAY to the passed string, so this only
|
||||
works before you show() the first window or otherwise open the display,
|
||||
and does nothing useful under WIN32.
|
||||
|
||||
<H4><A NAME="Fl.dnd">int dnd();</A></H4>
|
||||
|
||||
<P>Initiate a Drag And Drop operation. The clipboard should be filled
|
||||
with relevant data before calling this method. FLTK will then initiate
|
||||
the system wide drag'n'drop handling. Dropped data will be marked as <i>text</i>.
|
||||
|
||||
<H4><A NAME="Fl.error">void (*error)(const char*, ...);</A></H4>
|
||||
|
||||
<P>FLTK calls this to print a normal error message. You can
|
||||
|
@ -41,6 +41,11 @@ understand) occurred (0).</LI>
|
||||
clipboard. </LI>
|
||||
<LI><TT>FL_SELECTIONCLEAR</TT> - The widget should clear any selections
|
||||
made for the clipboard. </LI>
|
||||
<LI><TT>FL_MOUSEWHEEL</TT> - The horizontal or vertical mousewheel was turned. </LI>
|
||||
<LI><TT>FL_DND_ENTER</TT> - The mouse pointer entered a widget dragging data. </LI>
|
||||
<LI><TT>FL_DND_DRAG</TT> - The mouse pointer was moved dragging data. </LI>
|
||||
<LI><TT>FL_DND_LEAVE</TT> - The mouse pointer left a widget still dragging data. </LI>
|
||||
<LI><TT>FL_DND_RELEASE</TT> - Dragged data is about to be dropped. </LI>
|
||||
</UL>
|
||||
<H2><a name=when>Callback "When" Conditions</A></H2>
|
||||
The following constants determine when a callback is performed:
|
||||
|
@ -217,6 +217,30 @@ widget. This indicates that some other widget or program has
|
||||
claimed the selection. Motif programs used this to clear the
|
||||
selection indication. Most modern programs ignore this.
|
||||
|
||||
<H2><A NAME="dnd">Drag And Drop Events</A></H2>
|
||||
|
||||
<H3>FL_DND_ENTER</H3>
|
||||
|
||||
<P>The mouse has been moved to point at this widget. A widget
|
||||
that is interested in receiving drag'n'drop data must return 1
|
||||
to receive FL_DND_DRAG, FL_DND_LEAVE and FL_DND_RELEASE events.
|
||||
|
||||
<H3>FL_DND_DRAG</H3>
|
||||
|
||||
<P>The mouse has been moved inside a widget while dragging data.
|
||||
A widget that is interested in receiving drag'n'drop data should
|
||||
indicate the possible drop position.
|
||||
|
||||
<H3>FL_DND_LEAVE</H3>
|
||||
|
||||
<P>The mouse has moved out of the widget.
|
||||
|
||||
<H3>FL_DND_RELEASE</H3>
|
||||
|
||||
<P>The user has released the mouse button dropping data into
|
||||
the widget. If the widget returns 1, it will receive the data in
|
||||
the immediatly following FL_PASTE event.
|
||||
|
||||
<H2><A name="event_xxx">Fl::event_*() methods</A></H2>
|
||||
|
||||
<P>FLTK keeps the information about the most recent event in
|
||||
|
@ -595,6 +595,8 @@ version of FLTK:
|
||||
|
||||
<LI>Line styles are not well supported. This is due to
|
||||
limitations in the QuickDraw interface.</LI>
|
||||
<LI>File descriptors are not yet supported.</LI>
|
||||
<LI>Drag'n'drop is not yet supported.</LI>
|
||||
|
||||
</UL>
|
||||
|
||||
|
@ -362,6 +362,7 @@ positions you might want to call <TT>child->draw_label(x,y,w,h,a)</TT>.
|
||||
should call this on all the children if your own damage is equal to
|
||||
FL_DAMAGE_CHILD. Nothing is done if the child is not <TT>visible()</TT>
|
||||
or if it is clipped.
|
||||
|
||||
<H2>Cut and Paste Support</H2>
|
||||
FLTK provides routines to cut and paste 8-bit text (in the future this
|
||||
may be UTF-8) between applications:
|
||||
@ -372,6 +373,24 @@ may be UTF-8) between applications:
|
||||
</UL>
|
||||
It may be possible to cut/paste non-text data by using <A href=osissues.html#add_handler>
|
||||
<TT>Fl::add_handler()</TT></A>.
|
||||
|
||||
<H2>Drag And Drop Support</H2>
|
||||
|
||||
FLTK provides routines to drag and drop 8-bit text between applications:
|
||||
|
||||
<P>Drag'n'drop operations are are initiated by copying data to the
|
||||
clipboard and calling the function
|
||||
<A href="Fl.html#Fl.dnd"><TT>Fl::dnd()</TT></A>.
|
||||
|
||||
<P>Drop attempts are handled via <A href="events.html#dnd">events</A>:
|
||||
<UL>
|
||||
<LI><TT>FL_DND_ENTER</TT></LI>
|
||||
<LI><TT>FL_DND_DRAG</TT></LI>
|
||||
<LI><TT>FL_DND_LEAVE</TT></LI>
|
||||
<LI><TT>FL_DND_RELEASE</TT></LI>
|
||||
<LI><TT>FL_PASTE</TT></LI>
|
||||
</UL>
|
||||
|
||||
<H2>Making a subclass of Fl_Window</H2>
|
||||
|
||||
<P>You may want your widget to be a subclass of
|
||||
|
Loading…
Reference in New Issue
Block a user