OwnGadget v1.1 Released

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Erlend
Enthusiast
Enthusiast
Posts: 127
Joined: Mon Apr 19, 2004 8:22 pm
Location: NORWAY

OwnGadget v1.1 Released

Post by Erlend »

Hi All, Please check out the new version at

http://home.c2i.net/PreachersPlace/

Enjoy

Erlend Rovik aka Preacher
Last edited by Erlend on Thu May 06, 2004 9:28 pm, edited 1 time in total.
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

Post by Dreglor »

what does it do?
~Dreglor
GPI
PureBasic Expert
PureBasic Expert
Posts: 1396
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Dreglor wrote:what does it do?
Maybe offtopic, but

Message: 1 line
Sig: 10 lines

Take care for users, which don't have a whell-mouse...
User avatar
Erlend
Enthusiast
Enthusiast
Posts: 127
Joined: Mon Apr 19, 2004 8:22 pm
Location: NORWAY

Post by Erlend »

It allows you to create your own gadget, and the gadget will call spesified functions for repainting the gadget and when you scroll a scroll bar the gadget directly calls your function.

Check out the Demo file and you'll see what I mean...

Preacher
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

..

Post by NoahPhense »

GPI wrote:
Dreglor wrote:what does it do?
Maybe offtopic, but

Message: 1 line
Sig: 10 lines

Take care for users, which don't have a whell-mouse...
lol ;)

- np
PolyVector
Enthusiast
Enthusiast
Posts: 499
Joined: Wed Sep 17, 2003 9:17 pm
Location: Southern California
Contact:

Post by PolyVector »

wonderful library!
i love it :)
Fred
Administrator
Administrator
Posts: 18442
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

yes, very nice little lib to easy built skined gadgets.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Erlend, this is cool.

Are there any limits on # of gadgets?

Are you intending to add to the library? For example with optional call like setting/changing background color for a specific gadget. Or getting current h/vscroll position (I know can be done via code, but storing as an internal property would be neat)

Is there some way to access or refer to a gadget outside of the callbacks? For example, to draw onto or do other stuff with it.

Cool, regardless.
User avatar
Erlend
Enthusiast
Enthusiast
Posts: 127
Joined: Mon Apr 19, 2004 8:22 pm
Location: NORWAY

Post by Erlend »

Thank You Dare2!

No there are no limit of gadgets exept for available mem, but should not be a problem for anyone I guess. adding backgroundcolor for spesified gadget should not be any problem. (see if I can get it done soon) .

The internal scroll property I am not sure what you mean, if it is some thing like this:

Code: Select all

GetOwnGadget_VScroll(Gadget) 
Then I'll do it right away.

Drawing can allways be done like this:

Code: Select all

Structure PBDrawingStruct
  Type.l
  WindowHandle.l
  DC.l
  ReleaseProcedure.l
EndStructure

mydraw.PBDrawingStruct
mydraw\Type=1
mydraw\WindowHandle=gadget
mydraw\DC=GetDC_(gadget)
StartDrawing(mydraw)
; do some drawing here
StopDrawing()
As for the other stuff you speak about, I can't think of anything, but you mention it and I see what I can do.. :wink:
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Hi Erlend,

Thanks for the response and the code showing how to get a handle on the OwnGadgets.

With the properties, I was playing around and trapping mouse and scroll positions so that I could get the actual position of the mouse (eg vScroll + yMouse) relative to the top/left of the ownGadget and thought a few properties stored with the ownGadget would be nice. And somehow marking or flagging them. (Just to save on having to store/manage things outside the lib)

Your idea on GetOwnGadget_VScroll(Gadget) and GetOwnGadget_HScroll(Gadget) would be great.

Does being able to store and retrieve some values, eg (Get/Set)OwnGadget_FlagA(Gadget,Value) sound useful to you? I reckon it could be used to keep track of general status, etc.

Thanks again for this lib. :)
Post Reply