Author Topic: wxSmith development  (Read 122620 times)

Offline noblus

  • Single posting newcomer
  • *
  • Posts: 2
Re: wxSmith development
« Reply #165 on: December 19, 2009, 04:54:14 am »
Just added it in my local copy, will commit this later.

Done (svn r5986).

Thanks. Excellent Efficiency :lol:

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: wxSmith development
« Reply #166 on: March 05, 2010, 07:36:15 pm »

 Hi Guys,

I added a new feature to wxSmith and posted a patch on 2/2. I probably should have announced it here sooner. The description from Berlios:

-----------
The patch was made against SVN version 6130, 2/2/10.   2010-Feb-02 21:33   cryogen
This patch adds the ability to insert code to create an image for a toolbar button or menu item. Previously you could only use an image path or wxArtProvidor. In my case, I wanted to use images embedded using wxInclude, via the wxMEMORY_BITMAP() macro. You can now insert code such as "wxMEMORY_BITMAP(save_left)" into the new field to have wxSmith create an entry such as:

ToolBarItem2 = ToolBar1->AddTool(ID_TB_SAVEUNSELECTED, _("Save Unselected"), wxMEMORY_BITMAP(save_left), wxNullBitmap, wxITEM_NORMAL, .....

Any code that returns a valid wxBitmap will work.

The Extra Code option doesn't work for these situations as it inserts the extra code after the call to Append() or Realize(), which is too late.

The patch also includes a couple of spelling corrections.
-----------

What this does is adds the fields seen here at bottom:


so that you can insert code as described above. This removes the limitation imposed by wxSmith preventing the entry of code to generate the bitmap. I hope you find it useful. You can find it as patch 2921 at https://developer.berlios.de/patch/?group_id=5358.

Cheers,

  Cryo.

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: wxSmith development
« Reply #167 on: March 05, 2010, 08:45:12 pm »

 Hi again,

I thought you could download patches from Berlios but apparently not, so it's attached.

Cheers,

  Cryo.

[attachment deleted by admin]