Color Inheritance in Gadgets

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

2 posts / 0 new
Last post
Color Inheritance in Gadgets

I am working with the Label gadget and I am a little confused how colors are inherited.
I notice that this seems to be managed by a cache as defined in LabelGP.h with
the LabG_Cache(w) macro. This is defined to be ((XmLabelGadget(w))->label.cache.
Properties like the foreground color and background color are accessible likewise
via the LabG_Foreground and LabG_Background macros.

However, I notice when I put a breakpoint in the LabelG method Initialize, that this
cache seems to already be filled. This way when the DealWithColors method is
called, it clearly expects that the cache has real values in it.

Could somebody explain what mechanism fills this cache, and how I can watch
this structure get filled? Where would I need to put the breakpoint?

Thanks much!

ICS_support

Check the synthetic resource list for the gadget, which should point you to a function which is called at initialization.