News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

wxSmith - how it should look ?

Started by byo, October 28, 2005, 02:57:55 PM

Previous topic - Next topic

byo

Hi everybody.
Since wxSmith has been added to C::B 1.0 RC2 release I guess some of You has already used it.

If You have any suggestions, some ideas how to improve wxSmith and make it more user-friendly, it's right place to discuss about it :)

Waiting for Your advices ;)

rickg22

For starters, why does it look bad? There's some invisible button around there. I think it's a refresh issue.

Second - Icons should be in a 16x16 fashion, and preferredly in a toolbar or something similar.

Third - just a suggestion, but I think the widgets buttons might fit in part of the EditorBase area. If I recall correctly, I had modified the source in the SDK so the EditorBase is (or has) a wxPanel, so you can add your buttons in there.

That way, when you open an .xrc file, it's all contained in an editorbase object. No need for widgets tab in the bottom pane. (It doesn't make much sense having widget buttons while you're editing a text file, does it? :) )

Anyway, since i don't know much about wxsmith or how it works, this is all for now.

[attachment deleted by admin]

byo

Quote from: rickg22 on October 28, 2005, 03:38:42 PM
Third - just a suggestion, but I think the widgets buttons might fit in part of the EditorBase area. If I recall correctly, I had modified the source in the SDK so the EditorBase is (or has) a wxPanel, so you can add your buttons in there.

Havent thought about this. But I thing it's a good Idea. I really started to like it ;)

Quote
For starters, why does it look bad? There's some invisible button around there. I think it's a refresh issue.
This won't happen when You're using RC2 release, it was added after. I guess this was caused by additional panel I've created which is sometimes drawn over other widgets. But really don't have Idea how to fix this now (it may be wxWidgets bug).

geijt

Quote from: rickg22 on October 28, 2005, 03:38:42 PM
Second - Icons should be in a 16x16 fashion, and preferredly in a toolbar or something similar.
A tabbed toolbar like Borland uses for the older Delphi versions works great, all components widgets sorted

[attachment deleted by admin]

rickg22

Thanks for the info! I had forgotten how good it was to use Delphi (except *ugh* having to scroll for the tabs... eew)

geijt

Quote from: rickg22 on October 28, 2005, 08:41:18 PM
Thanks for the info! I had forgotten how good it was to use Delphi (except *ugh* having to scroll for the tabs... eew)
I don't have to scroll for the tabs! (look at my previous post)
There's a great plug-in/add-on for that bug. (the way i see it)

lesnewell

Just had a quick play with wxSmith and it looks good to me. I have a couple of questions. How do you add a new control? From the looks of it I need to:

create wxsmycontrol.cpp and .h
Add wxsMyControlId to wxsstdmanager.h
Add wxMyControl.png to the smithicons folder
Possibly add a wxsmyproperty.cpp and.h if needed
cross fingers
compile

Is that it?

Presumably everything between the //( *and //*) tags in the source must be strictly left aloneĀ  ;-)

Is there any chance of adding a
#ifndef WX_PRECOMP
#endif
guard block around the headers to speed up compilation when using PCHs. I know it is a matter of seconds to add it manually but I am a lazy sob :P

wx-DevCPP has a useful extra property called 'Base class'. Basically it just changes the widget's class name. This allows you to use a derived class without creating a new custom control. Is there any chance of implementing something similar?

Oh yeah, don't preview a borderless frame - you can't close it...

byo

Quote from: lesnewell on November 04, 2005, 04:32:18 PM
create wxsmycontrol.cpp and .h
Add wxsMyControlId to wxsstdmanager.h
Add wxMyControl.png to the smithicons folder
Possibly add a wxsmyproperty.cpp and.h if needed
cross fingers
compile

Is that it?

It's almost everything, wxsstdwidgetmanager.cpp need to be prepared for new widget also - need to add new entry to StdInfos array and add one case line into wxsStdManagerT::ProduceWidget. I've also been thinking about pluggable architecture, but this after first really stable and complete release ;)

Quote
Presumably everything between the //( *and //*) tags in the source must be strictly left alone  ;-)

Code between those comments is generated automatically so if You change it You'll loose it :). Exception is //(*Handlers comment, wxSmith will only add new code here and basically parse what's inside.

Quote
Is there any chance of adding a
#ifndef WX_PRECOMP
#endif
Shouldn't be a problem

Quote
wx-DevCPP has a useful extra property called 'Base class'. Basically it just changes the widget's class name. This allows you to use a derived class without creating a new custom control. Is there any chance of implementing something similar?

Currently there's no such thing :( but I don't think it will be a big problem, but it may take some time before we fix all bugs and other things

QuoteOh yeah, don't preview a borderless frame - you can't close it...

Try Alt+F4 ;)

Thx for all comments :)

lesnewell

Quote from: byo on November 04, 2005, 05:15:52 PM
I've also been thinking about pluggable architecture, but this after first really stable and complete release ;)

A pluggable architecture would be very nice indeed :-)

QuoteTry Alt+F4 ;)

Doh! :oops:

I am very impressed so far. Thanks for all of your hard work.

byo

Quote from: lesnewell on November 04, 2005, 07:17:41 PM
A pluggable architecture would be very nice indeed :-)

One of my basic assumptions :) There's even code prepared especially for this :D