summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2010-09-23bugfix: SendDNDEnter now correctly sets first three supported data typesGraeme Geldenhuys
2010-09-23TfpgMimeDataBase: Fixed implementation of HTML property, and fixed ↵Graeme Geldenhuys
HasFormats() function
2010-09-23X11: reset the mouse cursor after a DND drop action is completeGraeme Geldenhuys
2010-09-23X11 correctly set mouse cursor for mcDefault and mcArrowGraeme Geldenhuys
2010-09-23confirming XSetSelectionOwner succeeded as per ICCCM specsGraeme Geldenhuys
2010-09-23Two new MouseCursor shapes added. mcDrag & mcNoDropGraeme Geldenhuys
* X11 DND now changes the mouse cursor depending if a drop target is available or not
2010-09-23IsDNDAware never actually returned True before. Oops!Graeme Geldenhuys
2010-09-23X11: FindWindow - renamed variable to make it easier to read and understandGraeme Geldenhuys
2010-09-23X11: Only send XdndLeave event if we actually had a FLastTarget windowGraeme Geldenhuys
2010-09-23X11: only delegate MotionNotify event to Drag object if it's actually a dragGraeme Geldenhuys
2010-09-23bugfix: I broke the array types earlier. This restores them to what they were.Graeme Geldenhuys
2010-09-23X11: delegate the DND events to the Drag object.Graeme Geldenhuys
2010-09-23fix the type of XDND implemented version fpGUI supportsGraeme Geldenhuys
2010-09-23Oops, forgot to commit the TfpgDragBase class from earlier.Graeme Geldenhuys
2010-09-23implement the higher level TfpgDrag and TfpgMimeData classes.Graeme Geldenhuys
These are independant of the backend - they contain common code and interface. TfpgDrag will be used to initiate a drag action (acting as the source of a drag), and contain the data available for that drag action.
2010-09-23X11: Two new DND helper functions introducedGraeme Geldenhuys
* IsTopLevel returns a boolean to say if a specific window is the top level window, and not some subwindow. * FindWindow tries to find the window at root coordinates x,y. we will use this to find the drop target.
2010-09-23X11: introduced a TfpgX11Drag class with handles most of the XDND messagesGraeme Geldenhuys
We offload most of the DND message processing to the TfpgX11Drag class. This helps keep the functionality with a clean design.
2010-09-23Replaced magic numbers with variable names.Graeme Geldenhuys
Now we actually know the meaning of those parameters.
2010-09-23fpgApplication got a new property: StartDragDistance.Graeme Geldenhuys
This is the distance the mouse needs to move with the left button down, before it is considered a "drag action". Default value is 5 pixels.
2010-09-23two new classes introduced to manage data associated with mime types.Graeme Geldenhuys
TfpgMimeDataBase is a base class for data associated with mime types. TfpgMimeDataStruct is a simple data class. Currently I'm not sure if Variants are the way to go for storing data, so this might change in the future.
2010-09-23More well known drop actions added to TfpgDropActionGraeme Geldenhuys
2010-09-23Move array types to interface section as it's required in other interface ↵Graeme Geldenhuys
classes.
2010-09-23Adds OnDragDrop event to TfpgWidget.Graeme Geldenhuys
For now we hard-code the data type as TfpgString. Later this will change.
2010-09-23Adds OnDragExit event to TfpgWidget.Graeme Geldenhuys
2010-09-23Reworked the HandleDNDposition() methodGraeme Geldenhuys
* Events are now only fired when the drop is truly accepted, not just because it has AcceptDrops and OnEnterDrag event handlers. Event handler needs to explicitly set Accept = True. * Default mime type used is 'text/plain' * Default drop action is daCopy (or XdndActionCopy)
2010-09-23Adds a reverse lookup: GetAtomFromDropAction()Graeme Geldenhuys
2010-09-23Adds a property EnableDrops which enables DND for a top-level window.Graeme Geldenhuys
If set to False (the default), no DND can occur in that window. No OS messages for DND are processed or received.
2010-09-23Catch the OS independent DROP[Enter|Exit] messagesGraeme Geldenhuys
Under X11 the XDND OS messages on only go to the top-level window, so we send the FPGM_ messages ourselves. Later each component will hook into this to change it's appearance to show the end-user that a drop is allowed or not. eg: Some components will get a dark/black border or something.
2010-09-23Adds OnDragEnter event for TfpgWidget.Graeme Geldenhuys
2010-09-23If TfpgForm.EnabledDrops are set before a WinHandle exists we need to queue ↵Graeme Geldenhuys
the action for later.
2010-09-23Changed bit manipulation so it makes more sense.Graeme Geldenhuys
2010-09-23Adds implementation for handling XdndSelection message.Graeme Geldenhuys
2010-09-23Fixed double free libc crash. We assumed we should always free xdndtypes.Graeme Geldenhuys
NEVER ASSUME!
2010-09-23Fixes range-check errors and compiler warnings.Graeme Geldenhuys
2010-09-23helper method to do conversion from TAtom to enum for drop actions.Graeme Geldenhuys
2010-09-23Rename TfpgDragAction(s) to TfpgDropAction(s). A more correct description of ↵Graeme Geldenhuys
what they mean.
2010-09-23X11: No need to reference xapplication because this method is inside ↵Graeme Geldenhuys
TfpgX11Application already
2010-09-23X11: Adds remained of the XDND protocol handling routinesGraeme Geldenhuys
* Add DND processing has it's own debug DEFINE as well. This limits the console output so is easier to debug.
2010-09-23Renamed DND fpGUI message constants to keep with existing naming convention.Graeme Geldenhuys
2010-09-23X11: adds HandleDNDposition() for processing XdndPosition messages.Graeme Geldenhuys
2010-09-23Adds some application wide variables that we need for tracking XDND data.Graeme Geldenhuys
2010-09-23adds new utility function fpgIsBitSet() to check if a specific Bit is set in ↵Graeme Geldenhuys
a value.
2010-09-23Fix variable types for XGetWindowProperty calls.Graeme Geldenhuys
We must use C-types and not Pascal-types.
2010-09-23Adds new boolean property AcceptDrops to TfpgWidget.Graeme Geldenhuys
This will enable/disable drop support per widget.
2010-09-23Implemented abstract DoEnableDrops() method.Graeme Geldenhuys
Also defined a few new types and TAtoms we will need for XDND support.
2010-09-23New types and message constants for DND support.Graeme Geldenhuys
Also includes an abstract method that must be implemented by each backend to enabled DND for components or forms.
2010-09-23memo: forgot to reset selection variables after a clipboard Cut action.Graeme Geldenhuys
2010-09-23memo: reduced code by simply using ResetSelectionVariables() instead.Graeme Geldenhuys
2010-09-23memo: Paste bugfix.Graeme Geldenhuys
Pasting text that consisted of multiple lines wasn't inserted on the correct lines. Resulting in pasted lines being in reverse order.
2010-09-23memo: ResetSelectionVariables was incomplete.Graeme Geldenhuys