Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Porting info for skins based UI?



On Mon, 2 Aug 2004, Sascha Volkenandt wrote:

>Am Montag, 2. August 2004 11:59 schrieb Jan Ekholm:
>> Hi,
>>
>> I have a couple of plugins that are done using the old OSD code (VDR
>> 1.3.6), and which need some surgery to work with the new skins. Is there
>> some material available somewhere (preferable in English) that would aid
>> in the process?
>>
>> My code mainly uses the methods:
>>
>> 	Interface->Open()

>a) Done by the skin. Obtain a skin display using
>Skins.Current()->DisplayWhatever and use that classes methods to alter the
>content
>OR b) Open an OSD yourself using the cOsdObject class
>OR c) Only use menu pages with single line items

Ok, this sounds logical. I assume the Skins.Current()->DisplayWhatever are
what VDR uses internally for normal display purposes, and they can be
"abused" for own purposes if the available functionality is suitable?

>> 	Interface->Clear()
>> 	Interface->WriteText()
>
>Must be done by a) (inside the skin) or b) (using cOsd-functions) or c)
>(Clearing the menu page / setting an item's text)

With a) you are limited to the functionality provided by that particular
skin class, and AFAIK none of them is suitable for normal text display.
I'd simply like to show some text split up into "title", "date and time"
and "description" and use different colors for them. Seem b) is the best
way to go for me.

>> 	Interface->Width()
>
>Didn't find anything similar to this, yet. You can get the "would-be" value by
>dividing Setup.OSDWidth by the former value of cOsd::CellWidth()

Or using the Width() of the font could also do the same.

>> 	Interface->Flush()
>
>Skins.Flush()

Ok.

>> 	Interface->Close ()
>
>Done by deleting the objects created by a), b) or c)

Ok.

>> I hope the old OSD menu code still works, as there is countless hours of
>> frustration behind what I currently have working... :)
>
>We all know that, and there will _always_ be more countless hours of
>frustration when versions change, but that's evolution :-)

Heh, true. It doesn't seem to be that much work, as the b) solution
doesn't differ that much from using the stuff from the old Interface
class.

Thanks a lot for the help, I was really out in the cold trying to figure
out where to start looking.

-- 

  That's right," he said. "We're philosophers. We think, therefore we am.
                                             -- Terry Pratchett, Small Gods




Home | Main Index | Thread Index