… | |
… | |
108 | reference. The string will be used as button text and the code reference |
108 | reference. The string will be used as button text and the code reference |
109 | will be called when the toggle changes, with the new boolean value as |
109 | will be called when the toggle changes, with the new boolean value as |
110 | first argument. |
110 | first argument. |
111 | |
111 | |
112 | The following will add an entry C<myoption> that changes |
112 | The following will add an entry C<myoption> that changes |
113 | C<$self->{myoption}>: |
113 | C<< $self->{myoption} >>: |
114 | |
114 | |
115 | push @{ $self->{term}{option_popup_hook} }, sub { |
115 | push @{ $self->{term}{option_popup_hook} }, sub { |
116 | ("my option" => $myoption, sub { $self->{myoption} = $_[0] }) |
116 | ("my option" => $myoption, sub { $self->{myoption} = $_[0] }) |
117 | }; |
117 | }; |
118 | |
118 | |
… | |
… | |
1280 | =cut |
1280 | =cut |
1281 | |
1281 | |
1282 | sub resource($$;$) { |
1282 | sub resource($$;$) { |
1283 | my ($self, $name) = (shift, shift); |
1283 | my ($self, $name) = (shift, shift); |
1284 | unshift @_, $self, $name, ($name =~ s/\s*\+\s*(\d+)$// ? $1 : 0); |
1284 | unshift @_, $self, $name, ($name =~ s/\s*\+\s*(\d+)$// ? $1 : 0); |
1285 | &urxvt::term::_resource |
1285 | goto &urxvt::term::_resource |
1286 | } |
1286 | } |
1287 | |
1287 | |
1288 | =item $value = $term->x_resource ($pattern) |
1288 | =item $value = $term->x_resource ($pattern) |
1289 | |
1289 | |
1290 | Returns the X-Resource for the given pattern, excluding the program or |
1290 | Returns the X-Resource for the given pattern, excluding the program or |