Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Code snippet plugin

<< < (6/12) > >>

killerbot:
I'll add it to svn this afternoon ...

Pecan:
Once this is under SVN, If you are accepting patches, I'd like to offer the following which I've already coded in another app. It might save you some time, and avoid duplicated effort.

* clipboard copy/paste to/from tree  via toolbar (I'll adapt it to your code)

* drag/drop/copy/paste multiple formats (ie filename or text format) useful to record workspace/project/filenames when they run off the "recent" list; the user just drags/copies the workspace/project/file name into the management window and it opens as if it had been on the recent list.

* drag/drop text from/to external apps (scite and StEdit are very useful).

thanks for this nice plugin,
pecan

artoj:

--- Quote from: Pecan on August 15, 2006, 02:29:56 pm ---Once this is under SVN, If you are accepting patches, I'd like to offer the following which I've already coded in another app. It might save you some time, and avoid duplicated effort.

--- End quote ---

Sure, thanks :)


--- Quote ---* drag/drop text from/to external apps (scite and StEdit are very useful).

--- End quote ---

You do this already but you can't drag and drop to external apps. The problem is that I want to able to drag and drop within the tree also, I don't know how this and the drag and drop to external apps can be archieved (or more importantly, will it work).

Pecan:

--- Quote ---The problem is that I want to able to drag and drop within the tree also, I don't know how this and the drag and drop to external apps can be archieved (or more importantly, will it work).
--- End quote ---

Yes, it works, I already have the code.

I've also seen code that allows drag/drop within the tree by creating an xml doc of the selected source and children then inserting it in the target position. It allowed copy/moving an item up/down and in/out.

It copied the source xml to the clipboard, then inserted at the drop target.
I can't seem to find it now, but I'll keep looking. If I don't find it, and you don't get to it first, I'll try to recreate it from memory.

I also meant to say that I already had code that dragged/dropped from/to copy/pasted to/from external apps from a wxTreeCtrl. It uses another xml other than tinyXml, but it can be adapted.

I see that codesnippet can drag text "into" the tree item from an external app, but not "out" of the tree. Thats where the clipboard/dragdrop code that I have already written comes in. I'll rework it for CodeSnippets.

It would also be nice to see a "peek" of the snippet when the tree item is selected. (This is either a feature request or a "pecan todo" if you dont have time.)

artoj:

--- Quote from: Pecan on August 15, 2006, 03:46:02 pm ---Yes, it works, I already have the code.

I've also seen code that allows drag/drop within the tree by creating an xml doc of the selected source and children then inserting it in the target position. It allowed copy/moving an item up/down and in/out.

It copied the source xml to the clipboard, then inserted at the drop target.
I can't seem to find it now, but I'll keep looking. If I don't find it, and you don't get to it first, I'll try to recreate it from memory.

--- End quote ---

Wow, that's really cool way to do it, I never tought of that. :shock:


--- Quote ---I also meant to say that I already had code that dragged/dropped from/to copy/pasted to/from external apps from a wxTreeCtrl. It uses another xml other than tinyXml, but it can be adapted.

I see that codesnippet can drag text "into" the tree item from an external app, but not "out" of the tree. Thats where the clipboard/dragdrop code that I have already written comes in. I'll rework it for CodeSnippets.

--- End quote ---

OK, thanks, but could you wait untill I get my first patch integrated in to the source tree. Some of the code needs to moved, mainly the XML saving etc. to the main tree ctrl subclass. Currently the code is floating in the CodeSnippetsWindow class.


--- Quote ---It would also be nice to see a "peek" of the snippet when the tree item is selected. (This is either a feature request or a "pecan todo" if you dont have time.)

--- End quote ---

Yes, I agree, killerbot mentioned about this too. I thinked about tooltips first but after reading the wxWidgets docs it seems that they are only supported on Windows (or I'm reading the docs incorrectly). Another way would be to add some text control under the tree control, while I am not fundamentally against this, I don't think this is a good solution.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version