[chimera-dev] User interface

Eric Pettersen pett at cgl.ucsf.edu
Mon May 4 11:10:53 PDT 2015


Hi Matt,
	Also, to remember interface settings across Chimera invocations, one uses a "hidden category" of preferences for your tool.  See StructMeasure/prefs.py for an example of creating such a category.  The 'prefs' variable created by that code can then be used like a dictionary:

	prefs[ANGLE_PRECISION]

returns the preferred number of decimal places to show for angle values, whereas:

	prefs[ANGLE_PRECISION] = 3

would both set and save that value (hidden categories auto-save).
	There is a more complicated example of setting up a hidden category in MultAlignViewer/prefs.py.

--Eric

                        Eric Pettersen
                        UCSF Computer Graphics Lab
                        http://www.cgl.ucsf.edu

On May 4, 2015, at 10:29 AM, Tom Goddard <goddard at sonic.net> wrote:

> Hi Matt,
> 
> Chimera uses tabbed windows in a few places.  This uses the PMW (Python MegaWidget) toolkit that extends the Tk window toolkit to have fancier widgets.  I have not used PMW.  I’d suggest finding the closest dialog in Chimera using its Python code as a starting point.  There is a session saving example in the Chimera programmer’s guide:
> 
> 	http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/Main_SessionSave.html
> 
> User interface programming is a lot of work.
> 
> 	Tom
> 
>> On Apr 29, 2015, at 1:19 PM, Dougherty, Matthew T wrote:
>> 
>> I have been writing some extensions and maxed out my real estate for my control panel buttons, widgets, etc.
>> 
>> I figure I need to rewrite it to be more like the viewer tool, having tabs at the top to select different gui menus.
>> 
>> Can you offer me some ideas for a organizational strategy along with code ideas?
>> Eg, getting menu items to save/restore as part of a session file.
>> 
>> Matthew Dougherty
>> National Center for Macromolecular Imaging
>> Baylor College of Medicine
>> ===========================================================================
>> _______________________________________________
>> Chimera-dev mailing list
>> Chimera-dev at cgl.ucsf.edu
>> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
> 
> 
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
> 







More information about the Chimera-dev mailing list