repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 1afaf80e1c5c8a87ef9eaa17292830708ca8d988:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 1afaf80e1c5c8a87ef9eaa17292830708ca8d988
Author: Marc Lehmann 
Date:   Mon Feb 6 06:14:55 2006 +0000

    *** empty log message ***

diff --git a/Changes b/Changes
index 35d2848fc05be5df61fd178fb05ff1741ee3009a..
index ..b328ec99077f1716ae2e9f80b19fc8a198944677 100644
--- a/Changes
+++ b/Changes
@@ -4,7 +4,7 @@ TODO: event mechanism that replaces on_keyboard_command with something more scal
 TODO: overlays collide with the way the out-of-focus cursor is being drawn
 TODO: split perl documentation and urxvt.pm into separate files
 TODO: harmonize --disable-options into position-dependent options.
-TODO: "slow" rendering mode for bidi and scripts
+TODO: "slow" rendering mode for bidi and scripts, pango!
 TODO: read property sequence is broken with respect to utf-8 etc.
 TODO: slow drag selection on remote display - other things seem fast (rxvt illness?)
 WISH: look into XAddConnectionWatch, does anybody need that?
diff --git a/doc/rxvtperl.3.html b/doc/rxvtperl.3.html
index 2facb2ee1e2ffed4e49be5eb9ac5b5655d77e42d..
index ..d960b45abf54420dc6f2c975c9bf996dc42ee5ed 100644
--- a/doc/rxvtperl.3.html
+++ b/doc/rxvtperl.3.html
@@ -156,6 +156,28 @@ Rot-13 the selection when activated. Used via keyboard trigger:
 Binds a popup menu to Ctrl-Button2 that lets you toggle (some) options at
 runtime.
 
+
+

Other extensions can extend this popup menu by pushing a code reference +onto @{ $term-{option_popup_hook} }>, which gets called whenever the +popup is being displayed.

+
+
+

It's sole argument is the popup menu, which can be modified. It should +either return nothing or a string, the initial boolean value and a code +reference. The string will be used as button text and the code reference +will be called when the toggle changes, with the new boolean value as +first argument.

+
+
+

The following will add an entry myoption that changes +$self-{myoption}>:

+
+
+
+   push @{ $self->{term}{option_popup_hook} }, sub {
+      ("my option" => $myoption, sub { $self->{myoption} = $_[0] })
+   };
+

selection-popup (enabled by default)
@@ -166,8 +188,8 @@ evaluation, web-browser starting etc.), depending on content.

Other extensions can extend this popup menu by pushing a code reference -onto @{ $term-{selection_popup_hook} }>, that is called whenever the -popup is displayed.

+onto @{ $term-{selection_popup_hook} }>, which gets called whenever the +popup is being displayed.

It's sole argument is the popup menu, which can be modified. The selection @@ -1641,12 +1663,12 @@ Adds a clickable button to the popup. $cb is called whenever it is selected.

-
$popup->add_toggle ($text, $cb, $initial_value)
+
$popup->add_toggle ($text, $initial_value, $cb)
-Adds a toggle/checkbox item to the popup. Teh callback gets called -whenever it gets toggled, with a boolean indicating its value as its first -argument. +Adds a toggle/checkbox item to the popup. The callback gets called +whenever it gets toggled, with a boolean indicating its new value as its +first argument.

$popup->show
diff --git a/doc/rxvtperl.3.man.in b/doc/rxvtperl.3.man.in
index 9e7523011a6ad6a13c83df3f3e76812baf246074..
index ..3eaf0fcda3e54b9105ce92f4a30e60e605e5d854 100644
--- a/doc/rxvtperl.3.man.in
+++ b/doc/rxvtperl.3.man.in
@@ -236,6 +236,25 @@ Rot\-13 the selection when activated. Used via keyboard trigger:
 .IX Item "option-popup (enabled by default)"
 Binds a popup menu to Ctrl\-Button2 that lets you toggle (some) options at
 runtime.
