Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
BETA - Image Editor plugin
seb_seb0:
OK, now it is available on sourceforge, with SVN.
It was not as complicated as I feared.
Sebastien
Jenna:
Does not work on linux.
You copied the source of the bitmap-togglebutton from the msw-sources of wxWidgets, that does not work.
And using the sources from src/gtk is not so easy.
No bitmaps shown (OnPaint is never called) and after a click on any button C::B blocks xfce and I have to kill it from a console.
I started to move to wxCustmButton of wxSmithContribItems, bitmaps are shown, but no other functions (yet).
seb_seb0:
--- Quote from: jens on April 12, 2010, 12:03:56 am ---Does not work on linux.
You copied the source of the bitmap-togglebutton from the msw-sources of wxWidgets, that does not work.
And using the sources from src/gtk is not so easy.
No bitmaps shown (OnPaint is never called) and after a click on any button C::B blocks xfce and I have to kill it from a console.
I started to move to wxCustmButton of wxSmithContribItems, bitmaps are shown, but no other functions (yet).
--- End quote ---
This is good to know - I tried to find a simple solution for having a toolbox of push buttons with bitmap icons, but apparently this one is far from being ideal.
I do not know wxCustomButton (part of wxThings if I am not mistaken). I have tried a few month ago to compile wxThings with wxWidgets 2.9.0, but without success.
Another possible solution is to use a toolbar with radio buttons - it should do the trick.
Or use the same solution as wxSmith (I do not know yet what it is using, but it works).
Currently, I am in the process of cleaning the code of bugs (I do not work on new features for now), so as soon it is finished, I will look into the problem.
Since you have more experience than me in programming for wxGTK, what is your suggestion / idea ?
Sebastien
Jenna:
I think using wxCustomButton (from wxThings) for a C::B plugin is safe and it's part of the wxSmithContribItems (even if it might not be compilable with wx2.9).
C::B is not fully compatible with wx2.9, even if the core app is compilable in the meantime.
There is still an ugly crash if C::B ends due to problems with the event-handlers of the listcontrol-loggers.
And parts of contrib-plugins do not even compile.
A wx2.9 crash on linux when starting the dialogs that uses wxListBook (editorconf, settings, ...) is fixed in wxWidgets trunk since yesterday : http://trac.wxwidgets.org/ticket/11698#comment:8, that's a big step forward, because there was no easy workaround for that issue (without patching wxWidgets).
Before we switch to wx 2.9 or more likely to 3.0 (as it will be the next release) all incompatibilities will (have to) be fixed.
You can see how to use wxCustombutton in ThreadSearch-plugin (SearchInPanel.*), but I made the changes manually, because dje the original-developer of the ThreadSearch-plugin used glade to create the gui, and I prefer wxSmith (or doing it the old way, by hand).
As you use wxSmith for your panel it should be not so hard to switch to it (and it should work on linux and windows).
I hope the post is not too chaotic, but I have a terrible headache at the moment and can not really think straightforward.
seb_seb0:
Thank you for the answer.
In any case, it is easier to change now, when the plugin is in development than in 6 months, when I will have forgotten everything.
And I prefer to change a few things than having a buggy plugin which work only on my computer.
I will give a try with wxCustomButton, even if I need to modify it a bit for compilation. I will add the relevant files directly to the project to avoid external dependencies (I will look first at ThreadSearch plugin to know how it is done).
I was anyway surprised that it was so difficult to find such a simple control as a bitmap toggle button, while at the same time you find complex control like wxGrid or wxDataView.
I have also thought about a wxToolBar in the wxPanel (not recommended by the docs), or see if wxAUI is usable on wxPanel (apparently you need a wxFrame).
So to sum-up: I will try the wxCustomButton (a copy paste from ThreadSearch plugin, as much as possible).
And keep in mind that I have only a MS Window computer (no LINUX, no Mac) : so any feedback for how the plugin work (or not) on these platforms is welcome
I will try to compile wxGTK on Windows, and Codeblocks as well - maybe I can have a second platform for testing.
Good luck for your headache - I know the problem...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version