vdr
2.2.0
|
Public Member Functions | |
cCursesOsd (int Left, int Top) | |
virtual | ~cCursesOsd () |
virtual void | SaveRegion (int x1, int y1, int x2, int y2) |
virtual void | RestoreRegion (void) |
virtual void | DrawText (int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width=0, int Height=0, int Alignment=taDefault) |
virtual void | DrawRectangle (int x1, int y1, int x2, int y2, tColor Color) |
virtual void | Flush (void) |
![]() | |
virtual | ~cOsd () |
bool | IsTrueColor (void) const |
int | Left (void) |
int | Top (void) |
int | Width (void) |
int | Height (void) |
void | SetAntiAliasGranularity (uint FixedColors, uint BlendColors) |
cBitmap * | GetBitmap (int Area) |
virtual cPixmap * | CreatePixmap (int Layer, const cRect &ViewPort, const cRect &DrawPort=cRect::Null) |
virtual void | DestroyPixmap (cPixmap *Pixmap) |
virtual void | DrawImage (const cPoint &Point, const cImage &Image) |
virtual void | DrawImage (const cPoint &Point, int ImageHandle) |
virtual eOsdError | CanHandleAreas (const tArea *Areas, int NumAreas) |
virtual eOsdError | SetAreas (const tArea *Areas, int NumAreas) |
virtual eOsdError | SetPalette (const cPalette &Palette, int Area) |
virtual void | DrawPixel (int x, int y, tColor Color) |
virtual void | DrawBitmap (int x, int y, const cBitmap &Bitmap, tColor ColorFg=0, tColor ColorBg=0, bool ReplacePalette=false, bool Overlay=false) |
virtual void | DrawScaledBitmap (int x, int y, const cBitmap &Bitmap, double FactorX, double FactorY, bool AntiAlias=false) |
virtual void | DrawEllipse (int x1, int y1, int x2, int y2, tColor Color, int Quadrants=0) |
virtual void | DrawSlope (int x1, int y1, int x2, int y2, tColor Color, int Type) |
Private Types | |
enum | { MaxColorPairs = 16 } |
Private Member Functions | |
void | SetColor (int colorFg, int colorBg=clrBackground) |
Private Attributes | |
WINDOW * | savedRegion |
WINDOW * | window |
int | colorPairs [MaxColorPairs] |
Additional Inherited Members | |
![]() | |
static int | OsdLeft (void) |
static int | OsdTop (void) |
static int | OsdWidth (void) |
static int | OsdHeight (void) |
static void | SetOsdPosition (int Left, int Top, int Width, int Height) |
static int | IsOpen (void) |
![]() | |
cOsd (int Left, int Top, uint Level) | |
bool | Active (void) |
virtual void | SetActive (bool On) |
cPixmap * | AddPixmap (cPixmap *Pixmap) |
cPixmap * | RenderPixmaps (void) |
Definition at line 59 of file skincurses.c.
|
private |
Enumerator | |
---|---|
MaxColorPairs |
Definition at line 63 of file skincurses.c.
cCursesOsd::cCursesOsd | ( | int | Left, |
int | Top | ||
) |
Definition at line 76 of file skincurses.c.
References colorPairs, savedRegion, ScOsdHeight, ScOsdWidth, and window.
Referenced by cSkinCursesDisplayChannel::cSkinCursesDisplayChannel(), cSkinCursesDisplayMenu::cSkinCursesDisplayMenu(), cSkinCursesDisplayMessage::cSkinCursesDisplayMessage(), cSkinCursesDisplayReplay::cSkinCursesDisplayReplay(), cSkinCursesDisplayTracks::cSkinCursesDisplayTracks(), and cSkinCursesDisplayVolume::cSkinCursesDisplayVolume().
|
virtual |
Definition at line 89 of file skincurses.c.
|
virtual |
Draws a filled rectangle defined by the upper left (x1, y1) and lower right (x2, y2) corners with the given Color.
Reimplemented from cOsd.
Definition at line 174 of file skincurses.c.
References SetColor(), and window.
Referenced by DrawText().
|
virtual |
Draws the given string at coordinates (x, y) with the given foreground and background color and font.
If Width and Height are given, the text will be drawn into a rectangle with the given size and the given Alignment (default is top-left). If ColorBg is clrTransparent, no background pixels will be drawn, which allows drawing "transparent" text.
Reimplemented from cOsd.
Definition at line 136 of file skincurses.c.
References DrawRectangle(), cFont::Height(), ScOsdWidth, SetColor(), taBottom, taLeft, taRight, taTop, cFont::Width(), and window.
|
virtual |
Actually commits all data to the OSD hardware.
Flush() should return as soon as possible. For a true color OSD using the default implementation with in memory pixmaps, the Flush() function should basically do something like this:
LOCK_PIXMAPS; while (cPixmapMemory *pm = dynamic_cast<cPixmapMemory *>(RenderPixmaps())) { int w = pm->ViewPort().Width(); int h = pm->ViewPort().Height(); int d = w * sizeof(tColor); MyOsdDrawPixmap(Left() + pm->ViewPort().X(), Top() + pm->ViewPort().Y(), pm->Data(), w, h, h * d); DestroyPixmap(pm); }
If a plugin uses a derived cPixmap implementation, it needs to use that type instead of cPixmapMemory.
Reimplemented from cOsd.
Definition at line 184 of file skincurses.c.
Referenced by cSkinCursesDisplayMenu::GetTextAreaFont(), cSkinCursesDisplayTracks::SetAudioChannel(), and ~cCursesOsd().
|
virtual |
Restores the region previously saved by a call to SaveRegion().
If SaveRegion() has not been called before, nothing will happen.
Reimplemented from cOsd.
Definition at line 127 of file skincurses.c.
References savedRegion, and window.
|
virtual |
Saves the region defined by the given coordinates for later restoration through RestoreRegion().
Only one saved region can be active at any given time.
Reimplemented from cOsd.
Definition at line 117 of file skincurses.c.
References savedRegion, and window.
|
private |
Definition at line 99 of file skincurses.c.
References colorPairs, MaxColorPairs, and window.
Referenced by DrawRectangle(), and DrawText().
|
private |
Definition at line 64 of file skincurses.c.
Referenced by cCursesOsd(), and SetColor().
|
private |
Definition at line 61 of file skincurses.c.
Referenced by cCursesOsd(), RestoreRegion(), and SaveRegion().
|
private |
Definition at line 62 of file skincurses.c.
Referenced by cCursesOsd(), DrawRectangle(), DrawText(), RestoreRegion(), SaveRegion(), SetColor(), and ~cCursesOsd().