Changes between Initial Version and Version 1 of ExtensionDevelopment


Ignore:
Timestamp:
May 9, 2009 10:21:59 AM (9 years ago)
Author:
chriz
Comment:

Migrated from old trac wiki

Legend:

Unmodified
Added
Removed
Modified
  • ExtensionDevelopment

    v1 v1  
     1First, ad-hoc method, not a formal extension: See WikidPad-Menu->Help, Page "InlinePythonEval".
     2
     3Second method, "real" extensions: Not much formal documentation, but looking at C:\Programme\WikidPad\extensions\autoNew.py (or its "real OS" equivalent :]) will get you going. But put your own extensions into "WikidPad\user_extensions", otherwise they might be lost when you update WikidPad.
     4
     5== FAQ ==
     6
     7=== How can I get help? ===
     8 * Search through both WikidPad mailing lists referenced on WikidPad's homepage.
     9 * DeveloperOverview
     10 * DeveloperGettingStarted
     11
     12=== What else should I know about ===
     13ReloadMenuPlugins is helpful for debugging.
     14
     15=== Where can I find example code? ===
     16For "real" extensions:
     17 * extensions-directory in WikidPad's install dir
     18
     19General WikidPad development:
     20 * ListOfUserScripts
     21 * WikidPad's source code
     22 * probably in WikidPad's mailing lists
     23
     24=== How can extensions register keybindings? ===
     25The function describeMenuItems returns one or more tuples, each tuple
     26describing an entry in "Plugins" menu. The second part of the tuple
     27(menu item string) can contain a shortcut after the actual item text,
     28delimited by a \t. It is enough to enter a shortcut in this way,
     29wxPython handles it then automatically.
     30
     31Example from "WikidPad\extensions\autoNew.py" (about line 47):
     32{{{
     33    return ((autoNew, "Create new page\tShift-Ctrl-N", "Create new page"),)
     34}}}
     35
     36This line is enough to register "Shift-Ctrl-N" as shortcut.
     37
     38
     39