… | |
… | |
234 | .RE |
234 | .RE |
235 | .IP "option-popup (enabled by default)" 4 |
235 | .IP "option-popup (enabled by default)" 4 |
236 | .IX Item "option-popup (enabled by default)" |
236 | .IX Item "option-popup (enabled by default)" |
237 | Binds a popup menu to Ctrl\-Button2 that lets you toggle (some) options at |
237 | Binds a popup menu to Ctrl\-Button2 that lets you toggle (some) options at |
238 | runtime. |
238 | runtime. |
|
|
239 | .Sp |
|
|
240 | Other extensions can extend this popup menu by pushing a code reference |
|
|
241 | onto \f(CW\*(C`@{ $term\-\*(C'\fR{option_popup_hook} }>, which gets called whenever the |
|
|
242 | popup is being displayed. |
|
|
243 | .Sp |
|
|
244 | It's sole argument is the popup menu, which can be modified. It should |
|
|
245 | either return nothing or a string, the initial boolean value and a code |
|
|
246 | reference. The string will be used as button text and the code reference |
|
|
247 | will be called when the toggle changes, with the new boolean value as |
|
|
248 | first argument. |
|
|
249 | .Sp |
|
|
250 | The following will add an entry \f(CW\*(C`myoption\*(C'\fR that changes |
|
|
251 | \&\f(CW\*(C`$self\-\*(C'\fR{myoption}>: |
|
|
252 | .Sp |
|
|
253 | .Vb 3 |
|
|
254 | \& push @{ $self->{term}{option_popup_hook} }, sub { |
|
|
255 | \& ("my option" => $myoption, sub { $self->{myoption} = $_[0] }) |
|
|
256 | \& }; |
|
|
257 | .Ve |
239 | .IP "selection-popup (enabled by default)" 4 |
258 | .IP "selection-popup (enabled by default)" 4 |
240 | .IX Item "selection-popup (enabled by default)" |
259 | .IX Item "selection-popup (enabled by default)" |
241 | Binds a popup menu to Ctrl\-Button3 that lets you convert the selection |
260 | Binds a popup menu to Ctrl\-Button3 that lets you convert the selection |
242 | text into various other formats/action (such as uri unescaping, perl |
261 | text into various other formats/action (such as uri unescaping, perl |
243 | evaluation, web-browser starting etc.), depending on content. |
262 | evaluation, web-browser starting etc.), depending on content. |
244 | .Sp |
263 | .Sp |
245 | Other extensions can extend this popup menu by pushing a code reference |
264 | Other extensions can extend this popup menu by pushing a code reference |
246 | onto \f(CW\*(C`@{ $term\-\*(C'\fR{selection_popup_hook} }>, that is called whenever the |
265 | onto \f(CW\*(C`@{ $term\-\*(C'\fR{selection_popup_hook} }>, which gets called whenever the |
247 | popup is displayed. |
266 | popup is being displayed. |
248 | .Sp |
267 | .Sp |
249 | It's sole argument is the popup menu, which can be modified. The selection |
268 | It's sole argument is the popup menu, which can be modified. The selection |
250 | is in \f(CW$_\fR, which can be used to decide wether to add something or not. |
269 | is in \f(CW$_\fR, which can be used to decide wether to add something or not. |
251 | It should either return nothing or a string and a code reference. The |
270 | It should either return nothing or a string and a code reference. The |
252 | string will be used as button text and the code reference will be called |
271 | string will be used as button text and the code reference will be called |
… | |
… | |
1423 | .ie n .IP "$popup\->add_button ($text, $cb)" 4 |
1442 | .ie n .IP "$popup\->add_button ($text, $cb)" 4 |
1424 | .el .IP "$popup\->add_button ($text, \f(CW$cb\fR)" 4 |
1443 | .el .IP "$popup\->add_button ($text, \f(CW$cb\fR)" 4 |
1425 | .IX Item "$popup->add_button ($text, $cb)" |
1444 | .IX Item "$popup->add_button ($text, $cb)" |
1426 | Adds a clickable button to the popup. \f(CW$cb\fR is called whenever it is |
1445 | Adds a clickable button to the popup. \f(CW$cb\fR is called whenever it is |
1427 | selected. |
1446 | selected. |
1428 | .ie n .IP "$popup\->add_toggle ($text, $cb\fR, \f(CW$initial_value)" 4 |
1447 | .ie n .IP "$popup\->add_toggle ($text, $initial_value\fR, \f(CW$cb)" 4 |
1429 | .el .IP "$popup\->add_toggle ($text, \f(CW$cb\fR, \f(CW$initial_value\fR)" 4 |
1448 | .el .IP "$popup\->add_toggle ($text, \f(CW$initial_value\fR, \f(CW$cb\fR)" 4 |
1430 | .IX Item "$popup->add_toggle ($text, $cb, $initial_value)" |
1449 | .IX Item "$popup->add_toggle ($text, $initial_value, $cb)" |
1431 | Adds a toggle/checkbox item to the popup. Teh callback gets called |
1450 | Adds a toggle/checkbox item to the popup. The callback gets called |
1432 | whenever it gets toggled, with a boolean indicating its value as its first |
1451 | whenever it gets toggled, with a boolean indicating its new value as its |
1433 | argument. |
1452 | first argument. |
1434 | .IP "$popup\->show" 4 |
1453 | .IP "$popup\->show" 4 |
1435 | .IX Item "$popup->show" |
1454 | .IX Item "$popup->show" |
1436 | Displays the popup (which is initially hidden). |
1455 | Displays the popup (which is initially hidden). |
1437 | .ie n .Sh "The ""urxvt::timer"" Class" |
1456 | .ie n .Sh "The ""urxvt::timer"" Class" |
1438 | .el .Sh "The \f(CWurxvt::timer\fP Class" |
1457 | .el .Sh "The \f(CWurxvt::timer\fP Class" |