diff options
author | Adam Hooper <adamh@src.gnome.org> | 2004-03-30 00:36:40 +0800 |
---|---|---|
committer | Adam Hooper <adamh@src.gnome.org> | 2004-03-30 00:36:40 +0800 |
commit | 3a4910096aaf0a3aa807f1c5c54178a11443bf50 (patch) | |
tree | 02cfda6ee8261c5f9b9a8defdec15deac6c96783 /doc/reference/tmpl/ephy-command-manager.sgml | |
parent | 9fb5753f5269d9ce94a0815660dfc907c6d96cdf (diff) | |
download | gsoc2013-epiphany-3a4910096aaf0a3aa807f1c5c54178a11443bf50.tar gsoc2013-epiphany-3a4910096aaf0a3aa807f1c5c54178a11443bf50.tar.gz gsoc2013-epiphany-3a4910096aaf0a3aa807f1c5c54178a11443bf50.tar.bz2 gsoc2013-epiphany-3a4910096aaf0a3aa807f1c5c54178a11443bf50.tar.lz gsoc2013-epiphany-3a4910096aaf0a3aa807f1c5c54178a11443bf50.tar.xz gsoc2013-epiphany-3a4910096aaf0a3aa807f1c5c54178a11443bf50.tar.zst gsoc2013-epiphany-3a4910096aaf0a3aa807f1c5c54178a11443bf50.zip |
Documented EphyCommandManager
Diffstat (limited to 'doc/reference/tmpl/ephy-command-manager.sgml')
-rw-r--r-- | doc/reference/tmpl/ephy-command-manager.sgml | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/doc/reference/tmpl/ephy-command-manager.sgml b/doc/reference/tmpl/ephy-command-manager.sgml new file mode 100644 index 000000000..060d41615 --- /dev/null +++ b/doc/reference/tmpl/ephy-command-manager.sgml @@ -0,0 +1,112 @@ +<!-- ##### SECTION Title ##### --> +EphyCommandManager + +<!-- ##### SECTION Short_Description ##### --> +Performs commands, such as cut/copy/paste + +<!-- ##### SECTION Long_Description ##### --> +<para> +An #EphyCommandManager is an interface to an #EphyEmbed which is used to perform +commands, such as cut/copy/paste. To perform any command, use +ephy_command_manager_do_command(). To test the availability of a command, use +ephy_command_manager_can_do_command(). The availability of commands depends on +the selection and actions previously performed in the #EphyEmbed. For instance, +%cmd_copy is only available if text has been selected; %cmd_undo is only +available if the user has a text input focused and has typed or erased some of +its text. +</para> +<para> +<example> +<title>Copying selected text in an #EphyEmbed</title> +<programlisting>#<![CDATA[include <ephy-embed.h>]]> +#<![CDATA[include <ephy-command-manager.h> + +static void +copy_selected_text (EphyEmbed *embed) +{ + EphyCommandManager *manager; + + manager = EPHY_COMMAND_MANAGER (embed); + g_return_if_fail (EPHY_IS_COMMAND_MANAGER (manager)); + + if (!ephy_command_manager_can_do_command (manager, "cmd_copy")) return; + + ephy_command_manager_do_command (manager, "cmd_copy"); +}]]> +</programlisting> +</example> +</para> +<para> +The #EphyCommandManager interface can perform any command which is defined in +Mozilla. However, for purposes of abstraction, only a certain subset of commands +should be used: +</para> +<variablelist><title>Available Commands</title> +<varlistentry><term>cmd_copy</term> +<listitem><para>Copies selected text</para></listitem> +</varlistentry> +<varlistentry><term>cmd_cut</term> +<listitem><para>Cuts selected text.</para></listitem> +</varlistentry> +<varlistentry><term>cmd_paste</term> +<listitem><para>Pastes text from the clipboard (for example, into a text entry) +</para></listitem> +</varlistentry> +<varlistentry><term>cmd_undo</term> +<listitem><para>Undoes the last action (for example, typing text into a text +entry</para></listitem> +</varlistentry> +<varlistentry><term>cmd_redo</term> +<listitem><para>Redoes previously %undo<!-- -->ne actions (for example, in a +text entry)</para></listitem> +</varlistentry> +</variablelist> + +<!-- ##### SECTION See_Also ##### --> +<para> + +</para> + +<!-- ##### STRUCT EphyCommandManager ##### --> +<para> + +</para> + + +<!-- ##### STRUCT EphyCommandManagerIface ##### --> +<para> + +</para> + +@base_iface: +@do_command: +@can_do_command: +@command_changed: + +<!-- ##### FUNCTION ephy_command_manager_do_command ##### --> +<para> + +</para> + +@manager: +@command: + + +<!-- ##### FUNCTION ephy_command_manager_can_do_command ##### --> +<para> + +</para> + +@manager: +@command: +@Returns: + + +<!-- ##### SIGNAL EphyCommandManager::command-changed ##### --> +<para> + +</para> + +@ephycommandmanager: the object which received the signal. +@arg1: + |