Marius wrote:
Hello,
I completed drag&drop this weekend but i'm unhappy with it. The
existing implementation is relying on copyrighted code and the only
way to finish it was to copy more copyrighted code. Even with
refactoring you can see some pretty big fingerprints from borland. To
avoid copyright questions it would be best to rewrite the code, a
necessary step i'm afraid (unless somebody has better ideas?).
In order to do this we need to establish what interface is needed, but
first we need to decide if we need to be compatible with delphi. If we
want 100% compatibility we end up quickly with roughly the same code.
if we dont i don't think it has a huge impact as not many people are
using drag&drop. Also the current implementation uses wndproc
messaging and i would like to avoid that as much as possible (not sure
if it can be avoided though), so that would be the first break in
compatibility.
No, please dont break compatibility. Many components and applications
depends on drag and drop (at least I know many). So we need same
classes, same methods and properties and same messages. We only need
different implementation, but this doesnot mean such methods as
TDragObject.GetDragCursor or TDragObject.HideDragImage or another simple
getters/setters should be rewriten. Only not trivial code needs rewriting.
What i have in mind for a new implementation is to replace the
drag&drop code in controls.pas with abstract classes. I would like to
seperate the drag&drop into a DragManager and DropManager. The
managers could be in TApplication so they can be replaced and tested
seperately without recompiling Lazarus.
Besides drag&drop are there any things you would like to see
implemented in a new approach? For instance Mattias wants autodocking
and he wants to save the dock-layout (desktop ideas?)
Youre ideas, opinions and observations please
I also thinked that classes for drag and drop are better than global
variables and procedures as currently. Please do classes :)
Best regards,
Paul Ishenin.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives