PDA

View Full Version : RE: Overlay idea



Robert.Moser@med.va.gov
2003-12-08, 10:32
Dean wrote:
> My concern about this would be about performance.

We would probably get better performance out of an object than we would out
of parsing XML each time we did a screen refresh.

The more I think about it, returning a screen object probably isn't the
right thing to do. The client object should probably contain a screen
object. Then a module wanting to write its text to the screen would do
something like this:

$client->screen->clear();
$client->screen->addText("This is line one\nThis is line two\n");
$client->screen->addText("vfD_rightarrow_Vfd"
,{'v-align' => 'bottom'
,'h-align' => 'right'};

Which would result in a screen like:
+--------------------------------+
|This is line one |
|This is line two >|
+--------------------------------+

dean
2003-12-08, 11:12
It might make more sense for the screen object to be used to composite
screens, then have that object generate the XML (or whatever)
stringified output, which would get translated into the raw VFD
commands.

The screen object would just be a helper app that helped build the text
representation:

my $screen = Slim::Display::Screen::new();
$screen->addText("This is line one\nThis is line two\n");
$screen->screen->addText("vfD_rightarrow_Vfd"
,{'v-align' => 'bottom'
,'h-align' => 'right'};

Slim::Display::Animation::showBriefly($client, $screen->xml);



On Dec 8, 2003, at 9:32 AM, Robert.Moser (AT) med (DOT) va.gov wrote:

> Dean wrote:
>> My concern about this would be about performance.
>
> We would probably get better performance out of an object than we
> would out
> of parsing XML each time we did a screen refresh.
>
> The more I think about it, returning a screen object probably isn't the
> right thing to do. The client object should probably contain a screen
> object. Then a module wanting to write its text to the screen would do
> something like this:
>
> $client->screen->clear();
> $client->screen->addText("This is line one\nThis is line two\n");
> $client->screen->addText("vfD_rightarrow_Vfd"
> ,{'v-align' => 'bottom'
> ,'h-align' => 'right'};
>
> Which would result in a screen like:
> +--------------------------------+
> |This is line one |
> |This is line two >|
> +--------------------------------+
>