Author Topic: wxSmith - how it should look ?  (Read 6632 times)

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
wxSmith - how it should look ?
« on: October 28, 2005, 02:57:55 pm »
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 ;)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: wxSmith - how it should look ?
« Reply #1 on: October 28, 2005, 03:38:42 pm »
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]

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith - how it should look ?
« Reply #2 on: October 28, 2005, 03:59:43 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).

Offline geijt

  • Single posting newcomer
  • *
  • Posts: 7
Re: wxSmith - how it should look ?
« Reply #3 on: October 28, 2005, 05:52:14 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]

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: wxSmith - how it should look ?
« Reply #4 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)

Offline geijt

  • Single posting newcomer
  • *
  • Posts: 7
Re: wxSmith - how it should look ?
« Reply #5 on: October 28, 2005, 09:37:31 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)

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: wxSmith - how it should look ?
« Reply #6 on: November 04, 2005, 04:32:18 pm »
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...

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith - how it should look ?
« Reply #7 on: November 04, 2005, 05:15:52 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

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

Try Alt+F4 ;)

Thx for all comments :)

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: wxSmith - how it should look ?
« Reply #8 on: November 04, 2005, 07:17:41 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 :-)

Quote
Try Alt+F4 ;)

Doh! :oops:

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

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith - how it should look ?
« Reply #9 on: November 04, 2005, 11:14:37 pm »
A pluggable architecture would be very nice indeed :-)

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