considering new plugin: image embedding in editor

Discussion about CodeLite development process and patches
User avatar
caibbor
CodeLite Veteran
Posts: 78
Joined: Thu Jan 10, 2013 10:37 pm
Genuine User: Yes
IDE Question: c++
Contact:

considering new plugin: image embedding in editor

Post by caibbor »

I have several JPEG/PNG images that I reference while coding my projects that would be much more handy to embed in the code itself, like you can do with standard word processors these days. I've never seen an IDE do this, and I'm not sure why not because this sounds insanely useful to make code easier to understand. I may spend some time checking out whether the underlying editor class (I forget it's exact name) is capable of this, and creating some sort of plugin to do this - unless there already is this sort of functionality.

One concern I have is that I'm not sure it can be done with a plugin, since it may require editing internal parts of the codelite editor
foxmuldr
CodeLite Expert
Posts: 120
Joined: Sun May 10, 2009 6:56 am
Contact:

Re: considering new plugin: image embedding in editor

Post by foxmuldr »

caibbor wrote:I have several JPEG/PNG images...one concern I have is that I'm not sure it can be done with a plugin, since it may require editing internal parts of the codelite editor
It is wxScintilla I believe. My information may be well out of date (as may my memory), but IIRC there is a derived class Codelite uses from that class. You can make the changes you need directly to the editor there.

I assume you're looking at parsing some source code line like: img://c:/my/path/file.png and then displaying the image on that line rather than the filename reference? Sounds interesting. It may be better to do it through a plugin where you can examine each line, and then have the plugin popup a remote window which persists until the user closes it, or until the line is changed, or for a period of time, etc.
Best regards,
Rick C. Hodgin
www.Visual-FreePro.org
www.LibSF.org
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: considering new plugin: image embedding in editor

Post by eranif »

caibbor wrote:I have several JPEG/PNG images that I reference while coding my projects that would be much more handy to embed in the code itself, like you can do with standard word processors these days. I've never seen an IDE do this, and I'm not sure why not because this sounds insanely useful to make code easier to understand. I may spend some time checking out whether the underlying editor class (I forget it's exact name) is capable of this, and creating some sort of plugin to do this - unless there already is this sort of functionality.

One concern I have is that I'm not sure it can be done with a plugin, since it may require editing internal parts of the codelite editor
can you illustrate what you mean with a screenshot? I am not sure I understand what you mean here
Eran
Make sure you have read the HOW TO POST thread
User avatar
caibbor
CodeLite Veteran
Posts: 78
Joined: Thu Jan 10, 2013 10:37 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: considering new plugin: image embedding in editor

Post by caibbor »

erm, the comment should say "more than" not "less than," but nevermind that.
Image
foxmuldr
CodeLite Expert
Posts: 120
Joined: Sun May 10, 2009 6:56 am
Contact:

Re: considering new plugin: image embedding in editor

Post by foxmuldr »

Is your example one from a real editor? I think using wx's editor the image line would have to be one big line.
Best regards,
Rick C. Hodgin
www.Visual-FreePro.org
www.LibSF.org
solewalker
CodeLite Veteran
Posts: 75
Joined: Thu Mar 14, 2013 11:24 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: considering new plugin: image embedding in editor

Post by solewalker »

My reply might be off topic, but I think a separate pan ( like zoom navigator) for viewing image files can easily be implemented. Currently, in CodeLite I have to open my image files with default application to view it. It would be much cool if I can see the resources (images currently) stored in the project or resources stored in a custom resource directory.

Images can be viewed as thumbnail or icons . I can also drag and drop image into the text editor. And instead of image, image path (relative / absolute) will be added in the code. User can also specify an option to place file name instead of path. In this way we can use image files in our project or code quite easily.

To support files, other than images( like audio files, svg,pdf, custom data files ), they can be viewed as default icon or thumbnail. And they can also be added in our code as images using drag and drop. This way using any kind of files in our project would be super easy.

Well, its my opinion, I don't what others think. Afaik, embedding images in the text editor would be harder to implement than a separate resource viewer.

**If there can be an option to view single image like filmstrip view then I can use images as references while coding.
Post Reply