[chimera-dev] dialog, display it, query its size and position on the screen in pixels, reposition it, and close it.

Dougherty, Matthew T matthewd at bcm.edu
Thu Mar 28 19:56:23 PDT 2013


Hi Tom,

the USB-HID development is going well.  I implemented the code below, make it operate where I needed it, put the cursor onto the panel ready to go, using a single button push; then use another button to close it and move back to the display, click on it to make it active, so to be ready for more button pushes.  This combined with other codes I can now easily manage hundreds of savepos, or tweak z & focal parameters, then triage them later.

Now I want to do something similar for a variety of dialogs, I particularly want to move the main display, Reply Log, Volume Viewer, Model Panel, & Keyboard Shortcuts.  How can I systemically figure these out without bugging you on these small details?

Couple of other related questions & observations:
1) On the example below: the ViewerDialog has five panels.  How can I control which panel comes up?
2) with all the more sophisticated camera movements, I am beginning to rethink lighting.  In the past I have just used defaults, maybe a few adjustments on reflectivity. Can I create more lights, or move lights?  I assume I can, but I don't want to start mucking around the code and start breaking things or create things that will be hard to maintain.
3) I have noticed >50% of the time when Chimera comes up the accelerator commands are inactive requiring me to type "ac".  
4) after getting a basic USB-HID config I plan to go after volume rendering, as mentioned before.  A key method in structuring the transfer function is to push a square wave through the range of data, flagging thresholds that have interesting  density; from that combine them and individually adjust those thresholds in context of the group.  So I think the USB-HID will be helpful in sorting through it quickly.

thanks,


Matthew Dougherty
National Center for Macromolecular Imaging
Baylor College of Medicine
________________________________________
From: Tom Goddard [goddard at sonic.net]
Sent: Friday, March 08, 2013 8:40 PM
To: Dougherty, Matthew T
Cc: chimera-dev at cgl.ucsf.edu
Subject: Re: [chimera-dev] 3dconnexion

Hi Matt,

  Here is Python to get the side view dialog, display it, query its size and position on the screen in pixels, reposition it, and close it.

from chimera import dialogs, viewing
d = dialogs.find(viewing.ViewerDialog.name, create = 1) # Get the side view dialog
d.enter()  # Display the dialog
d.uiMaster().winfo_toplevel().wm_geometry()  # Get the current size and position
'400x341+1186+696'
d.uiMaster().winfo_toplevel().wm_geometry('+500+700') # set the position to 500,700
d.Close()  # Close window




More information about the Chimera-dev mailing list