Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: ollydbg on May 22, 2024, 08:51:38 am

Title: new feature of wxSmith in r13522
Post by: ollydbg on May 22, 2024, 08:51:38 am
[r13522] (https://sourceforge.net/p/codeblocks/code/13522/)

Some new feature is added.

If no ID field is set, the generated code will use "wxID_ANY".

Another good feature is the "Use Items array" option. If this option is set, the wxChoice will use an array like below:


Code
    const wxString Choice_choices[] = {
    _("AAA"),
    _("BBB"),
    };
    Choice = new wxChoice(Panel, wxID_ANY, wxDefaultPosition, wxSize(280,-1), 2, Choice_choices, 0, wxDefaultValidator);



instead of the statement like:

Code
    Choice = new wxChoice(Panel, ID_CHOICE10, wxDefaultPosition, wxSize(280,-1), 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE10"));
    Choice->Append(_("AAA"));
    Choice->Append(_("BBB"));

So, the array can be used by other code.
Title: Re: new feature of wxSmith in r13522
Post by: tigerbeard on May 30, 2024, 01:44:41 pm
Very good. Thanks for the info.

I happen to be working a lot with wxSmith these days and I really love it.
Title: Re: new feature of wxSmith in r13522
Post by: ollydbg on May 31, 2024, 04:12:39 am
All the thanks should go to GitHubLionel, I was just the messenger.  :)

BTW: I think GitHubLionel is a wxWidgets export, because his wxMathPlot control (https://github.com/GitHubLionel/wxMathPlot)

has many new features than the old one(https://sourceforge.net/projects/wxmathplot/).