Mailing List archive

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

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



Jan Ekholm wrote:
> 
> 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.

There's still one thing I'm planning to implement: allowing a plugin
to open a cSkinDisplayMenu and get a cBitmap from it into which the
plugin can draw whatever it wants. That cBitmap will represent the
"center part" of the menu, so that the plugin can benefit from all
the fancy decorations the current skin might (or might not) implement,
while doing its own stuff inside the menu (which, at that point, doesn't
necessarily have to be a "menu" at all - it could be anything, like
graphics, any text in any color etc.).

So, if for the moment you implement your functionality in such a way that
you draw everything into a cBitmap, you will later be able to benefit
from this feature. Note, though, that the "center part" of a menu may be
smaller than the actual OSD width and height because of the space used
for the decorations.

Klaus




Home | Main Index | Thread Index