ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/doc/rxvtperl.3.txt
(Generate patch)

Comparing rxvt-unicode/doc/rxvtperl.3.txt (file contents):
Revision 1.39 by root, Mon Feb 6 05:55:33 2006 UTC vs.
Revision 1.40 by root, Mon Feb 6 06:14:55 2006 UTC

79 79
80 option-popup (enabled by default) 80 option-popup (enabled by default)
81 Binds a popup menu to Ctrl-Button2 that lets you toggle (some) 81 Binds a popup menu to Ctrl-Button2 that lets you toggle (some)
82 options at runtime. 82 options at runtime.
83 83
84 Other extensions can extend this popup menu by pushing a code
85 reference onto "@{ $term-"{option_popup_hook} }>, which gets called
86 whenever the popup is being displayed.
87
88 It's sole argument is the popup menu, which can be modified. It
89 should either return nothing or a string, the initial boolean value
90 and a code reference. The string will be used as button text and the
91 code reference will be called when the toggle changes, with the new
92 boolean value as first argument.
93
94 The following will add an entry "myoption" that changes
95 "$self-"{myoption}>:
96
97 push @{ $self->{term}{option_popup_hook} }, sub {
98 ("my option" => $myoption, sub { $self->{myoption} = $_[0] })
99 };
100
84 selection-popup (enabled by default) 101 selection-popup (enabled by default)
85 Binds a popup menu to Ctrl-Button3 that lets you convert the 102 Binds a popup menu to Ctrl-Button3 that lets you convert the
86 selection text into various other formats/action (such as uri 103 selection text into various other formats/action (such as uri
87 unescaping, perl evaluation, web-browser starting etc.), depending 104 unescaping, perl evaluation, web-browser starting etc.), depending
88 on content. 105 on content.
89 106
90 Other extensions can extend this popup menu by pushing a code 107 Other extensions can extend this popup menu by pushing a code
91 reference onto "@{ $term-"{selection_popup_hook} }>, that is called 108 reference onto "@{ $term-"{selection_popup_hook} }>, which gets
92 whenever the popup is displayed. 109 called whenever the popup is being displayed.
93 110
94 It's sole argument is the popup menu, which can be modified. The 111 It's sole argument is the popup menu, which can be modified. The
95 selection is in $_, which can be used to decide wether to add 112 selection is in $_, which can be used to decide wether to add
96 something or not. It should either return nothing or a string and a 113 something or not. It should either return nothing or a string and a
97 code reference. The string will be used as button text and the code 114 code reference. The string will be used as button text and the code
1067 1084
1068 $popup->add_button ($text, $cb) 1085 $popup->add_button ($text, $cb)
1069 Adds a clickable button to the popup. $cb is called whenever it is 1086 Adds a clickable button to the popup. $cb is called whenever it is
1070 selected. 1087 selected.
1071 1088
1072 $popup->add_toggle ($text, $cb, $initial_value) 1089 $popup->add_toggle ($text, $initial_value, $cb)
1073 Adds a toggle/checkbox item to the popup. Teh callback gets called 1090 Adds a toggle/checkbox item to the popup. The callback gets called
1074 whenever it gets toggled, with a boolean indicating its value as its 1091 whenever it gets toggled, with a boolean indicating its new value as
1075 first argument. 1092 its first argument.
1076 1093
1077 $popup->show 1094 $popup->show
1078 Displays the popup (which is initially hidden). 1095 Displays the popup (which is initially hidden).
1079 1096
1080 The "urxvt::timer" Class 1097 The "urxvt::timer" Class

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines