Author Topic: Added new image tools to wxSmith  (Read 17776 times)

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Added new image tools to wxSmith
« on: August 30, 2010, 06:28:45 pm »

 Hi Guys,

I've added a new imagelist editor to wxSmith, taken from Ron Collins' very nice wxSmithImage plugin. Ron's plugin has been around for a while but had fallen out of sync. with recent changes. I've updated it for prop. grid 1.4 and cleaned it up substantially. Since we needed this facility in the core plugin, it seemed much more sensible to use the good work already done than try and redo it. Thanks Ron.

I have added wxImage and wxImageList management to wxSmith, along with the new property grid properties to support them, which means we can now import images in a much nicer fashion for use elsewhere. Therefore, I also updated my recent wxBitmapCombobox submission to use the new editor, rather than the clunky file-only facility that was initially used.

A sample image and the patches are attached.

Cryo.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added new image tools to wxSmith
« Reply #1 on: September 02, 2010, 03:14:26 am »

One note: This currently breaks compatibility with the wxSmithImage plugin i.e. you can't use them both because the same controls appearing in both conflict. I will shortly provide an version of wxSmithImage that doesn't conflict so that we can still use the other great tools it provides.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Added new image tools to wxSmith
« Reply #2 on: September 02, 2010, 09:06:11 pm »
I've added a new imagelist editor to wxSmith
Sounds good to me, I'll look into it once I find the time (I am rather busy atm...).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added new image tools to wxSmith
« Reply #3 on: September 03, 2010, 06:56:30 am »
I've added a new imagelist editor to wxSmith
Sounds good to me, I'll look into it once I find the time (I am rather busy atm...).

Cool, thanks. :-)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Added new image tools to wxSmith
« Reply #4 on: September 03, 2010, 08:37:36 pm »
Cool, thanks. :-)
Ok, I tried. Here are my remarks:
The original contribution had way more image controls included, like wxImageButton, wxImageComboEditDialog, wxImageListDialog... So it seems this is only a sub-set. Why? In fact it would make things more complicated...?!

For now, I'd rather submit the original add-on instead unless you have a very good reason.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added new image tools to wxSmith
« Reply #5 on: September 06, 2010, 04:18:27 am »
Cool, thanks. :-)
Ok, I tried. Here are my remarks:
The original contribution had way more image controls included, like wxImageButton, wxImageComboEditDialog, wxImageListDialog... So it seems this is only a sub-set. Why? In fact it would make things more complicated...?!

For now, I'd rather submit the original add-on instead unless you have a very good reason.

Because I wanted the image editor and the core controls in the core code, not all of the new controls, which I think are better being in a plug-in. I was going to have to do something to allow lists of images anyway and didn't want to re-invent what had already been well done. The bitmap combobox was already in wxSmith anyway, despite it being in the original plug-in, too. My intention is also to rework the plug-in to remove those components and allow the others to use the new core code.

Secondly, if the editor's in the separate plug-in, you now have to run that plug-in or wxSmith breaks. Bad karma.

Further, I just discovered today that the editenumproperty has actually been added to wxPropGrid, so I'll have to make changes to reflect that, too, I think. Need to look at it. ;-)

Ciao.

« Last Edit: September 06, 2010, 04:23:20 am by Cryogen »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Added new image tools to wxSmith
« Reply #6 on: September 13, 2010, 12:04:05 pm »
Because I wanted the image editor and the core controls in the core code, not all of the new controls, which I think are better being in a plug-in.
OK. Do you believe it would be possible to remove those parts from the original submission (the wxSmithImage plugin) so that in summary we have both functionalities again?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added new image tools to wxSmith
« Reply #7 on: September 14, 2010, 02:48:02 am »
Because I wanted the image editor and the core controls in the core code, not all of the new controls, which I think are better being in a plug-in.
OK. Do you believe it would be possible to remove those parts from the original submission (the wxSmithImage plugin) so that in summary we have both functionalities again?

Hey Morten,

Yes, shouldn't be a problem. Just to recap, the intention was to add to wxSmith, not import wxSmithImage, as it were. The fact the some functionality came from wxSmithImage is by-the-by (and just means it's a nice piece of work). I think you might have been looking at it as though it was a half-hearted effort to bring wxSmithImage into wxSmith. That wasn't the idea.

I have some updates done and I still need to look at whether changes should be made now that editenumproperty exists in propgrid. Perhaps by the end of the week I can have it done.

Thanks,

 Gary.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Added new image tools to wxSmith
