Range widgets and focus.



Morning all,

4 weeks ago I embarked on a rather ambitous project to write a
multi-purpose orthographic medical image viewer.....

With thanks to glade (YAY!) and gtkglarea this is where I am now at.
http://www.bic.mni.mcgill.ca/~rotor/goodies/

So first Kudos to the developers of gtk, (especially the
concept of adjustments!)

However there are a few questions that I just couldn't find the answers to
after much searching with google and of this list. Which I might add, has
been invaluable. :)

  * Taking a look at
http://www.bic.mni.mcgill.ca/~rotor/goodies/viewnup_tilts_pi_dialog.jpg
you'll note that the colourmap (Done via indexed texture maps) extents can
be adjusted via either a slider or a spinbutton. This is all fine if I
only want ranges inside the range of the current file (which the
adjustment is set to).

Is there a simple way to allow a adjustment to "grow" upon dragging of the
"edge" of it?  Same with a spin-button.  Can I let it grow beyond it's
limits or catch this via a signal and increase it's range myself?

  * Holding focus. Perhaps I am missing something but I can't seem to get
any of the gtkglarea widgets to hold mouse focus (ie when dragging in the
panes to change the views scale for example).

I assume this is what gtk_widget_grab_focus() is for and I have set
GTK_CAN_FOCUS for it.  Hrm.  I am digging through gtkrange.c to see how
it should be done! :)


Thanks for any help.

The entire thing is available to anyone who wants it.

Andrew Janke                   e-mail: rotor bic mni mcgill ca
Post-Doc (I think)             http://www.cmr.uq.edu.au/~rotor/
McConnell Brain Imaging Center
Montreal Neurological Institute
Montreal (Canada)




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