[Y-devel] State of the Widgets
Mark Thomas mark at www.y-windows.org
Fri Feb 27 19:20:09 GMT 2004
Hi Chris,
Chris Amshey wrote:
> In any case, my proposal for a solution is very simply an API along
> the lines of, 'bool themeInWidget(widget *self, int x, int y)',
> modified for compatibility of calling convention with whatever Mark's
> doing to the theme API right now. This should, I think, be called from
> whoever's really making the action decisions, whether that's where
> it is now or in a UI module.
what you'd probably want is methods like:
themeInButton (struct Button *, int, int);
themeInCheckbox (struct Checkbox *, int, int);
themeInCheckboxBox (struct Checkbox *, int, int);
themeInSlider (struct Slider *, int, int);
themeInSliderTrough (struct Slider *, int, int);
themeInSliderThumb (struct Slider *, int, int);
and so forth.
You might also need things like:
int themeSliderPositionToIndex (struct Slider *);
to convert a particular trough "hit" into an index value on the slider.
For now I think the "behaviour" of widgets can be hard-coded into the
widget code itself. If we decide behaviour modules are a good idea it
won't be hard to pull it out later, and it'll probably have a better API
than if we come up with a random one now.
In fact, I'd prefer this sort of mechanism over the ugly WindowRegions
hack I have in the windowmanager/theme interaction.
Anyone want to work on this?
Regards,
Mark.
--
|| Mark Thomas
|| www.y-windows.org
||
||
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved