wxSkin general questions -

Do you like to promote your wxWidgets based application or component!? Post it here and let's see what the critics have to say. Also, if you found that ONE wx component the world needs to know about, put it here for future reference.
Post Reply
rickbsgu
Earned a small fee
Earned a small fee
Posts: 16
Joined: Wed Nov 08, 2006 2:32 am

wxSkin general questions -

Post by rickbsgu » Sat Jan 13, 2007 7:11 pm

Platform: WinXP
wxWidgets: 2.8.0 final
Compiler: MSVC 7.0

Some questions:

- I've built in Unicode. Is that an issue at this early stage, do you think?

- My initial attempt is to just put up a wxSimpleFrame with a .png file, transparency is in the file. It's not showing up. Following the code, I suspect I need at least one control to show the frame?

- Do I need to specify the client area on the frame? Looking at your example, it seems to only specify the media frame? Does it (the client area) have anything to do with the buttons or other controls?

- Should I set the wxSimpleFrame as the TopLevelWidget in the app? Will it make any difference? (you don't seem to be doing this in your examples...)

- On the XML file - I'm suspecting that I will need breakout sections to handle some platform-specific differences. Or, perhaps the ability to include a sub-file based on platform. Any thoughts on this?

- I'm a little hazy on the guibuilder part. Is there some docs that fill this in?

- I will have a scenario where there will be different numbers of controls from skin to skin. The meanings of any existing controls should be the same, I think. I don't think there's an issue - just the non-existent controls will never be seen or send events...

Will be going through the examples in further detail. On the first and second issues, maybe I should try building in !unicode & see what happens.

Onward,
rickb

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Re: wxSkin general questions -

Post by upCASE » Mon Jan 15, 2007 8:39 am

Hi!
rickbsgu wrote:- I've built in Unicode. Is that an issue at this early stage, do you think?
I'm not really sure as I didn't try it. I don't say no, but I wouldn't suspect errors in that.
rickbsgu wrote: - My initial attempt is to just put up a wxSimpleFrame with a .png file, transparency is in the file. It's not showing up. Following the code, I suspect I need at least one control to show the frame?
You can have a single frame with no controls. How did you create the frame? Did you load the skin correctly and did you assign the frame to the skin identifier?
rickbsgu wrote: - Do I need to specify the client area on the frame? Looking at your example, it seems to only specify the media frame? Does it (the client area) have anything to do with the buttons or other controls?
No, it doesn't. You don't have to specify a client area at all, but it might be more convenient if you want to set more controls in that area, as you could use a sizer for that instead of absolute positioning.
rickbsgu wrote: - Should I set the wxSimpleFrame as the TopLevelWidget in the app? Will it make any difference? (you don't seem to be doing this in your examples...)
You can do that, but there's no need to as long as you only have one frame. If your app has only one wxTopLevelWindow descendant, it will be set a s the top window automatically.
rickbsgu wrote: - On the XML file - I'm suspecting that I will need breakout sections to handle some platform-specific differences. Or, perhaps the ability to include a sub-file based on platform. Any thoughts on this?
I don't really get what you mean, but feel free to add sections to the file. It should still parse correctly. You will have to parse your sections yourself. wxSkin does not have a feature to do that. You could use the
<Skin ... customInfo="">
property to set some info or link to a file.
rickbsgu wrote: - I'm a little hazy on the guibuilder part. Is there some docs that fill this in?
wxSkin uses a (slightly modified) version of Jorg guibuilder. See the docs for it here http://wastebucket.solidsteel.nl/cms/mo ... k=WiwiHome
rickbsgu wrote: - I will have a scenario where there will be different numbers of controls from skin to skin. The meanings of any existing controls should be the same, I think. I don't think there's an issue - just the non-existent controls will never be seen or send events...
Ok, no problem with that. You can simply use the "shown" property for the widgets in question to hide them.

Hope this helps a bit.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

rickbsgu
Earned a small fee
Earned a small fee
Posts: 16
Joined: Wed Nov 08, 2006 2:32 am

Post by rickbsgu » Fri Jan 19, 2007 2:14 pm

Hiyo -

Sorry I've been out of touch. I'm on vacation for a couple of weeks, hanging out in Hawaii.

I got past the Unicode problem, after wrapping a lot of bare strings in _T() calls (I note you're using 'wxT()' - same thing?), and rebuilding. Looks like it's working fine.

I'm showing the frame, now - didn't realize the frame had to be registered as a control along with the rest.

It's not respecting the png transparency on the frame, for some reason. Also, I'm noting the 'rim' effect around transparencies - these don't show up if I construct the bitmaps in a normal application. Would like to get rid of those - I'll look more closely at how the bitmaps are handled.

Probably after vacation ---

rickb

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Mon Jan 22, 2007 8:12 am

rickbsgu wrote:Sorry I've been out of touch. I'm on vacation for a couple of weeks, hanging out in Hawaii.
Good for you :)
Have a nice trip!
rickbsgu wrote:I got past the Unicode problem, after wrapping a lot of bare strings in _T() calls (I note you're using 'wxT()' - same thing?), and rebuilding. Looks like it's working fine.
Yes, wxT() is the wxWidgets equivalent. Nice to hear that it is working now.
rickbsgu wrote:I'm showing the frame, now - didn't realize the frame had to be registered as a control along with the rest.
Yes, unfortunately I had to do it this way. I had another solution once that would have wxSkin checking for the main frame and use it, but the problem is that you should be able to create more then one frame from a skinfile. Maybe I'll add a feature that make wxSkin choose the main frame automatically if only one frame is created and only one skin definition for a frame is present.
rickbsgu wrote:It's not respecting the png transparency on the frame, for some reason. Also, I'm noting the 'rim' effect around transparencies - these don't show up if I construct the bitmaps in a normal application. Would like to get rid of those - I'll look more closely at how the bitmaps are handled.
I noticed that too, but it seems to be related to how wxWidgets handles png and transparencies.
The best options you have are
1. Use XPMs
2. Use a mask color.
I do confess that this is not as convenient, but it should work properly.

The "rim" effect might be the result of the used transparency. If the "edges" are "blended" it might look ugly or pixelated. Try to "sharpen" the edges.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

Post Reply