Problems with TABs in OSD

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

 



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("")
{
   item_type = Type;
   header = strdup(Header);
   name = strdup(Text);

   [...]

   // Display in columns
   cItemsEntry *entry = new cItemsEntry("Col1 \t Col2 \t Col3");
   Add(entry);

   Display();
}


cItemsEntry::cItemsEntry(const char *Entry)
{
   entry = strdup(Entry);
   SetText(entry,false);
}


The entry is displayed as "Col1", so the text behind the first tabular just 
disappears. Where is the error???

ciao
  Richard Reuters



[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux