summaryrefslogtreecommitdiff
path: root/textwindow.h
blob: 8d3a7b1a2b0e3c70f9313f05c1c5e2d7b9bb128a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef __NOPACITY_TEXTWINDOW_H
#define __NOPACITY_TEXTWINDOW_H
class cNopacityTextWindow : public cThread {
private:
    cOsd *osd;
    cFont *font;
    cFont *fontHeader;
    cPixmap *pixmapBackground;
    cPixmap *pixmap;
    cRect *geometry;
    int drawportHeight;
    cRect *vidWin;
    cRect oldVidWin;
    bool scaledWindow;
    cString text;
    cTextWrapper twTextTall;
    cTextWrapper twTextFull;
    bool drawTextTall;
    bool drawTextFull;
    bool hasPoster;
    TVScraperGetPoster poster;
    int posterWidth, posterHeight;
    bool SetTextScroller(int border, int left);
    void CreatePixmap(void);
    void CreatePixmapFullScreen(void);
    void DrawText(int border, int left);
    void DrawPoster(int border);
    int DrawTextWrapper(const char *text, int width, int top, int x, const cFont *font, tColor color, int maxHeight = 0);
    int DrawTextWrapperFloat(const char *text, int widthSmall, int widthFull, int top, int heightNarrow, int x, const cFont *font, tColor color, int maxHeight);
    void DoSleep(int duration);
    virtual void Action(void);
    void ScaleVideoWindow(void);
public:
    cNopacityTextWindow(cOsd *osd, cFont *font, cRect *vidWin);
    cNopacityTextWindow(cOsd *osd, cFont *font, cFont *fontHeader);
    virtual ~cNopacityTextWindow(void);
    void SetGeometry(cRect *geo) {geometry = geo;};
    void SetEvent(const cEvent *event);
    void SetRecording(const cRecording *recording);
    void SetText(cString Text) {text = Text;};
    void SetPoster(const cEvent *event, bool isRecording, bool fullscreen = false);
};

#endif //__NOPACITY_TEXTWINDOW_H