Re: Button depressing



On Fri, 2006-05-26 at 14:54 -0700, Joe Van Dyk wrote:
> Hi,
> 
> I'm rewriting a Xlib graphical application in Gtk.  There's four
> different states (run, hold, reset, shutdown)  that the application be
> be in.  The state that the application is in is determined by another
> application, but the user of the graphical application can request a
> different "state".
> 
> Here's a picture of what the buttons for changing the state look like.
>  http://img87.imageshack.us/img87/9717/buttons2mv.png  The application
> is in "reset" mode currently.  Notice how the reset button is
> depressed.
> 
> I'm struggling how to reproduce that look in Gtk.    I initially tried
> toggle and radio buttons, but I couldn't figure out how to tell a
> button to be active / toggled without generating a "toggled" event,

It's up to you whether to handle that signal. With a bool you can stop
yourself from handling it.

> which would tell the application to send a request to change the
> state.
> 
> Any ideas?  I'm guessing I have two solutions.  One is to figure out
> how to get a normal button to look "depressed" like it does in the
> picture.  The other solution is to figure out how to be able to tell a
> toggle button to be toggled without that button emitting a toggled
> event (which would tell the application to change state, when the user
> hasn't requested a state change).

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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