« Reply #8 on: September 14, 2010, 01:00:00 pm »
Yes, shouldn't be a problem. Just to recap, [...]
I think you might have been looking at it as though it was a half-hearted effort [...]
No no... that's wasn't the problem, I just don't wanted to sacrifice all the "missing" features of that new patch for the benefit of integrating wxSmithImage into wxSmith only partially. I agree that it's worth either splitting it up into two parts (one integrated, the other as stand-alone) or just fully integrate it into the wxSmith core. However, the latter should always ensure that the controls belong to the wxWidgets core, too.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added new image tools to wxSmith
« Reply #9 on: September 20, 2010, 12:52:26 am »
Yes, shouldn't be a problem. Just to recap, [...]
I think you might have been looking at it as though it was a half-hearted effort [...]
No no... that's wasn't the problem, I just don't wanted to sacrifice all the "missing" features of that new patch for the benefit of integrating wxSmithImage into wxSmith only partially. I agree that it's worth either splitting it up into two parts (one integrated, the other as stand-alone) or just fully integrate it into the wxSmith core. However, the latter should always ensure that the controls belong to the wxWidgets core, too.


Yeah, see my PM today. I think we've arrived at the same conclusion. :-)


Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added new image tools to wxSmith
« Reply #10 on: October 12, 2010, 05:25:52 am »
I have added the remainder of the wxSmithImage tools to wxSmith. We now have editors for combo box items and tree control items. I've applied them to wxBitmapComboBox and wxTreeCtrl, so you can now add and edit tree items within wxSmith for the first time. wxImageButton and wxImagePanel are now available in wxSmithContribItems.
These additions include many improvements and fixes.

The attached patch includes Windows and linux build files, both project and make files, tested on Win7 and Ubuntu Karmic.
The images are attached separately and you should copy the contents to your contrib directory. This will put the images in the right places in wxSmithContribItems.

If desired, you can delete wxseditenumproperty.cpp and wxseditenumproperty.h from wxSmith/wxwidgets/properties as they have been moved to wxSmith/properties, or you can wait until they arrive in trunk and let SVN sort it out.

Don't forget to thank Ron Collins for his great work on wxSmithImage.

Cheers.
« Last Edit: October 13, 2010, 01:55:56 am by Cryogen »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Added new image tools to wxSmith
« Reply #11 on: October 12, 2010, 07:05:30 am »
Unfortunately I get:
[...]
patching file "src/plugins/contrib/wxSmith/wxwidgets/defitems/wxstreectrl.cpp"                                   
Hunk #2 FAILED at 16.                                                                                             
1 out of 2 hunks FAILED -- saving rejects to file "src/plugins/contrib/wxSmith/wxwidgets/defitems/wxstreectrl.cpp.
rej"                                                                                                             
patching file "src/plugins/contrib/wxSmith/wxwidgets/defitems/wxstreectrl.h"                                     
[...]
...when I try to apply to trunk...?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added new image tools to wxSmith
« Reply #12 on: October 13, 2010, 01:59:44 am »
Unfortunately I get:
[...]
patching file "src/plugins/contrib/wxSmith/wxwidgets/defitems/wxstreectrl.cpp"                                    
Hunk #2 FAILED at 16.                                                                                            
1 out of 2 hunks FAILED -- saving rejects to file "src/plugins/contrib/wxSmith/wxwidgets/defitems/wxstreectrl.cpp.
rej"                                                                                                              
patching file "src/plugins/contrib/wxSmith/wxwidgets/defitems/wxstreectrl.h"                                      
[...]
...when I try to apply to trunk...?!


[sigh] Well, I've not seen that error before and I created it from clean SVN copy. I guess I can recreate it in case there was some sort of problem but nothing was reported.

Stand by...



...OK, done. I found that I'd missed some parts, too, wouldn't you know. Hopefully this one will work.

Ciao.

« Last Edit: October 13, 2010, 02:21:57 am by Cryogen »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Added new image tools to wxSmith
« Reply #13 on: October 13, 2010, 08:01:59 am »
...OK, done. I found that I'd missed some parts, too, wouldn't you know. Hopefully this one will work.
Sorry, but that didn't change anything unfortunately. Can you do the following:
...in your svn controlled folder of C::B...
- remove (save) all wxSmith plugin related folders, including the .svn subfolders
- do a clean checkout of these folders (use svn update in the root of trunk)
- re-apply the modifications
- in the root of trunk issue a svn diff > wxsmith.patch
- post the output here...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added new image tools to wxSmith
« Reply #14 on: October 14, 2010, 04:43:13 am »

 OK, take 3. Looking for good news, this time.