parent nodes: ChangeLog | ChangeLog2003 | ChangeLog2006 | WikidPadHelp

wikidPad Hooks

Under the directory where wikidPad is installed, there is a subdirectory called "extensions".

(Note: Under MS-Windows, this install directory is file:///C|/Program%20Files/WikidPad by default.)

In this install folder there is a file called "wikidpadhooks.py".

If you know Python you can extend wikidPad by hooking into the events sent to the methods defined
in this file. For example, you could integrate wikidPad with a cvs system by plugging into the onopen, onsave, ondelete, onrename events.

file:///C|/Program%20Files/WikidPad/extensions/WikidPadHooks.py
file:///C|/Program%20Files/WikidPad/user_extensions/WikidPadHooks.py

API Documentation

The first argument to each hook function is the instance of the
PersonalWikiFrame object which is the main window of the application.
In scripts, this instance is automatically assigned to the variable
"pwiki".

If you are reading the source code of WikidPad, this instance is often
stored in member variable "pWiki", for some newer objects it has the
name "mainControl".

Selected functions of PersonalWikiFrame instance

newWiki(wikiName, wikiDir) openWiki(wikiConfigFilename, wikiWordToOpen=None, ignoreWdhName=False) saveCurrentWikiState() openWikiPage(wikiWord) findCurrentWordInTree() viewParents(word) viewChildren() viewParentLess() viewBookmarks() viewHistory() saveCurrentWikiPage() stdDialog(dlgtype, title, message, additional=None) displayErrorMessage(errorStr, exception) getWikiData() getActiveEditor() getCurrentWikiWord() getCurrentDocPage() The following documentation is outdated!

The first argument to each hook function is wikidPad itself. Here are
the available methods on the wikidPad object.

wikidPad functions


addToHistory(word) goInHistory(positionDelta) goBackInHistory() goForwardInHistory() showWikiWordOpenDialog()
showWikiWordRenameDialog()
showWikiWordRenameConfirmDialog()
showSearchDialog()
showSavedSearchesDialog()
showWikiWordDeleteDialog()
showFindReplaceDialog()

displayMessage(title, msg) wikidPad.variables

globalConfigDir globalConfigLoc globalConfig wikiAppDir wikiPadHelp config wikiName dataDir wikiData tree editor wikiData - The wiki database interface

getPage(wikiWord, itemsToLoad) getChildRelationships(wikiWord) getParentRelationships(wikiWord) getAllWords() getAllAliases() getAllRelations() getWikiWordsStartingWith(string)
getWikiWordsWith(string)
getWikiWordsModifiedWithin(days)
getParentLessWords()

renameWord(word, toWord) deleteWord(word) getWordsWithPropertyValue(key, value) findBestPathFromWordToWord(word, toWord) search(forPattern) getTodos() wikiPage object

wikiWord wikiFile parentRelations childRelations todos props getContent() save() tree control

collapse() buildTreeForWord(wikiword) text control

setWrap(onOrOffBoolean) SetText() snip() startIncrementalSearch(searchStr) endIncrementalSearch() executeSearch(searchStr, searchStartPos=-1) getWikiWordText(position) getWikiWordBeginEnd(position) isPositionInWikiWord(position) isPositionInLink(position) See the wxWindows/wxPython documentation for info about the wxTreeCtrl and wxStyledTextCtrl.

[alias: WikidPadHooks]