Home

Dokumentation

Impressum

Dokumentation VDR
 

Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

cInterface Class Reference

#include <interface.h>

Collaboration diagram for cInterface:

Collaboration graph
[legend]

Detailed Description

Interface handling.

interface.h: Abstract user interface layer

See the main source file 'vdr.c' for copyright information and how to reach the author.

Id
interface.h 1.29 2002/11/30 14:37:04 kls Exp

Definition at line 19 of file interface.h.

Public Types

enum  { MaxCols = 5 }

Public Methods

 cInterface (int SVDRPport=0)
 ~cInterface ()
bool IsOpen (void)
void Open (int NumCols=0, int NumLines=0)
void Close (void)
bool HasSVDRPConnection (void)
void Interrupt (void)
int Width (void)
int Height (void)
eKeys GetKey (bool Wait=true)
void Clear (void)
void ClearEol (int x, int y, eDvbColor Color=clrBackground)
void Fill (int x, int y, int w, int h, eDvbColor color=clrBackground)
void SetBitmap (int x, int y, const cBitmap &Bitmap)
void Flush (void)
void SetCols (int *c)
const int * GetCols (void)
eDvbFont SetFont (eDvbFont Font)
char * WrapText (const char *Text, int Width, int *Height)
void Write (int x, int y, const char *s, eDvbColor FgColor=clrWhite, eDvbColor BgColor=clrBackground)
void WriteText (int x, int y, const char *s, eDvbColor FgColor=clrWhite, eDvbColor BgColor=clrBackground)
void Title (const char *s)
void Status (const char *s, eDvbColor FgColor=clrBlack, eDvbColor BgColor=clrCyan)
void Info (const char *s)
void Error (const char *s)
bool Confirm (const char *s, int Seconds=10, bool WaitForTimeout=false)
void Help (const char *Red, const char *Green=NULL, const char *Yellow=NULL, const char *Blue=NULL)
void LearnKeys (void)

Private Methods

void QueryKeys (cRemote *Remote)
void HelpButton (int Index, const char *Text, eDvbColor FgColor, eDvbColor BgColor)
eKeys Wait (int Seconds=0, bool KeepChar=false)

Private Attributes

int width
int height
int open
int cols [MaxCols]
bool interrupted
cSVDRPSVDRP


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
MaxCols 

Definition at line 21 of file interface.h.


Constructor & Destructor Documentation

cInterface::cInterface int    SVDRPport = 0
 

Definition at line 20 of file interface.c.

References cols, height, interrupted, open, SVDRP, and width.

cInterface::~cInterface  
 

Definition at line 31 of file interface.c.

References SVDRP.


Member Function Documentation

void cInterface::Clear void   
 

Definition at line 92 of file interface.c.

References cOsd::Clear(), and cStatus::MsgOsdClear().

Referenced by Close(), LearnKeys(), and QueryKeys().

void cInterface::ClearEol int    x,
int    y,
eDvbColor    Color = clrBackground
 

Definition at line 99 of file interface.c.

References cOsd::ClrEol().

Referenced by QueryKeys(), Status(), Title(), and WriteText().

void cInterface::Close void   
 

Definition at line 47 of file interface.c.

References Clear(), cOsd::Close(), height, open, and width.

Referenced by Confirm(), Error(), Info(), and LearnKeys().

bool cInterface::Confirm const char *    s,
int    Seconds = 10,
bool    WaitForTimeout = false
 

Definition at line 295 of file interface.c.

References Close(), eKeys, isyslog, kNone, kOk, Open(), Status(), and Wait().

void cInterface::Error const char *    s
 

Definition at line 285 of file interface.c.

References Close(), esyslog, Open(), Status(), and Wait().

void cInterface::Fill int    x,
int    y,
int    w,
int    h,
eDvbColor    color = clrBackground
 

Definition at line 105 of file interface.c.

References cOsd::Fill().

void cInterface::Flush void   
 

Definition at line 117 of file interface.c.

References cOsd::Flush().

Referenced by GetKey(), QueryKeys(), and Wait().

const int* cInterface::GetCols void    [inline]
 

Definition at line 48 of file interface.h.

eKeys cInterface::GetKey bool    Wait = true
 

Definition at line 57 of file interface.c.

References eKeys, Flush(), cRemote::Get(), cSVDRP::GetMessage(), Info(), open, cSVDRP::Process(), and SVDRP.

Referenced by LearnKeys(), and Wait().

bool cInterface::HasSVDRPConnection void    [inline]
 

Definition at line 37 of file interface.h.

References cSVDRP::HasConnection().

int cInterface::Height void    [inline]
 

Definition at line 40 of file interface.h.

void cInterface::Help const char *    Red,
const char *    Green = NULL,
const char *    Yellow = NULL,
const char *    Blue = NULL
 

Definition at line 322 of file interface.c.

