[vdr] Problems with TABs in OSD

Peter Juszack vdr at unterbrecher.de
Fri Mar 10 12:48:56 CET 2006


Richard Reuters wrote:
> I'm writing a plugin and would like to display some OSD output in columns like 
> many other plugins and vdr itself does. But special characters like '\t' for 
> a tabulator are not working.
>
> For examlple I've a cOSdMenu derived class and want to add an entry 
> (simplified):
>
> class cItems : public cOsdMenu
> {
>  private:
>         int  item_type;
>         char *header;
>         char *name;
>  public:
>         cItems::cItems(int Type,const char *Text,const char *Header);
>         virtual ~cItems();
>         virtual eOSState ProcessKey(eKeys Key);
> };
>
> class cItemsEntry : public cOsdItem {
>  private:
>     char *entry;
>  public:
>     cItemsEntry(const char *Entry);
>     ~cItemsEntry();
> }
>
> cItems::cItems(int Type,const char *Text,const char *Header)
> :cOsdMenu("")
>   
Here you have to specify TAB-positions for your menu:

cItems::cItems(int Type,const char *Text,const char *Header)
:cOsdMenu("", 20, 10)

will give you columns at 0, 20 and 30. Column seperation is done via \t as you
already found out.


Good luck
Peter



More information about the vdr mailing list