summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/en/plugins.txt36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/en/plugins.txt b/doc/en/plugins.txt
index 32fe45c3..4cef6db9 100644
--- a/doc/en/plugins.txt
+++ b/doc/en/plugins.txt
@@ -61,6 +61,41 @@ Everything else is handled by that _auto_completion()_ method (checking what
strings match, how to cycle between matches, etc). If you don’t want any
special completion for that command, just pass None (the default value).
+*del_command*:: +self+, +name+ +
+This command removes a tab command added by your plugin.
+
+* _name_: (string) the name of the command you want to remove.
+
+
+*add_tab_command*:: +self+, +tab_type+, +name+, +handler+, +help+, +completion+ +
+This method adds a tab-custom command to poezio. For example you can add /dou
+command that the user could call in a specific tab when the plugin is loaded.
+
+
+* _tab_type_: You have to _import tabs_ in order to get tabs types. The
+ following are possible:
+** _tabs.MucTab_: The MultiUserChat tabs
+** _tabs.PrivateTab_: The Private tabs
+** _tabs.ConversationTab_: The Roster tab
+** _tabs.RosterInfoTab_: The MultiUserChat, Private, and Conversation tabs
+** _tabs.ChatTab_: The MultiUserChat, Private, and Conversation tabs
+** _tabs.MucListTab_: The MultiUserChat list tabs
+* _name_: (string) the name of the command (for example, if it is 'plugintest',
+ it can add a /plugintest command)
+* _handler_: (function) the function to be called when the command is executed.
+the handler takes *args* as a parameter, which is a string of what
+is entered after the command. Split *args* (with _common.shell_split_) to use
+that as command arguments.
+* _help_: (string) the help message available for that command through the
+ _/help_ command.
+* _completion_: (function) the completion for the args of that command. It
+ takes an input object as its only argument. This function should call the
+_auto_completion()_ method on the input object, passing a list of possible
+ strings for the completion and returning the value of that call directly.
+Everything else is handled by that _auto_completion()_ method (checking what
+ strings match, how to cycle between matches, etc). If you don’t want any
+ special completion for that command, just pass None (the default value).
+
*add_event_handler**: +self+, +event_name+, +handler+ +position+
This methods adds a callback that will be called whenever the given event
occurs. <<example-2,ex 2>>
@@ -76,6 +111,7 @@ It must accept the arguments specified for that event in the
with the internal poezio events described below.
+
Attributes
----------