[comp.sys.amiga] Question on PROP. gadgets using AUTOKNOB

dillon@CORY.BERKELEY.EDU.UUCP (02/25/87)

	I'm working on a simple graphical flowcharting program and am using
two proportional gadgets in the right and bottom borders to handle scrolling.

Everything works properly.  The question is: What should I do with the entry in
the Gadget structure for the Image?  INTUITION crashes if I set it to NULL,
but when I set it to some arbitrary image, it doesn't seem to affect the
proportional gadget at all.

In otherwords, no matter what I set the Image to, I get a normal rectangular
border around my prop gadget.  Now, I *want* a normal border, but do not
understand why I need a dummy image to make it all work.

Anybody have any ideas?

					-Matt

higgin@cbmvax.UUCP (02/26/87)

In article <8702251843.AA10187@cory.Berkeley.EDU> dillon@CORY.BERKELEY.EDU (Matt Dillon) writes:
$I'm working on a simple graphical flowcharting program and am using
$two proportional gadgets in the right and bottom borders to handle scrolling.
$Everything works properly.  The question is: What should I do with the entry in
$the Gadget structure for the Image?  INTUITION crashes if I set it to NULL,
$but when I set it to some arbitrary image, it doesn't seem to affect the
$proportional gadget at all.
$In otherwords, no matter what I set the Image to, I get a normal rectangular
$border around my prop gadget.  Now, I *want* a normal border, but do not
$understand why I need a dummy image to make it all work.
$Anybody have any ideas?
$		-Matt

Yes, Matt - I was puzzled by the for a while, too.  The answer is that
Intuition needs an Image structure attached to the gadget which IT uses (as
opposed to an application using it).
It (Intuition) needs to create its own version of dimensions, offsets, etc.
These get modified when you do the ModifyPropInfo() (I think that's the call...
been a while) or size the window (assuming you're using the relative sizing).
Since proportional gadgets will be represented identically (in terms of
imagery) to other gadgets by having an Image structure attached which Intuition
happens to fill in instead of the application program, these gadgets can
be updated / refreshed, etc without special [too much] special logic.

Hope this helps,
		Paul.

Disclaimer: The above might be utter bilge.

carolyn@cbmvax.UUCP (02/26/87)

In article <8702251843.AA10187@cory.Berkeley.EDU> dillon@CORY.BERKELEY.EDU (Matt Dillon) writes:

>Everything works properly.  The question is: What should I do with the entry in
>the Gadget structure for the Image?  INTUITION crashes if I set it to NULL,
>but when I set it to some arbitrary image, it doesn't seem to affect the
>proportional gadget at all.
>
>In otherwords, no matter what I set the Image to, I get a normal rectangular
>border around my prop gadget.  Now, I *want* a normal border, but do not
>understand why I need a dummy image to make it all work.

   I don't have time to search through the source for the REASON, but it
is true that Intuition requires an Image structure for prop gadgets.
In the case of AUTOKNOB props, this Image structure need not be
initialized but your GadgetRender must point to it.

   This is stated in the Intuition manual (p.5-15 CBM, p.98 A/W).

   My guess is that Intuition stores current info about your AutoKnob
in the Image structure.  Just like it stores info about your gadgets
and menus in your structures.  

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CBM   >>Amiga Technical Support<<
                     UUCP  ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=