00001 00002 // DasherScreen.h 00003 // 00005 // 00006 // Copyright (c) 2001-2002 David Ward 00007 // 00009 00010 #ifndef __DasherScreen_h_ 00011 #define __DasherScreen_h_ 00012 00013 #include "DasherWidgetInterface.h" 00014 #include "DasherTypes.h" 00015 00016 namespace Dasher {class CDasherScreen;} 00017 class Dasher::CDasherScreen 00018 { 00019 public: 00022 CDasherScreen(int width,int height) 00023 : m_iWidth(width), m_iHeight(height) {} 00024 00026 virtual void SetInterface(CDasherWidgetInterface* DasherInterface) {m_DasherInterface = DasherInterface;} 00027 00029 int GetWidth() const { return m_iWidth; } 00030 00032 int GetHeight() const { return m_iHeight; } 00033 00035 typedef struct tagpoint { int x; int y; } point; 00036 00040 virtual void SetFont(std::string Name)=0; 00041 00043 virtual void SetFontSize(Dasher::Opts::FontSize fontsize)=0; 00044 00046 virtual Dasher::Opts::FontSize GetFontSize()=0; 00047 00048 // DasherView asks for the width and height of the given symbol at a requested height, 00049 // then it is able to sensibly specify the upper left corner in DrawText. 00051 virtual void TextSize(symbol Character, int* Width, int* Height, int Size) const=0; 00053 virtual void DrawText(symbol Character, int x1, int y1, int Size) const=0; 00054 00055 00056 // Draw a filled rectangle - given position and color id 00058 // 00066 virtual void DrawRectangle(int x1, int y1, int x2, int y2, int Color, Opts::ColorSchemes ColorScheme) const=0; 00067 00068 // Draw a line of fixed colour (usually black). Intended for static UI elements such as a cross-hair 00070 // 00072 virtual void Polyline(point* Points, int Number) const=0; 00073 00074 // Draw a filled polygon - given vertices and color id 00075 // This is not (currently) used in standard Dasher. However, it could be very 00076 // useful in the future. Please implement unless it will be very difficult, 00077 // in which case make this function call Polyline. 00079 // 00084 virtual void DrawPolygon(point* Points, int Number, int Color, Opts::ColorSchemes ColorScheme) const=0; 00085 00086 // Signal the screen when a frame is started and finished 00088 virtual void Blank() const=0; 00089 00091 virtual void Display()=0; 00092 00093 protected: 00095 const int m_iWidth, m_iHeight; 00096 00098 CDasherWidgetInterface* m_DasherInterface; 00099 }; 00100 00101 00102 #endif /* #ifndef __DasherScreen_h_ */
1.3-rc3