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

Comparing deliantra/Deliantra-Client/DC/UI.pm (file contents):
Revision 1.120 by elmex, Sun Apr 16 17:43:17 2006 UTC vs.
Revision 1.125 by root, Mon Apr 17 20:52:15 2006 UTC

225 glPopMatrix; 225 glPopMatrix;
226 226
227 if ($self == $HOVER && $self->{can_hover}) { 227 if ($self == $HOVER && $self->{can_hover}) {
228 my ($x, $y) = @$self{qw(x y)}; 228 my ($x, $y) = @$self{qw(x y)};
229 229
230 glColor 0, 0, 1, 0.2; 230 glColor 1, 0.8, 0.5, 0.2;
231 glEnable GL_BLEND; 231 glEnable GL_BLEND;
232 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA; 232 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA;
233 glBegin GL_QUADS; 233 glBegin GL_QUADS;
234 glVertex $x , $y; 234 glVertex $x , $y;
235 glVertex $x + $self->{w}, $y; 235 glVertex $x + $self->{w}, $y;
260 my ($self, $parent) = @_; 260 my ($self, $parent) = @_;
261 261
262 Scalar::Util::weaken ($self->{parent} = $parent); 262 Scalar::Util::weaken ($self->{parent} = $parent);
263} 263}
264 264
265sub check_size {
266 my ($self) = @_;
267
268 my ($w, $h) = $self->size_request;
269
270 if ($w != $self->{req_w} || $h != $self->{req_h}) {
271 $self->{req_w} = $w;
272 $self->{req_h} = $h;
273
274 $self->{parent}->check_size
275 if $self->{parent};
276 }
277}
278
265sub update { 279sub update {
266 my ($self) = @_; 280 my ($self) = @_;
267 281
268 $self->{parent}->update 282 $self->{parent}->update
269 if $self->{parent}; 283 if $self->{parent};
376sub remove { 390sub remove {
377 my ($self, $widget) = @_; 391 my ($self, $widget) = @_;
378 392
379 $self->{children} = [ grep $_ != $widget, @{ $self->{children} } ]; 393 $self->{children} = [ grep $_ != $widget, @{ $self->{children} } ];
380 394
381 $self->size_allocate (0, 0, $self->{w}, $self->{h}); 395 $self->check_size;
382} 396}
383 397
384sub find_widget { 398sub find_widget {
385 my ($self, $x, $y) = @_; 399 my ($self, $x, $y) = @_;
386 400
506 $tex->draw_quad (0, 0, $w, $h); 520 $tex->draw_quad (0, 0, $w, $h);
507 521
508 glDisable GL_BLEND; 522 glDisable GL_BLEND;
509 glDisable GL_TEXTURE_2D; 523 glDisable GL_TEXTURE_2D;
510} 524}
525
526#############################################################################
527
528package CFClient::UI::ViewPort;
529
530our @ISA = CFClient::UI::Window::;
531
532sub new { die }
533
534sub size_request {
535 my ($self) = @_;
536
537 @$self{qw(child_w child_h)} = $self->child->size_request;
538 $self->child->size_allocate (0, 0, @$self{qw(child_w child_h)});
539
540 @$self{qw(child_w child_h)}
541}
542
543sub size_allocate {
544 my ($self, $x, $y, $w, $h) = @_;
545
546 $self->_size_allocate ($x, $y, $w, $h) or return;
547}
548
549sub _draw {
550 my ($self) = @_;
551
552 $self->{children}[1]->draw;
553}
554
511 555
512############################################################################# 556#############################################################################
513 557
514package CFClient::UI::Frame; 558package CFClient::UI::Frame;
515 559
846} 890}
847 891
848sub size_allocate { 892sub size_allocate {
849 my ($self, $x, $y, $w, $h) = @_; 893 my ($self, $x, $y, $w, $h) = @_;
850 894
851 $self->_size_allocate ($x, $y, $w, $h); 895 $self->_size_allocate ($x, $y, $w, $h) or return;
852 896
853 ($h, $w) = ($w, $h); 897 ($h, $w) = ($w, $h);
854 898
855 my $children = $self->{children}; 899 my $children = $self->{children};
856 900
882 my $h = $h[$_]; 926 my $h = $h[$_];
883 $child->size_allocate ($y, 0, $h, $w); 927 $child->size_allocate ($y, 0, $h, $w);
884 928
885 $y += $h; 929 $y += $h;
886 } 930 }
931
932 1
887} 933}
888 934
889############################################################################# 935#############################################################################
890 936
891package CFClient::UI::VBox; 937package CFClient::UI::VBox;
906} 952}
907 953
908sub size_allocate { 954sub size_allocate {
909 my ($self, $x, $y, $w, $h) = @_; 955 my ($self, $x, $y, $w, $h) = @_;
910 956
911 $self->_size_allocate ($x, $y, $w, $h); 957 $self->_size_allocate ($x, $y, $w, $h) or return;
912 958
913 my $children = $self->{children}; 959 my $children = $self->{children};
914 960
915 my @h = map +($_->size_request)[1], @$children; 961 my @h = map +($_->size_request)[1], @$children;
916 962
938 my $h = $h[$_]; 984 my $h = $h[$_];
939 $child->size_allocate (0, $y, $w, $h); 985 $child->size_allocate (0, $y, $w, $h);
940 986
941 $y += $h; 987 $y += $h;
942 } 988 }
989
990 1
943} 991}
944 992
945############################################################################# 993#############################################################################
946 994
947package CFClient::UI::Label; 995package CFClient::UI::Label;
962 padding => 2, 1010 padding => 2,
963 layout => new CFClient::Layout, 1011 layout => new CFClient::Layout,
964 %arg 1012 %arg
965 ); 1013 );
966 1014
967 $self->set_text ($self->{text}); 1015 $self->{xxx}++ if $self->{text} eq "Client Setup" && $self->{align};#d#
1016
1017 $self->set_text (delete $self->{text}) if exists $self->{text};
1018 $self->set_markup (delete $self->{markup}) if exists $self->{markup};
968 1019
969 $self 1020 $self
970} 1021}
971 1022
972sub escape_text { 1023sub escape_text {
980} 1031}
981 1032
982sub set_text { 1033sub set_text {
983 my ($self, $text) = @_; 1034 my ($self, $text) = @_;
984 1035
985 $self->{text} = $text;
986 $self->{layout}->set_markup ($text); 1036 $self->{layout}->set_text ($text);
987 1037
988 delete $self->{texture}; 1038 delete $self->{texture};
989# $self->{w} = $self->{h} = -1;
990 $self->update; 1039 $self->update;
991} 1040}
992 1041
993sub get_text { 1042sub set_markup {
994 my ($self, $text) = @_; 1043 my ($self, $markup) = @_;
995 1044
996 $self->{text} 1045 $self->{layout}->set_markup ($markup);
1046
1047 delete $self->{texture};
1048 $self->update;
997} 1049}
998 1050
999sub size_request { 1051sub size_request {
1000 my ($self) = @_; 1052 my ($self) = @_;
1001 1053
1002 $self->{layout}->set_width; 1054 $self->{layout}->set_width;
1003 $self->{layout}->set_height ($self->{fontsize}); 1055 $self->{layout}->set_height ($self->{fontsize});
1056
1004 my ($w, $h) = $self->{layout}->size; 1057 my ($w, $h) = $self->{layout}->size;
1005 1058
1006 ( 1059 (
1007 $w + $self->{padding} * 2, 1060 $w + $self->{padding} * 2,
1008 $h + $self->{padding} * 2, 1061 $h + $self->{padding} * 2,
1027sub _draw { 1080sub _draw {
1028 my ($self) = @_; 1081 my ($self) = @_;
1029 1082
1030 my $tex = $self->{texture} ||= do { 1083 my $tex = $self->{texture} ||= do {
1031 $self->{layout}->set_width ($self->{w}); 1084 $self->{layout}->set_width ($self->{w});
1032 $self->{layout}->set_height (List::Util::min $self->{h} - $self->{padding} * 2, $self->{fontsize}); 1085 $self->{layout}->set_height (List::Util::min $self->{h}, $self->{fontsize});
1033 new_from_layout CFClient::Texture $self->{layout} 1086 new_from_layout CFClient::Texture $self->{layout}
1034 }; 1087 };
1035 1088
1036 glEnable GL_BLEND; 1089 glEnable GL_BLEND;
1037 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA; 1090 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA;
1038 glEnable GL_TEXTURE_2D; 1091 glEnable GL_TEXTURE_2D;
1039 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE; 1092 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE;
1040 1093
1041 glColor @{$self->{fg}}; 1094 glColor @{$self->{fg}};
1042 1095
1043 my $x = 1096 $self->{ox} = int (
1044 $self->{align} < 0 ? $self->{padding} 1097 $self->{align} < 0 ? $self->{padding}
1045 : $self->{align} > 0 ? $self->{w} - $tex->{w} - $self->{padding} 1098 : $self->{align} > 0 ? $self->{w} - $tex->{w} - $self->{padding}
1046 : ($self->{w} - $tex->{w}) * 0.5; 1099 : ($self->{w} - $tex->{w}) * 0.5
1100 );
1047 1101
1048 my $y = 1102 $self->{oy} = int (
1049 $self->{valign} < 0 ? $self->{padding} 1103 $self->{valign} < 0 ? $self->{padding}
1050 : $self->{valign} > 0 ? $self->{h} - $tex->{h} - $self->{padding} 1104 : $self->{valign} > 0 ? $self->{h} - $tex->{h} - $self->{padding}
1051 : ($self->{h} - $tex->{h}) * 0.5; 1105 : ($self->{h} - $tex->{h}) * 0.5
1106 );
1052 1107
1053 $tex->draw_quad (int $x, int $y); 1108 $tex->draw_quad ($self->{ox}, $self->{oy});
1054 1109
1055 glDisable GL_TEXTURE_2D; 1110 glDisable GL_TEXTURE_2D;
1056 glDisable GL_BLEND; 1111 glDisable GL_BLEND;
1057} 1112}
1058 1113
1059############################################################################# 1114#############################################################################
1060 1115
1061package CFClient::UI::Entry; 1116package CFClient::UI::EntryBase;
1062 1117
1063our @ISA = CFClient::UI::Label::; 1118our @ISA = CFClient::UI::Label::;
1064 1119
1065use SDL; 1120use SDL;
1066use SDL::OpenGL; 1121use SDL::OpenGL;
1081} 1136}
1082 1137
1083sub _set_text { 1138sub _set_text {
1084 my ($self, $text) = @_; 1139 my ($self, $text) = @_;
1085 1140
1086 my $old_text = $self->{text}; 1141 delete $self->{cur_h};
1142
1143 return if $self->{text} eq $text;
1087 1144
1088 $self->{last_activity} = $::NOW; 1145 $self->{last_activity} = $::NOW;
1089
1090 $self->{text} = $text; 1146 $self->{text} = $text;
1091 $self->{layout}->set_width ($self->{w});
1092 $self->{layout}->set_height (List::Util::min $self->{h} - $self->{padding} * 2, $self->{fontsize});
1093 1147
1094 $text =~ s/./*/g if $self->{hidden}; 1148 $text =~ s/./*/g if $self->{hidden};
1149 $self->{layout}->set_text ("$text ");
1095 1150
1096 $self->{layout}->set_markup ($self->escape_text ($text) . " "); 1151 $self->emit (changed => $self->{text});
1152}
1097 1153
1098 $text = substr $text, 0, $self->{cursor}; 1154sub get_text {
1099 utf8::encode $text; 1155 $_[0]{text}
1100
1101 @$self{qw(cur_x cur_y cur_h)} = $self->{layout}->cursor_pos (length $text);
1102
1103 $self->emit (changed => $self->{text}) # XXX: is this the right place to do this?
1104 if $old_text ne $self->{text};
1105} 1156}
1106 1157
1107sub size_request { 1158sub size_request {
1108 my ($self) = @_; 1159 my ($self) = @_;
1109 1160
1113} 1164}
1114 1165
1115sub size_allocate { 1166sub size_allocate {
1116 my ($self, $x, $y, $w, $h) = @_; 1167 my ($self, $x, $y, $w, $h) = @_;
1117 1168
1118 $self->SUPER::size_allocate ($x, $y, $w, $h); 1169 $self->SUPER::size_allocate ($x, $y, $w, $h) or return;
1119 1170
1120 $self->_set_text ($self->{text}); 1171 $self->_set_text ($self->{text});
1121} 1172}
1122 1173
1123sub set_text { 1174sub set_text {
1213 1264
1214 $self->SUPER::_draw; 1265 $self->SUPER::_draw;
1215 1266
1216 #TODO: force update every cursor change :( 1267 #TODO: force update every cursor change :(
1217 if ($FOCUS == $self && (($::NOW - $self->{last_activity}) & 1023) < 600) { 1268 if ($FOCUS == $self && (($::NOW - $self->{last_activity}) & 1023) < 600) {
1269
1270 unless (exists $self->{cur_h}) {
1271 my $text = substr $self->{text}, 0, $self->{cursor};
1272 utf8::encode $text;
1273
1274 @$self{qw(cur_x cur_y cur_h)} = $self->{layout}->cursor_pos (length $text)
1275 }
1276
1218 glColor @{$self->{fg}}; 1277 glColor @{$self->{fg}};
1219 glBegin GL_LINES; 1278 glBegin GL_LINES;
1220 glVertex $self->{cur_x}, $self->{cur_y};
1221 glVertex $self->{cur_x}, $self->{cur_y} + $self->{cur_h}; 1279 glVertex $self->{cur_x} + $self->{ox}, $self->{cur_y} + $self->{oy};
1280 glVertex $self->{cur_x} + $self->{ox}, $self->{cur_y} + $self->{oy} + $self->{cur_h};
1222 glEnd; 1281 glEnd;
1223 } 1282 }
1224} 1283}
1225 1284
1226package CFClient::UI::LineEntry; 1285package CFClient::UI::Entry;
1227 1286
1228our @ISA = CFClient::UI::Entry::; 1287our @ISA = CFClient::UI::EntryBase::;
1229 1288
1230use SDL; 1289use SDL;
1231use SDL::OpenGL; 1290use SDL::OpenGL;
1232 1291
1233sub key_down { 1292sub key_down {
1263 1322
1264 $class->SUPER::new ( 1323 $class->SUPER::new (
1265 padding => 4, 1324 padding => 4,
1266 fg => [1, 1, 1], 1325 fg => [1, 1, 1],
1267 bg => [1, 1, 1, 0.2], 1326 bg => [1, 1, 1, 0.2],
1268 active_fg => [1, 1, 0], 1327 active_fg => [0, 0, 1],
1269 can_hover => 1, 1328 can_hover => 1,
1270 @_ 1329 @_
1271 ) 1330 )
1272} 1331}
1273 1332
1336} 1395}
1337 1396
1338sub size_allocate { 1397sub size_allocate {
1339 my ($self, $x, $y, $w, $h) = @_; 1398 my ($self, $x, $y, $w, $h) = @_;
1340 1399
1341 $self->_size_allocate ($x, $y, $w, $h); 1400 $self->_size_allocate ($x, $y, $w, $h) or return;
1342} 1401}
1343 1402
1344sub button_down { 1403sub button_down {
1345 my ($self, $ev, $x, $y) = @_; 1404 my ($self, $ev, $x, $y) = @_;
1346 1405
1370 1429
1371 $tex->draw_quad (0, 0, $s, $s); 1430 $tex->draw_quad (0, 0, $s, $s);
1372 1431
1373 glDisable GL_TEXTURE_2D; 1432 glDisable GL_TEXTURE_2D;
1374 glDisable GL_BLEND; 1433 glDisable GL_BLEND;
1434}
1435
1436#############################################################################
1437
1438package CFClient::UI::VGauge;
1439
1440our @ISA = CFClient::UI::Base::;
1441
1442use SDL::OpenGL;
1443
1444my %tex = (
1445 food => [
1446 map { new_from_file CFClient::Texture CFClient::find_rcfile $_ }
1447 qw/g1_food_gauge_empty.png g1_food_gauge_full.png/
1448 ],
1449 grace => [
1450 map { new_from_file CFClient::Texture CFClient::find_rcfile $_ }
1451 qw/g1_grace_gauge_empty.png g1_grace_gauge_full.png/
1452 ],
1453 hp => [
1454 map { new_from_file CFClient::Texture CFClient::find_rcfile $_ }
1455 qw/g1_hp_gauge_empty.png g1_hp_gauge_full.png/
1456 ],
1457 mana => [
1458 map { new_from_file CFClient::Texture CFClient::find_rcfile $_ }
1459 qw/g1_mana_gauge_empty.png g1_mana_gauge_full.png/
1460 ],
1461);
1462
1463# eg. VGauge->new (gauge => 'food'), default gauge: food
1464sub new {
1465 my $class = shift;
1466
1467 my $self = $class->SUPER::new (gauge => 'food', @_);
1468
1469 $self
1470}
1471
1472sub size_request {
1473 my ($self) = @_;
1474
1475 ($self->{w}, $self->{h})
1476}
1477
1478sub set_max {
1479 my ($self, $max) = @_;
1480 $self->{max_val} = $max;
1481}
1482
1483sub set_value {
1484 my ($self, $val, $max) = @_;
1485
1486 $self->set_max ($max)
1487 if defined $max;
1488
1489 $max = $self->{max_val};
1490 $self->{val} = $val;
1491
1492 $self->update;
1493}
1494
1495sub _draw {
1496 my ($self) = @_;
1497
1498 my $tex = $tex{$self->{gauge}};
1499
1500 my ($w, $h) = ($self->{w}, $self->{h});
1501
1502 my $ycut = $self->{val} / ($self->{max_val} || 1);
1503 $ycut = 1 if $self->{val} > $self->{max_val};
1504
1505 my $t1 = $tex->[0];
1506 my $t2 = $tex->[1];
1507
1508 glEnable GL_BLEND;
1509 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA;
1510 glEnable GL_TEXTURE_2D;
1511 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE;
1512
1513 my $h1 = $self->{h} - $ycut * $self->{h};
1514 my $h2 = $ycut * $self->{h};
1515
1516 my $yp = 0;
1517
1518 glBindTexture (GL_TEXTURE_2D, $t1->{name});
1519 glBegin (GL_QUADS);
1520 glTexCoord (0, 0); glVertex (0 , $yp);
1521 glTexCoord (0, (1 - $ycut)); glVertex (0 , $yp + $h1);
1522 glTexCoord (1, (1 - $ycut)); glVertex (0 + $w, $yp + $h1);
1523 glTexCoord (1, 0); glVertex (0 + $w, $yp);
1524 glEnd ();
1525
1526 $yp += $h1;
1527
1528 glBindTexture (GL_TEXTURE_2D, $t2->{name});
1529 glBegin (GL_QUADS);
1530 glTexCoord (0, (1 - $ycut)); glVertex (0 , $yp);
1531 glTexCoord (0, 1); glVertex (0 , $yp + $h2);
1532 glTexCoord (1, 1); glVertex (0 + $w, $yp + $h2);
1533 glTexCoord (1, (1 - $ycut)); glVertex (0 + $w, $yp);
1534 glEnd ();
1535
1536 glDisable GL_BLEND;
1537 glDisable GL_TEXTURE_2D;
1375} 1538}
1376 1539
1377############################################################################# 1540#############################################################################
1378 1541
1379package CFClient::UI::Slider; 1542package CFClient::UI::Slider;
1575} 1738}
1576 1739
1577sub size_allocate { 1740sub size_allocate {
1578 my ($self, $x, $y, $w, $h) = @_; 1741 my ($self, $x, $y, $w, $h) = @_;
1579 1742
1580 $self->SUPER::size_allocate ($x, $y, $w, $h); 1743 $self->SUPER::size_allocate ($x, $y, $w, $h) or return;
1581 1744
1582 $self->{layout}->set_height ($self->{fontsize}); 1745 $self->{layout}->set_height ($self->{fontsize});
1583 $self->{layout}->set_width ($self->{w}); 1746 $self->{layout}->set_width ($self->{w});
1584 1747
1585 $self->reflow; 1748 $self->reflow;
1749 $self->update;
1586} 1750}
1587 1751
1588sub add_paragraph { 1752sub add_paragraph {
1589 my ($self, $color, $text) = @_; 1753 my ($self, $color, $text) = @_;
1590 1754
1875 2039
1876 my $mod = $ev->key_mod; 2040 my $mod = $ev->key_mod;
1877 my $sym = $ev->key_sym; 2041 my $sym = $ev->key_sym;
1878 2042
1879 if ($sym == SDLK_KP5) { 2043 if ($sym == SDLK_KP5) {
1880 $::CONN->user_send ("command stay fire"); 2044 $::CONN->user_send ("stay fire");
1881 } elsif ($sym == SDLK_a) { 2045 } elsif ($sym == SDLK_a) {
1882 $::CONN->user_send ("command apply"); 2046 $::CONN->user_send ("apply");
1883 } elsif ($sym == SDLK_QUOTE) { 2047 } elsif ($sym == SDLK_QUOTE) {
1884 $self->emit ('activate_console'); 2048 $self->emit ('activate_console');
1885 } elsif ($sym == SDLK_SLASH) { 2049 } elsif ($sym == SDLK_SLASH) {
1886 $self->emit ('activate_console' => '/'); 2050 $self->emit ('activate_console' => '/');
1887 } elsif (exists $DIR{$sym}) { 2051 } elsif (exists $DIR{$sym}) {
1888 if ($mod & KMOD_SHIFT) { 2052 if ($mod & KMOD_SHIFT) {
1889 $self->{shft}++; 2053 $self->{shft}++;
1890 $::CONN->user_send ("command fire $DIR{$sym}[0]"); 2054 $::CONN->user_send ("fire $DIR{$sym}[0]");
1891 } elsif ($mod & KMOD_CTRL) { 2055 } elsif ($mod & KMOD_CTRL) {
1892 $self->{ctrl}++; 2056 $self->{ctrl}++;
1893 $::CONN->user_send ("command run $DIR{$sym}[0]"); 2057 $::CONN->user_send ("run $DIR{$sym}[0]");
1894 } else { 2058 } else {
1895 $::CONN->user_send ("command $DIR{$sym}[1]"); 2059 $::CONN->user_send ("$DIR{$sym}[1]");
1896 } 2060 }
1897 } 2061 }
1898} 2062}
1899 2063
1900sub key_up { 2064sub key_up {
1902 2066
1903 my $mod = $ev->key_mod; 2067 my $mod = $ev->key_mod;
1904 my $sym = $ev->key_sym; 2068 my $sym = $ev->key_sym;
1905 2069
1906 if (!($mod & KMOD_SHIFT) && delete $self->{shft}) { 2070 if (!($mod & KMOD_SHIFT) && delete $self->{shft}) {
1907 $::CONN->user_send ("command fire_stop"); 2071 $::CONN->user_send ("fire_stop");
1908 } 2072 }
1909 if (!($mod & KMOD_CTRL ) && delete $self->{ctrl}) { 2073 if (!($mod & KMOD_CTRL ) && delete $self->{ctrl}) {
1910 $::CONN->user_send ("command run_stop"); 2074 $::CONN->user_send ("run_stop");
1911 } 2075 }
1912} 2076}
1913 2077
1914############################################################################# 2078#############################################################################
1915 2079
1998 2162
1999our @ISA = CFClient::UI::Container::; 2163our @ISA = CFClient::UI::Container::;
2000 2164
2001use SDL::OpenGL; 2165use SDL::OpenGL;
2002 2166
2167sub check_size {
2168 my ($self) = @_;
2169
2170 $self->size_allocate (0, 0, $::WITH, $::HEIGHT);
2171}
2172
2003sub size_request { 2173sub size_request {
2004 ($::WIDTH, $::HEIGHT) 2174 ($::WIDTH, $::HEIGHT)
2005} 2175}
2006 2176
2007sub size_allocate { 2177sub size_allocate {
2020} 2190}
2021 2191
2022sub update { 2192sub update {
2023 my ($self) = @_; 2193 my ($self) = @_;
2024 2194
2025 $self->size_allocate (0, 0, $::WIDTH, $::HEIGHT); 2195 $self->check_size;
2026 ::refresh (); 2196 ::refresh ();
2027} 2197}
2028 2198
2029sub add { 2199sub add {
2030 my ($self, $widget) = @_; 2200 my ($self, $widget) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines