Age | Commit message (Collapse) | Author |
|
This is so they can be tested. Once DND stabilizes, I'll make the
properties available on the other components too.
|
|
|
|
* also introduced virtual DoDragStartDetected which executes
the OnDragStartDetected event
* We also added a override of DoDragStartDetected in GDI for
some extra tasks.
|
|
|
|
|
|
Mime types should be registered from most specific (first item in
mime list) to least specific (last item in mime list). The preferred
mime choice will be the first item in the list. Raise an error
if the mime list doesn't contain data.
|
|
We can't just go adding mime types without actual data associated
with each entry.
So now we match the mime stringlist to exact data count in IDataObject
|
|
* Introduced a new parameter to know if we translated the mime
type to a known Windows CF_ clipboard type.
* Fixed the spelling mistake in the function name
|
|
Finally we are getting somewhere with OLE DND.
|
|
This is needed so we can store a string in a global buffer for DND.
This will also reduce code duplication a bit, by simply allowing
us to call this function.
|
|
This allows use to easily find the TfpgDrag instance we are
working with. Same was done in X11 backend.
|
|
* Also changed FormatCount to Count (more like standard list interface)
* Also introduced a Items property (more like standard list interface)
* The above to changes also made other implementations more
simplified, so I did a bit of refactoring.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the interface anyway, not an actual object instance.
|
|
|
|
|
|
|
|
We should not modify the dwEffect variable before the user gets
a chance to look at it.
|
|
|
|
|
|
|
|
AcceptDrops: is implemented and can be toggled at runtime or
designtime.
Windows cursor also changes to show that target windows can
accept drops.
|
|
|
|
* This abstract method is called from TfpgWidget's AcceptDrops setter function
* Template implementation in X11
* Actual implementation in GDI
|
|
|
|
* implements the IDropTarget interface
* Also initialize/uninitialize OLE at application startup/stop
|
|
|
|
|
|
Even though this method was called, it should have checked the FDropAccepted
variable which did didn't. Now it correctly conforms to the XDND spec.
Due to the new behaviour we also have to make sure we free the TfpgDrag
instance when the drop is not accepted.
|
|
not correctly
set the ActionType parameter if the drag was not accepted.
|
|
component
|
|
This does error checking before and DND gets triggered. The error messages
must still be replaced with resource strings though.
|
|
|
|
If the Drop occured, but AcceptDrops = False, we must not do
any Selections conversions. This is now so.
We must still send the XdndFinished message though, so data object
can be freed, and to simply comply with XDND protocol. We now
correctly set the Accept or Decine status in the XDNDFinished
message.
|
|
This will hopefully reduce the confusion between the other
TfpgWidget.AcceptDrops property - they had too similar names.
* Applied rename changes to all other descendants too
* Updated DND demo project
|
|
If the developer did not set the AMimeChoice in OnDragEnter, then
the incorrect default could have been used. By default it
used to deflaut to 'text/plain' and never actually checked the
mime-type list to see if that exists. :-(
Now the default AMimeChoice is set the the first mime-type in
the mime-type list. This keeps with the methodology that the
mime-type list must be from most specific to least specific mime types.
|
|
The bug was that it only checked for the immediate children of
the toplevel window. It never recursed through all levels of
children finding the correct child the mouse cursor is over.
This is now fixed.
This also allows embedded frames or forms to work with DND.
|
|
There was a bug where if the component had a OnDragDrop event
handler and AcceptDrops was False, it still triggered the event.
Not any more.
|
|
I also made sure that all writeln() statements are wrapped in IFDEF's.
|
|
* Single click produces one OnClick event
* On a Double Click in produces a OnClick, then a OnDoubleClick
event. Old behaviour used to procuder yet another OnClick at
the end. This is not needed.
* OnMouseDown and OnMouseUp events behaviour has not changed.
The reason we introduce the FOnClickPending instead of fully
handling the events in TfpgWidget.MsgMouseUp is because a TfpgButton
has slightly different behavior (eg: When clicking on a button, keep
mouse down, and move mouse out of button rectangle, then an
OnClick must not fire.) The extra FOnClickPending allows us to
toggle this behaviour of HandleLButtonUp (which normally fires
the OnClick event)
|
|
This applies to:
clInactiveSel, clUnset, clGridInactiveSel
I wasn't fond of the purple / faded blue color from before.
|
|
|
|
The property does more that just set the color. It calls FormatEdit,
which changes the color of TextColor property. This meant the
parent color was never stored in FOldColor field variable.
|
|
By defining the default color, the UI Designer can omit that
line in generated code, if the color did not change.
|