Page 1 of 6

InfoSkin1.0 - OpenSource Theme Engine for PB4

Posted: Wed May 10, 2006 3:11 pm
by Inf0Byt3
InfoSkin is a small and fast skin engine for your PureBasic4 applications. I decided to release it under LGPL license so all coders can contribute to make it better. If you have ideas, suggestions, etc, download a copy and modify it then feel free to post the source code here if you want. I am still a noob and I don't know if I can add too many gadgets without your help... If you use it, credits would be cool, but you're not forced to do that.

Special thanks to Netmaestro for helping me with the transparent image drawing and thefool for the example tweak.

The download package contains the include file, a simple example and a region maker to skin your windows. Hope you like it. Current supported gadgets are buttons, checkboxes and progressbars.

Download
Size: 23.9 KB
MD5: BBEC4BE41059A72511C81628E3799F08
http://www.bytessence.com/download/temp/InfoSkin.zip


[Update 1]

Fixed the event handling bug.

[Update 2]

Now it uses Linked lists to minimize the memory consumption (Thx Konne).
Added new ProgressBar infogadget and manipulation functions.
Updated the example.

[Update 3]

Found and fixed a bug in the InfoSkinSetProgressBarState() wich was consuming memory [!] Please download it again if you are using it [!]
Updated the example (thanks thefool)

Posted: Wed May 10, 2006 5:25 pm
by thefool
Looks cool!!

Posted: Wed May 10, 2006 5:42 pm
by dracflamloc
Cool. I don't typically us this kind of stuff but it looks great for people who do.

Posted: Wed May 10, 2006 5:46 pm
by josku_x
Found a bug :shock:

Open up the example, then click somewhere in the example window (but not in the title bar) after that, move the mouse over the check box, and it will get checked even if you don't click on it.

It's still very nice though.

Posted: Wed May 10, 2006 5:58 pm
by rsts
Pretty slick.

Thanks for sharing.

cheers

Posted: Wed May 10, 2006 6:10 pm
by srod
Confirmed the bug reported by joshku_x. Similar behaviour for the button as well!

Posted: Wed May 10, 2006 6:29 pm
by Inf0Byt3
Thanks for the feedback :). I'm looking forward to transform this to fit our 'modernism' needs. I'm glad you like it.

About the bug, i'll fix it as soon as I get home :). Thanks.

[Edit]
Yes, that's right, it's a bug in the event handling procedure. This should be simple to fix... (i hope).

Posted: Wed May 10, 2006 8:46 pm
by Konne
Dim InfoSkinGadgets.InfoGadget(99999)

This is pretty bad u should use liked lists.

Posted: Wed May 10, 2006 9:06 pm
by Inf0Byt3
Oops! Ok, i'm gonna change that :)

Posted: Thu May 11, 2006 6:15 am
by Amundo
rsts wrote:Pretty slick.

Thanks for sharing.

cheers
Yes, very slick. Thanks Inf0Byt3.

Is this Win2K/WinXP only, with the translucency?

Posted: Thu May 11, 2006 11:20 am
by Inf0Byt3
Unfortunately yes, the transparency works only under a 2K/XP machine. Any ideas how to make this work for w98 too?

Posted: Thu May 11, 2006 1:53 pm
by Amundo
Inf0Byt3 wrote:Any ideas how to make this work for w98 too?
At the risk of being laughed off the board, I'd hazard a guess you'd need to create your own gadgets and/or subclass the existing ones :?:

Posted: Thu May 11, 2006 2:05 pm
by Inf0Byt3
That's true, but this are really custom gadgets... It's a bit hard to accomplish that i think. BTW, I updated the code. I fixed that darn bug in it but took me 2 hours to find it. Guess what: It wasn't my code who made that error it was this line:

Code: Select all

 IF GetAsyncKeyState_(#VK_LBUTTON+GetSystemMetrics_(#SM_SWAPBUTTON))
It was returning 'pressed' even if you clicked outside a infogadget. Anyway, now I replaced it with this:

Code: Select all

If GetAsyncKeyState_(#VK_LBUTTON) = -32767
And it works perfectly. Any new gadget ideas are welcome and thanks for the feedback :). Check the main post for the link.

Posted: Thu May 11, 2006 3:19 pm
by josku_x
Works like a charm, thanks for sharing. BTW, try to make a custom listview infogadget. After that you can do a combobox as it's easy to do if you have the sources of a listview.. after that add some more complex things and you have a treeview infogadget.

Posted: Thu May 11, 2006 3:57 pm
by Inf0Byt3
Thanks.
Remember we wanted to build something like this some time ago? Let's improve this one, add new gadgets, etc. What do you say?