[chimerax-users] Change definitions of toolbar buttons?

Tom Goddard goddard at sonic.net
Tue May 9 18:46:01 PDT 2017


Hi Oli,

  Right now you can’t change the command run by toolbar buttons (that command is show in the log when you press the button), and you can’t define new toolbar buttons or new toolbars unless you add Python code.  But I have been wanting to remedy this for a while — basically add a command so you can add or redefine toolbar buttons.  It would allow you to specify an icon (image file), a command to run, which toolbar it goes in.  We’d love to let people distribute their own custom toolbars in the ChimeraX toolshed.

  If you are interested in hacking this now, the toolbar icons are on Mac in

	ChimeraX.app/Contents/lib/python3.6/site-packages/chimerax/shortcuts/shortcuts.py

or on Linux

	chimerax/lib/python3.6/site-packages/chimerax/shortcuts/shortcuts.py

This originally started out as the keyboard shortcuts and the toolbar icons all have equivalent 2 letter shortcuts defined in the shortcuts.py Python file.  Some toolbar icons translate into a fixed command, and others run a bit of Python code to formulate the command (for instance toggle silhouettes makes either the command “set silhouettes true” or “set silhouettes false” based on whether silhouettes are currently on).

  I’d expect to add the ability to make custom toolbars in the next 6 months but it is competing with a million other features that need to be added.

    Tom


> On May 6, 2017, at 10:10 AM, Oliver Clarke <olibclarke at gmail.com> wrote:
> 
> Hi,
> 
> Is it possible to change the definitions of toolbar buttons?
> 
> Specifically, I’m thinking about the "save image” button, the idea of which I like very much, but which saves an image that is rather too low res for my taste. Can I redefine it so that it saves a higher quality image?
> 
> More generally, will it be possible to create custom toolbar buttons, which execute an arbitrary ChimeraX command?
> 
> Cheers
> Oli
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
> 





More information about the ChimeraX-users mailing list