ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Pod.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Pod.pm (file contents):
Revision 1.15 by root, Tue Sep 12 20:48:45 2006 UTC vs.
Revision 1.16 by root, Wed Dec 26 20:46:39 2007 UTC

1package CFPlus::Pod; 1package dc::Pod;
2 2
3use strict; 3use strict;
4use utf8; 4use utf8;
5 5
6use Storable; 6use Storable;
12 12
13my $MA_BEG = "\x{fcd0}"; 13my $MA_BEG = "\x{fcd0}";
14my $MA_SEP = "\x{fcd1}"; 14my $MA_SEP = "\x{fcd1}";
15my $MA_END = "\x{fcd2}"; 15my $MA_END = "\x{fcd2}";
16 16
17*wiki = Storable::retrieve CFPlus::find_rcfile "docwiki.pst"; 17*wiki = Storable::retrieve dc::find_rcfile "docwiki.pst";
18 18
19sub goto_document($) { 19sub goto_document($) {
20 $goto_document->(split /\//, $_[0]); 20 $goto_document->(split /\//, $_[0]);
21} 21}
22 22
114 "<small>img</small>" 114 "<small>img</small>"
115 }, 115 },
116 link => sub { 116 link => sub {
117 my ($par, $text, $link) = @_; 117 my ($par, $text, $link) = @_;
118 118
119 "<span foreground='#ffff00'>↺</span><span foreground='#c0c0ff' underline='single'>" . (CFPlus::asxml $text) . "</span>" 119 "<span foreground='#ffff00'>↺</span><span foreground='#c0c0ff' underline='single'>" . (dc::asxml $text) . "</span>"
120 }, 120 },
121); 121);
122 122
123sub as_label(@) { 123sub as_label(@) {
124 thaw_section @_, %as_label; 124 thaw_section @_, %as_label;
136 136
137my %as_paragraphs = ( 137my %as_paragraphs = (
138 image => sub { 138 image => sub {
139 my ($par, $path, $flags) = @_; 139 my ($par, $path, $flags) = @_;
140 140
141 push @{ $par->{widget} }, new CFPlus::UI::Image path => $path, 141 push @{ $par->{widget} }, new dc::UI::Image path => $path,
142 $flags & 1 ? (max_h => $::FONTSIZE) : (); 142 $flags & 1 ? (max_h => $::FONTSIZE) : ();
143 143
144 "\x{fffc}" 144 "\x{fffc}"
145 }, 145 },
146 link => sub { 146 link => sub {
147 my ($par, $text, $link) = @_; 147 my ($par, $text, $link) = @_;
148 148
149 push @{ $par->{widget} }, new CFPlus::UI::Label 149 push @{ $par->{widget} }, new dc::UI::Label
150 markup => "<span foreground='#ffff00'>↺</span><span foreground='#c0c0ff' underline='single'>" . (CFPlus::asxml $text) . "</span>", 150 markup => "<span foreground='#ffff00'>↺</span><span foreground='#c0c0ff' underline='single'>" . (dc::asxml $text) . "</span>",
151 fontsize => 0.8, 151 fontsize => 0.8,
152 can_hover => 1, 152 can_hover => 1,
153 can_events => 1, 153 can_events => 1,
154 padding_x => 0, 154 padding_x => 0,
155 padding_y => 0, 155 padding_y => 0,
156 tooltip => "Go to <i>" . (CFPlus::asxml $link) . "</i>", 156 tooltip => "Go to <i>" . (dc::asxml $link) . "</i>",
157 on_button_up => sub { 157 on_button_up => sub {
158 goto_document $link; 158 goto_document $link;
159 }; 159 };
160 160
161 "\x{fffc}" 161 "\x{fffc}"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines