Author Topic: Added some of the missing controls to wxSmith  (Read 27326 times)

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Added some of the missing controls to wxSmith
« on: July 19, 2010, 10:54:01 pm »
Adds:
wxBitmapComboBox
wxContextHelpButton
wxDialUpManager
wxHtmlEasyPrinting
wxListView
wxRichTextCtrl
wxSearchCtrl
wxSimpleHtmlListBox
wxTreebook

to wxSmith's control palette.

This patch covers all of the missing controls (I think) excepting wxGridBagSizer and those that required overriding.

I have spent over a month working on wxTreebook and wxGridBagSizer, with only limited success. wxTreebook requires functionality that doesn't exist for the other notebook controls in order to manage the tree hierarchy. I have not been able to find a method that will work within the existing framework, so far, so this patch only allows you to add nodes at the root level via wxSmith. I hope to add the missing functionality in a future update. Since the existing notebook code could do with additional functionality, I intend to revisit the whole thing later.

wxGridBagSizer has also been troublesome and I have spent most of the time on it. The difficulty is, again, due to the fact that this sizer requires additional consideration for cell positioning and spanning and the existing sizer framework doesn't do this. I am close to a solution but it has eluded me so far. I'm also having major problems debugging with GDB 7.1 on both Windows and Linux, which has made life very difficult. Rather than stay bogged down in frustrating details, I'm going to leave this one for later, too.

In this release, files can only be added to wxBitmapComboBox from files. The next release will add the ability to add images from an image list.