+.Sp
+Other extensions can extend this popup menu by pushing a code reference
+onto \f(CW\*(C`@{ $term\-\*(C'\fR{option_popup_hook} }>, which gets called whenever the
+popup is being displayed.
+.Sp
+It's sole argument is the popup menu, which can be modified.  It should
+either return nothing or a string, the initial boolean value and a code
+reference. The string will be used as button text and the code reference
+will be called when the toggle changes, with the new boolean value as
+first argument.
+.Sp
+The following will add an entry \f(CW\*(C`myoption\*(C'\fR that changes
+\&\f(CW\*(C`$self\-\*(C'\fR{myoption}>:
+.Sp
+.Vb 3
+\&   push @{ $self->{term}{option_popup_hook} }, sub {
+\&      ("my option" => $myoption, sub { $self->{myoption} = $_[0] })
+\&   };
+.Ve
 .IP "selection-popup (enabled by default)" 4
 .IX Item "selection-popup (enabled by default)"
 Binds a popup menu to Ctrl\-Button3 that lets you convert the selection
@@ -243,8 +262,8 @@ text into various other formats/action (such as uri unescaping, perl
 evaluation, web-browser starting etc.), depending on content.
 .Sp
 Other extensions can extend this popup menu by pushing a code reference
-onto \f(CW\*(C`@{ $term\-\*(C'\fR{selection_popup_hook} }>, that is called whenever the
-popup is displayed.
+onto \f(CW\*(C`@{ $term\-\*(C'\fR{selection_popup_hook} }>, which gets called whenever the
+popup is being displayed.
 .Sp
 It's sole argument is the popup menu, which can be modified. The selection
 is in \f(CW$_\fR, which can be used to decide wether to add something or not.
@@ -1425,12 +1444,12 @@ Creates a separator, optionally using the character given as \f(CW$sepchr\fR.
 .IX Item "$popup->add_button ($text, $cb)"
 Adds a clickable button to the popup. \f(CW$cb\fR is called whenever it is
 selected.
-.ie n .IP "$popup\->add_toggle ($text, $cb\fR, \f(CW$initial_value)" 4
-.el .IP "$popup\->add_toggle ($text, \f(CW$cb\fR, \f(CW$initial_value\fR)" 4
-.IX Item "$popup->add_toggle ($text, $cb, $initial_value)"
-Adds a toggle/checkbox item to the popup. Teh callback gets called
-whenever it gets toggled, with a boolean indicating its value as its first
-argument.
+.ie n .IP "$popup\->add_toggle ($text, $initial_value\fR, \f(CW$cb)" 4
+.el .IP "$popup\->add_toggle ($text, \f(CW$initial_value\fR, \f(CW$cb\fR)" 4
+.IX Item "$popup->add_toggle ($text, $initial_value, $cb)"
+Adds a toggle/checkbox item to the popup. The callback gets called
+whenever it gets toggled, with a boolean indicating its new value as its
+first argument.
 .IP "$popup\->show" 4
 .IX Item "$popup->show"
 Displays the popup (which is initially hidden).
diff --git a/doc/rxvtperl.3.txt b/doc/rxvtperl.3.txt
index 10f699105dacd0e817202fb38ffb46d1b2ac1c98..
index ..9a4b0cfe2d3a856661785a0fc35626346db5fd21 100644
--- a/doc/rxvtperl.3.txt
+++ b/doc/rxvtperl.3.txt
@@ -81,6 +81,23 @@ PREPACKAGED EXTENSIONS
         Binds a popup menu to Ctrl-Button2 that lets you toggle (some)
         options at runtime.

+        Other extensions can extend this popup menu by pushing a code
+        reference onto "@{ $term-"{option_popup_hook} }>, which gets called
+        whenever the popup is being displayed.
+
+        It's sole argument is the popup menu, which can be modified. It
+        should either return nothing or a string, the initial boolean value
+        and a code reference. The string will be used as button text and the
+        code reference will be called when the toggle changes, with the new
+        boolean value as first argument.
+
+        The following will add an entry "myoption" that changes
+        "$self-"{myoption}>:
+
+           push @{ $self->{term}{option_popup_hook} }, sub {
+              ("my option" => $myoption, sub { $self->{myoption} = $_[0] })
+           };
+
     selection-popup (enabled by default)
         Binds a popup menu to Ctrl-Button3 that lets you convert the
         selection text into various other formats/action (such as uri
@@ -88,8 +105,8 @@ PREPACKAGED EXTENSIONS
         on content.

         Other extensions can extend this popup menu by pushing a code
-        reference onto "@{ $term-"{selection_popup_hook} }>, that is called
-        whenever the popup is displayed.
+        reference onto "@{ $term-"{selection_popup_hook} }>, which gets
+        called whenever the popup is being displayed.

         It's sole argument is the popup menu, which can be modified. The
         selection is in $_, which can be used to decide wether to add
@@ -1069,10 +1086,10 @@ API DOCUMENTATION
         Adds a clickable button to the popup. $cb is called whenever it is
         selected.

-    $popup->add_toggle ($text, $cb, $initial_value)
-        Adds a toggle/checkbox item to the popup. Teh callback gets called
-        whenever it gets toggled, with a boolean indicating its value as its
-        first argument.
+    $popup->add_toggle ($text, $initial_value, $cb)
+        Adds a toggle/checkbox item to the popup. The callback gets called
+        whenever it gets toggled, with a boolean indicating its new value as
+        its first argument.

     $popup->show
         Displays the popup (which is initially hidden).

-----END OF PAGE-----