Re: Sliders



On Mon, 22 Nov 1999, Ivan Jager wrote:

> I am writting a theme engine. How can it know if a slider is being
> "pressed"? I would like to draw the shadow in when someone is holding
> the mouse down on a slider and out when they aren't. While it is down it
> always gets called with
> state_type=GTK_STATE_PRELIGHT and shadow_type=GTK_SHADOW_OUT but I don't
> want to draw the shadow in when it is prelight

I don't think it can be done using the information that is passed into
your theme engine's drawing function.  You might have some success by
inspecting the code for whatever widget defines the slider you're
interested in (ranges and scrollbars are done a little differently), and
checking the type of the `widget' parameter, and then sucking data out of
that if it's a range/scrollbar.  Not pretty.

One engine you could look at that does some fairly hairy stuff with widget
internals is the Metal engine, which (last time I looked) alters the way
scrollbars draw by effectively patching the widget at run-time!

-- 
-- Duncan Pierce  (D.R.Pierce@staffs.ac.uk)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]