mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
55_InfoPanel.pm: updated
added: push/pop changed: commandref updated git-svn-id: https://svn.fhem.de/fhem/trunk@7944 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b1ea4626d2
commit
b831b15dfb
@ -768,27 +768,26 @@ sub btIP_evalLayout {
|
|||||||
my %pstack;
|
my %pstack;
|
||||||
my $pstackcount = 0;
|
my $pstackcount = 0;
|
||||||
my %params;
|
my %params;
|
||||||
$params{name}= $name;
|
|
||||||
$params{width}= $width;
|
$params{name} = $name;
|
||||||
$params{height}= $height;
|
$params{xx} = 0;
|
||||||
$params{font}= "Arial";
|
$params{yy} = 0;
|
||||||
$params{pt}= 12;
|
$params{width} = $width;
|
||||||
$params{rgb}= "ffffff";
|
$params{height} = $height;
|
||||||
|
$params{rgb} = 'FFFFFF';
|
||||||
$params{condition} = 1;
|
$params{condition} = 1;
|
||||||
# we need two pairs of align parameters
|
|
||||||
# due to different default values for text and img
|
$params{boxcolor} = undef;
|
||||||
$params{ihalign} = 'left';
|
$params{tbalign} = 'left';
|
||||||
$params{ivalign} = 'top';
|
$params{padding} = 0;
|
||||||
$params{thalign} = 'start';
|
|
||||||
$params{tvalign} = 'auto';
|
$params{font} = 'Arial';
|
||||||
$params{tbalign} = 'left';
|
$params{pt} = 12;
|
||||||
$params{boxcolor} = undef;
|
$params{fontstyle} = 'initial';
|
||||||
$params{padding} = 0;
|
$params{fontweight} = 'normal';
|
||||||
$params{xx}= 0;
|
$params{textdecoration} = 'none';
|
||||||
$params{yy}= 0;
|
$params{thalign} = 'start';
|
||||||
$params{fontstyle} = "initial";
|
$params{tvalign} = 'auto';
|
||||||
$params{fontweight} = "normal";
|
|
||||||
$params{textdecoration} = "none";
|
|
||||||
|
|
||||||
$defs{$name}{fhem}{div} = undef;
|
$defs{$name}{fhem}{div} = undef;
|
||||||
|
|
||||||
@ -826,21 +825,6 @@ sub btIP_evalLayout {
|
|||||||
eval {
|
eval {
|
||||||
given($cmd) {
|
given($cmd) {
|
||||||
|
|
||||||
when("push") {
|
|
||||||
$pstackcount++;
|
|
||||||
while ( my ($key, $value) = each(%params) ) {
|
|
||||||
$pstack{$pstackcount}{$key} = $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
when("pop") {
|
|
||||||
while ( my ($key, $value) = each($pstack{$pstackcount}) ) {
|
|
||||||
$params{$key} = $value;
|
|
||||||
}
|
|
||||||
delete $pstack{$pstackcount};
|
|
||||||
$pstackcount--;
|
|
||||||
}
|
|
||||||
|
|
||||||
when("area") {
|
when("area") {
|
||||||
($id,$x1,$y1,$x2,$y2,$link)= split("[ \t]+", $def, 6);
|
($id,$x1,$y1,$x2,$y2,$link)= split("[ \t]+", $def, 6);
|
||||||
($x1,$y1)= btIP_xy($x1,$y1,%params);
|
($x1,$y1)= btIP_xy($x1,$y1,%params);
|
||||||
@ -967,6 +951,15 @@ $pstackcount--;
|
|||||||
$svg .= btIP_itemPlot($id,$x,$y,$scale,$inline,$arg,%params);
|
$svg .= btIP_itemPlot($id,$x,$y,$scale,$inline,$arg,%params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
when("pop") {
|
||||||
|
return unless $pstackcount;
|
||||||
|
while ( my ($key, $value) = each($pstack{$pstackcount}) ) {
|
||||||
|
$params{$key} = $value;
|
||||||
|
}
|
||||||
|
delete $pstack{$pstackcount};
|
||||||
|
$pstackcount--;
|
||||||
|
}
|
||||||
|
|
||||||
when("pt") {
|
when("pt") {
|
||||||
$def = AnalyzePerlCommand(undef, $def);
|
$def = AnalyzePerlCommand(undef, $def);
|
||||||
if($def =~ m/^[+-]/) {
|
if($def =~ m/^[+-]/) {
|
||||||
@ -977,6 +970,13 @@ $pstackcount--;
|
|||||||
$params{pt} = 6 if($params{pt} < 0);
|
$params{pt} = 6 if($params{pt} < 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
when("push") {
|
||||||
|
$pstackcount++;
|
||||||
|
while ( my ($key, $value) = each(%params) ) {
|
||||||
|
$pstack{$pstackcount}{$key} = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
when("rect") {
|
when("rect") {
|
||||||
($id,$x1,$y1,$x2,$y2,$r1,$r2,$filled,$stroked,$link)= split("[ \t]+", $def, 10);
|
($id,$x1,$y1,$x2,$y2,$r1,$r2,$filled,$stroked,$link)= split("[ \t]+", $def, 10);
|
||||||
($x1,$y1)= btIP_xy($x1,$y1,%params);
|
($x1,$y1)= btIP_xy($x1,$y1,%params);
|
||||||
@ -1007,8 +1007,8 @@ $pstackcount--;
|
|||||||
($x,$y)= btIP_xy($x,$y,%params);
|
($x,$y)= btIP_xy($x,$y,%params);
|
||||||
$params{xx} = $x;
|
$params{xx} = $x;
|
||||||
$params{yy} = $y;
|
$params{yy} = $y;
|
||||||
my $txt= AnalyzePerlCommand(undef, $text);
|
$text= AnalyzePerlCommand(undef, $text);
|
||||||
$svg .= btIP_itemText($id,$x,$y,$txt,%params);
|
$svg .= btIP_itemText($id,$x,$y,$text,%params);
|
||||||
}
|
}
|
||||||
|
|
||||||
when("textbox") {
|
when("textbox") {
|
||||||
@ -1486,6 +1486,11 @@ Please read <a href="http://forum.fhem.de/index.php/topic,32828.0.html" target="
|
|||||||
plotName = name of desired SVG device from your fhem installation<br/>
|
plotName = name of desired SVG device from your fhem installation<br/>
|
||||||
</ul></li><br/>
|
</ul></li><br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
<li><code>pop</code><br/>
|
||||||
|
<br/>
|
||||||
|
<ul>fetch last parameter set from stack and set it actice<br/>
|
||||||
|
</ul></li><br/>
|
||||||
|
<br/>
|
||||||
<li><code>pt <[+-]font-size></code><br/>
|
<li><code>pt <[+-]font-size></code><br/>
|
||||||
<br/>
|
<br/>
|
||||||
<ul>define font size used for text elements (text, date, time, seconds ...)<br/>
|
<ul>define font size used for text elements (text, date, time, seconds ...)<br/>
|
||||||
@ -1497,6 +1502,11 @@ Please read <a href="http://forum.fhem.de/index.php/topic,32828.0.html" target="
|
|||||||
<code>pt -2</code><br/>
|
<code>pt -2</code><br/>
|
||||||
</ul></li><br/>
|
</ul></li><br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
<li><code>push</code><br/>
|
||||||
|
<br/>
|
||||||
|
<ul>push active parameter set onto stack<br/>
|
||||||
|
</ul></li><br/>
|
||||||
|
<br/>
|
||||||
<li><code>rect <id> <x1> <y1> <x2> <y2> <r1> <r2> [<fill>] [<stroke-width>] [<link>]</code><br/>
|
<li><code>rect <id> <x1> <y1> <x2> <y2> <r1> <r2> [<fill>] [<stroke-width>] [<link>]</code><br/>
|
||||||
<br/>
|
<br/>
|
||||||
<ul>create a rectangle<br/>
|
<ul>create a rectangle<br/>
|
||||||
|
Loading…
Reference in New Issue
Block a user