Finally, this one also includes a range of improvements and updates for patches 10, 12, 13 & 14 [http://forums.codeblocks.org/index.php/topic,12619.0.html] and reorganises the layout and standard toolbars. For these reasons this patch touches a lot of files. I looked at separating these things from the new controls in another patch but it's become impossible, now, to try to manage different versions of serial patches on a codebase that isn't yet in SVN.

I will try and get a release of the accompanying demo app. out over the next few days so you can see them first hand.

Cheers.
« Last Edit: July 19, 2010, 10:57:02 pm by Cryogen »

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Added some of the missing controls to wxSmith
« Reply #1 on: July 19, 2010, 11:53:24 pm »
Hello Cryogen,

I had a lot of problems applying your patches (duplicate code, incompatible changes...)
In addition, I had a bug (crash of codeblocks when editing XPMToolPanel in my XPMEditor plugin).

I do not know the cause of the bug - it comes however from the Bitmap Editor patch.
I tried to debug it, but it did not happen during a debugging session (probably a memory initialisation problem / release)

I provide here a single patch for: Dialogs, Pickers, Media + Animation, Hyperlink, Missing controls. Done against latest SVN
+ wxGLCanvas patched for wx2.9.x (#if #endif construction)
+ wxGrid patch (added 1 event handler wxGRID_CELL_CHANGED)

This patch does not produce the bug.

It will be hopefully easier to apply in the trunk.

Best regards,

Sebastien
« Last Edit: July 19, 2010, 11:57:28 pm by seb_seb0 »

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Added some of the missing controls to wxSmith
« Reply #2 on: July 19, 2010, 11:56:03 pm »
I am also missing some icons for (probably a file missing / mispelled):
  wxHtmlEasyPrinting
  wxDialupManager
  wxContextHelpButton
  wxListView
  wxRichTextCtrl
  wxSearchCtrl
  wxSimpleHtmlListBox
  wxTreebook

Thank you for the good work !

Sebastien

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added some of the missing controls to wxSmith
« Reply #3 on: July 20, 2010, 06:10:35 am »
Hey seb,

I do not know the cause of the bug - it comes however from the Bitmap Editor patch.
I tried to debug it, but it did not happen during a debugging session (probably a memory initialisation problem / release)

Hmmm, sorry about that. It has become just about impossible for me to isolate changes, now. I'm thinking of creating my own off-line repository just to manage this but I'm not sure if that'll do enough. I guess it should work. It might be that something crept in that shouldn't have. I went to a lot of trouble to avoid it but...

I provide here a single patch for: Dialogs, Pickers, Media + Animation, Hyperlink, Missing controls. Done against latest SVN
+ wxGLCanvas patched for wx2.9.x (#if #endif construction)
+ wxGrid patch (added 1 event handler wxGRID_CELL_CHANGED)

This patch does not produce the bug.

It will be hopefully easier to apply in the trunk.

Cool, thanks. I was getting to the point of doing something similar myself.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added some of the missing controls to wxSmith
« Reply #4 on: July 20, 2010, 06:12:05 am »
I am also missing some icons for (probably a file missing / mispelled):
  wxHtmlEasyPrinting
  wxDialupManager
  wxContextHelpButton
  wxListView
  wxRichTextCtrl
  wxSearchCtrl
  wxSimpleHtmlListBox
  wxTreebook

Did you download the image pack below? It sounds like you missed it.  :wink:

Thank you for the good work !

Sebastien

No problem, thanks.  :D


Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Added some of the missing controls to wxSmith
« Reply #5 on: July 20, 2010, 07:02:49 am »
I am also missing some icons for (probably a file missing / mispelled):
  wxHtmlEasyPrinting
  wxDialupManager
  wxContextHelpButton
  wxListView
  wxRichTextCtrl
  wxSearchCtrl
  wxSimpleHtmlListBox
  wxTreebook

Did you download the image pack below? It sounds like you missed it.  :wink:

Yes I did, and I checked that I had all the icons in my folders "share\..."
I will double check anyway, and let you know.

Sebastien

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: Added some of the missing controls to wxSmith
« Reply #6 on: July 20, 2010, 07:19:47 pm »
I am also missing some icons for (probably a file missing / mispelled):

Did you download the image pack below? It sounds like you missed it.  :wink:

Yes I did, and I checked that I had all the icons in my folders "share\..."
I will double check anyway, and let you know.

Well they're all in there. Add them to ...\contrib\wxSmith\wxwidgets\icons and either recompile to run the update script or run ...\contrib\wxSmith\update.bat manually. You then need to run C::B's update.bat to get them into src\output.

In future I'll try to remember to create the dir structure in the image zip.

Have fun.

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Added some of the missing controls to wxSmith
« Reply #7 on: July 20, 2010, 09:59:23 pm »
Mea culpa.
I have double-checked, and I have noticed that I have copied the file to another directory.
It is corrected, and now it works (of course).

Sorry for the disturbance - mistake was on my side.

I have tested the new tools today, and they work good (I did not test wxBitmapComboBox thought, because I could not compile it with the new wxPropGrid patch).

Some information about the patch I send you:
 
  - it takes into account the following patches from your "patchorama"
      Patch12 (animation + media)
      Patch10 (hyperlink)
      Patch13 (dialogs)
      Patch14 (pickers)
      Patch15 (missing controls, excep wxBitmapComboBox)

  - it does NOT take into account:
      Patch16 (propgrid patch: it came too late)
      Patch 1 (image selector : it provokes a bug, for an unknown reason).

  It build without problems on windows vista.
  I have not tested yet other platforms.

Other topic:
  I am approaching the end of the XPMEditor plugin (hopefully). Once I have fixed the remaining bugs, I will gladly give a hand on wxSmith.
  The first thing I would like to see done is a better handling of images in wxSmith : typically your Patch 1 is a very good start.
  You might be aware that rcoll has done another plugin which can be interesting to merge with wxSmith: it is called wxSmithImage. See here: http://forums.codeblocks.org/index.php/topic,12362.0.html (reply #5)
  It already has code to handle:
    - images lists
    - embedded images in the main wxFrame / wxDialog / wxPanel code.

Let me know what you think.

Sebastien

pafarrell

  • Guest
Re: Added some of the missing controls to wxSmith
« Reply #8 on: July 20, 2010, 11:31:52 pm »
I just updated to CB 10.05 today, because I want to work with media controls.
I installed the Debian pkgs on Ubuntu 9.04.
I was sorry to see the wxMediaCtrl missing.
I also noticed libwxsmith.so was built on May 27, which seems old enough to include cryo's patches up to #12 (thanks Cryo).
Do I need to build from source and apply the diff file myself?  Or are they being included in the berlios *.deb files.
Thanks to all of you for your excellent contributions!!!
(If I need to apply the patch, does 12 include all of the previous ones?)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Added some of the missing controls to wxSmith
« Reply #9 on: July 23, 2010, 07:09:30 am »
Adds:
wxBitmapComboBox
wxContextHelpButton
wxDialUpManager
wxHtmlEasyPrinting
wxListView
wxRichTextCtrl
wxSearchCtrl
wxSimpleHtmlListBox
wxTreebook
Just for the record: I am currently testing the whole patch. If it works, I'll commit.

BTW: I assume it_s tested under Linux? Because that'd be a problem for to do me 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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Added some of the missing controls to wxSmith
« Reply #10 on: July 23, 2010, 09:09:24 pm »
Just for the record: I am currently testing the whole patch. If it works, I'll commit.
Lucky winner: Its accepted an committed to trunk. Some of the new controls I've even already used in other projects using earlier patches of yours. So I thought it's really time to provide your hard work to the community. :-)

Could you please update the "patchorama" now to reflect the submission and make it easier for me to see what's left?

BTW: The weight which you have applied to the different controls might be worth a discussion. But we will see whether there are complains on that issue after the next nightly.

Some information about the patch I send you:
@seb_seb0: Could you please verify that this matches your expectations / experiences? Hopefully I didn't miss something...
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 seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Added some of the missing controls to wxSmith
« Reply #11 on: July 23, 2010, 10:35:19 pm »
Some information about the patch I send you:
@seb_seb0: Could you please verify that this matches your expectations / experiences? Hopefully I didn't miss something...
[/quote]

I am currently checking out the source (I do a clean check-out so it takes more time).
I will test this week-end and let you know.

Sebastien

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Added some of the missing controls to wxSmith
« Reply #12 on: July 25, 2010, 09:12:09 pm »
Hello,

sorry for the delay in replying, my computer was overheating and I had to repair it ...
So I have done a clean check-out, and re-compiled everything (nice to see there are DoxyBlocks and NassiSchneidermann plugins).
The results for me are (on Windows Vista - gcc TDM 4.4.1, wxWidgets 2.8.10):
   1 - everything compile fine
   2 - everything was working (I have made quick tests only - maybe new bugs will be discovered later).

I have seen 2 problems:
   1 - icons are missing in wxSmith, for:
             wxHyperLinkCtrl
             wxFindReplaceDialog
             wxFontDialog
             wxMessageDialog
             wxPageSetupDialog
             wxPasswordEntryDialog
             wxPrintDialog
             wxProgressDialog
             wxRichTextFormattingDialog
             wxRichTextStyleOrganizerDialog
             wxTextEntryDialog
             wxColourPicker
             wxDirPickerCtrl
             wxFilePickerCtrl
             wxFontPickerCtrl

            I attach them in the 7z archive

     2 - the wxSmithAUI cbp project file contains 2 targets : Windows & Unix. It leads to a warning message when recompiling the workspace. Is it possible to split the project in 2 files (1 for each target), and add only the Windows target to the workspace ? (and same for UNIX)

     3 - I have many times the same warning regarding wxPropGrid:
Code
..\..\..\sdk\wxpropgrid\include/wx/propgrid/propdev.h:18: warning: type attributes ignored after type is already defined
Would it be possible to remove it ? (probably a #define to do somewhere, or in the compilation line).
 

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Added some of the missing controls to wxSmith
« Reply #13 on: July 26, 2010, 08:44:24 am »
  1 - icons are missing in wxSmith, for:
Fixed that in SVN.
    2 - the wxSmithAUI cbp project file contains 2 targets : Windows & Unix. It leads to a warning message when recompiling the workspace. Is it possible to split the project in 2 files (1 for each target), and add only the Windows target to the workspace ? (and same for UNIX)
I actually like this idea of having just one project file very much, although it throws an error (actually it's a warning only). I think it's a nice "tech-demo" to explain the "platform" feature of C::B for project files. So I'd rather leave it like it is.
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 seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Added some of the missing controls to wxSmith
« Reply #14 on: July 26, 2010, 10:09:41 pm »
Fixed that in SVN.
     2 - the wxSmithAUI cbp project file contains 2 targets : Windows & Unix. It leads to a warning message when recompiling the workspace. Is it possible to split the project in 2 files (1 for each target), and add only the Windows target to the workspace ? (and same for UNIX)
I actually like this idea of having just one project file very much, although it throws an error (actually it's a warning only). I think it's a nice "tech-demo" to explain the "platform" feature of C::B for project files. So I'd rather leave it like it is.

OK, actually I was curious - at first, I thought that wxSmithAUI was not built.
And you are right, it is a nice demonstration !