References HelpButton(), and cStatus::MsgOsdHelpKeys().

void cInterface::HelpButton int    Index,
const char *    Text,
eDvbColor    FgColor,
eDvbColor    BgColor
[private]
 

Definition at line 308 of file interface.c.

References cOsd::Fill(), cOsd::Text(), and Width().

Referenced by Help().

void cInterface::Info const char *    s
 

Definition at line 275 of file interface.c.

References Close(), isyslog, Open(), Status(), and Wait().

Referenced by GetKey().

void cInterface::Interrupt void    [inline]
 

Definition at line 38 of file interface.h.

bool cInterface::IsOpen void    [inline]
 

Definition at line 34 of file interface.h.

void cInterface::LearnKeys void   
 

Definition at line 411 of file interface.c.

References cRemote::Clear(), Clear(), Close(), dsyslog, eKeys, GetKey(), kDown, kUp, cRemote::Name(), cListObject::Next(), Open(), QueryKeys(), cRemote::SetLearning(), tr, Width(), and WriteText().

void cInterface::Open int    NumCols = 0,
int    NumLines = 0
 

Definition at line 36 of file interface.c.

References cOsd::Open(), and open.

Referenced by Confirm(), Error(), Info(), and LearnKeys().

void cInterface::QueryKeys cRemote   Remote [private]
 

Definition at line 331 of file interface.c.

References Clear(), cRemote::Clear(), ClearEol(), dsyslog, eKeys, Flush(), cRemote::Get(), cRemote::Initialize(), kDown, cKey::Key(), kMenu, kNone, kUp, cRemote::Name(), cKey::ToString(), tr, and WriteText().

Referenced by LearnKeys().

void cInterface::SetBitmap int    x,
int    y,
const cBitmap   Bitmap
 

Definition at line 111 of file interface.c.

References cOsd::SetBitmap().

void cInterface::SetCols int *    c
 

Definition at line 123 of file interface.c.

References cols, and MaxCols.

eDvbFont cInterface::SetFont eDvbFont    Font
 

Definition at line 132 of file interface.c.

References eDvbFont, and cOsd::SetFont().

void cInterface::Status const char *    s,
eDvbColor    FgColor = clrBlack,
eDvbColor    BgColor = clrCyan
 

Definition at line 262 of file interface.c.

References ClearEol(), cStatus::MsgOsdStatusMessage(), Width(), and Write().

Referenced by Confirm(), Error(), and Info().

void cInterface::Title const char *    s
 

Definition at line 239 of file interface.c.

References ClearEol(), cStatus::MsgOsdTitle(), strn0cpy(), Width(), and Write().

eKeys cInterface::Wait int    Seconds = 0,
bool    KeepChar = false
[private]
 

Definition at line 74 of file interface.c.

References eKeys, Flush(), GetKey(), interrupted, ISRAWKEY, kNone, kOk, cRemote::Put(), and RAWKEY.

Referenced by Confirm(), Error(), and Info().

int cInterface::Width void    [inline]
 

Definition at line 39 of file interface.h.

Referenced by HelpButton(), LearnKeys(), Status(), and Title().

char * cInterface::WrapText const char *    Text,
int    Width,
int *    Height
 

Definition at line 137 of file interface.c.

References cOsd::CellWidth(), MALLOC, and cOsd::Width().

void cInterface::Write int    x,
int    y,
const char *    s,
eDvbColor    FgColor = clrWhite,
eDvbColor    BgColor = clrBackground
 

Definition at line 207 of file interface.c.

References cOsd::Text().

Referenced by Status(), Title(), and WriteText().

void cInterface::WriteText int    x,
int    y,
const char *    s,
eDvbColor    FgColor = clrWhite,
eDvbColor    BgColor = clrBackground
 

Definition at line 213 of file interface.c.

References ClearEol(), cols, and Write().

Referenced by LearnKeys(), and QueryKeys().


Field Documentation

int cInterface::cols[MaxCols] [private]
 

Definition at line 25 of file interface.h.

Referenced by cInterface(), SetCols(), and WriteText().

int cInterface::height [private]
 

Definition at line 23 of file interface.h.

Referenced by cInterface(), and Close().

bool cInterface::interrupted [private]
 

Definition at line 26 of file interface.h.

Referenced by cInterface(), and Wait().

int cInterface::open [private]
 

Definition at line 24 of file interface.h.

Referenced by cInterface(), Close(), GetKey(), and Open().

cSVDRP* cInterface::SVDRP [private]
 

Definition at line 27 of file interface.h.

Referenced by cInterface(), GetKey(), and ~cInterface().

int cInterface::width [private]
 

Definition at line 23 of file interface.h.

Referenced by cInterface(), and Close().


The documentation for this class was generated from the following files:
Generated on Wed Feb 5 23:31:15 2003 for VDR by doxygen1.3-rc2