Edit detail for HowTo use rClick and @popup revision 2 of 2

1 2
Editor: bobjack
Time: 2008/04/14 05:55:14 GMT-7
Note:

changed:
-The rClick plug in and the associated @popup settings offer a powerful and flexible scriptable context menu system that is unmatched in any other product shareware or proffesional.
The rClick plug in and the associated @popup settings offer a powerful and flexible scriptable context menu system that is unmatched in any other product, shareware or professional.

changed:
-- 'log' is used for the text wigets in log panes
- 'log' is used for the text widgets in log panes

Howto use @rClick and @popup context menus.

This is a preliminary to a proper Howto please feel free to contribute or ask questions here. It's a bit basic at the moment but I'll develop it over time.

The rClick plug in and the associated @popup settings offer a powerful and flexible scriptable context menu system that is unmatched in any other product, shareware or professional.

The main documentation for the rClick plugin is in the docstring of the rClick.py plugin which can be seen by clicking on the Plugins-Right Click Menus menu item in leos menu bar.

Additional examples and tests are in leo/tests/testAtPopup.leo which will eventually contain full unit tests for the plugin.

The simplest way of using rClick is to place @popup menu trees in your myLeoSettings.leo.

@popup menu trees are exactly like @menus trees except they have a few extra features which you do not have to use.

Indeed you can make a copy of the @menus tree in leoSettings.leo and change '@menus' to '@popup body' in the copy. When you restart leo and right click on the body pane the whole of leo's system menus (excluding special menus) will pop up.

@popup menus are named menus which are converted to rClick format and stored as lists in the c.context_menus dictionary. Print out that dictionary to see how the list are formated. There is a button to do this in testAtPopup.leo.

Some names are 'reserved':

  • 'body' is used as the rClick menu for the body pane
  • 'log' is used for the text widgets in log panes
  • 'canvas' for the tree canvas
  • 'headline' for the tree headlines
  • 'iconbox' for the iconbox
  • 'plusbox' for the expand contract box in the tree
  • 'find-text' for the find text entry in the find panel
  • 'change-text' for the change text entry ditto