Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: zylinder on July 16, 2011, 10:11:50 pm

Title: wxSmith custom properties
Post by: zylinder on July 16, 2011, 10:11:50 pm
Hi,

i'm using CodeBlocks 10.05 (just started) with wxSmith as designer.
My question is regarding the automatic code generation:
e.g.: i create a panel and want to set the property "AUI Name"
but i want to enter a variable-name instead of the "real" name.

The automatic code generation should do not add the _T("...")

Code
    WxAuiManager->AddPane(Panel1, wxAuiPaneInfo().Name(_T("AUI_NAME_LOG_WINDOW")).....

I would like to have it like this (AUI_NAME_LOG_WINDOW variable from include-file):

Code
    WxAuiManager->AddPane(Panel1, wxAuiPaneInfo().Name(AUI_NAME_LOG_WINDOW).....


Is it possible with some "special" prefixes $,% ?
Title: Re: wxSmith custom properties
Post by: oBFusCATed on July 18, 2011, 06:48:11 pm
As far as I know wxSmith doesn't support such prefixes.
But they will be handy.

Patches welcome, because I have no time at the moment to work on this :(
Title: Question: Editing wxsmith code
Post by: poda19 on August 03, 2011, 02:04:48 pm
hi,
i was reading wxsmith tutorial and i found that:
Quote
Code
//(*InternalHeaders(Tutorial_4Frame)
#include <wx/intl.h>
#include <wx/string.h>
//*)
This is a block of code that is automatically generated by wxSmith. Every block starts with a //(*BlockName comment and ends with a //*). You may find other blocks in both header and source files. If you change their content, all changes will be lost next time you change something in the editor.

does this mean that i can't edit any code that is created with wxsmith? or i can edit them(for example creating a dialog box with wxsmith and placing any wxwidgets functin,classes,headers,... in it)
(should i create a new topic for every question or ask them in a relevant topic?)
Title: Re: wxSmith custom properties
Post by: Freem on August 03, 2011, 02:14:04 pm
It mean that you can modify, but next time you'll use wxSmith on the associated file, your changes will be lost, because wxSmith will have rewritten things.
Title: Re: wxSmith custom properties
Post by: poda19 on August 03, 2011, 02:21:15 pm
thanks