Add Viewer plugins API docs to the user manual

This commit is contained in:
Kovid Goyal 2014-07-06 08:27:06 +05:30
parent 81f3a5b5cd
commit a2d99fd452
2 changed files with 9 additions and 2 deletions

View File

@ -188,3 +188,10 @@ Preferences Plugins
:members: :members:
:member-order: bysource :member-order: bysource
Viewer plugins
----------------
.. autoclass:: calibre.customize.ViewerPlugin
:show-inheritance:
:members:
:member-order: bysource

View File

@ -693,7 +693,7 @@ class ViewerPlugin(Plugin): # {{{
def load_fonts(self): def load_fonts(self):
''' '''
This method is called once at viewer starup. It should load any fonts This method is called once at viewer startup. It should load any fonts
it wants to make available. For example:: it wants to make available. For example::
def load_fonts(): def load_fonts():
@ -734,7 +734,7 @@ class ViewerPlugin(Plugin): # {{{
def customize_context_menu(self, menu, event, hit_test_result): def customize_context_menu(self, menu, event, hit_test_result):
''' '''
This method is called every time the context (right-click) menu is This method is called every time the context (right-click) menu is
shown. You can use it to customize the context menu. event is the shown. You can use it to customize the context menu. ``event`` is the
context menu event and hit_test_result is the QWebHitTestResult for this context menu event and hit_test_result is the QWebHitTestResult for this
event in the currently loaded document. event in the currently loaded document.
''' '''