85 lines
1.7 KiB
C
85 lines
1.7 KiB
C
|
#ifndef __XVINTERN_H
|
||
|
#define __XVINTERN_H
|
||
|
|
||
|
const WINDOW _print_win = 883L;
|
||
|
|
||
|
class TFontId
|
||
|
{
|
||
|
wxString m_strFace;
|
||
|
int m_nSize;
|
||
|
XVT_FONT_STYLE_MASK m_wMask;
|
||
|
WINDOW m_win;
|
||
|
|
||
|
protected:
|
||
|
void Copy(const TFontId& pFont);
|
||
|
bool IsEqual(const TFontId& pFont) const;
|
||
|
|
||
|
public:
|
||
|
void SetWin(WINDOW w) { m_win = w; }
|
||
|
WINDOW Win() const { return m_win; }
|
||
|
|
||
|
void SetPointSize(int s) { m_nSize = s; }
|
||
|
int PointSize() const { return m_nSize; }
|
||
|
|
||
|
void SetMask(XVT_FONT_STYLE_MASK mask) { m_wMask = mask; }
|
||
|
XVT_FONT_STYLE_MASK Mask() const { return m_wMask; }
|
||
|
int Style() const;
|
||
|
bool Underline() const;
|
||
|
|
||
|
void SetFaceName(const char* f) { m_strFace = f; }
|
||
|
const char* FaceName() const;
|
||
|
int Family() const;
|
||
|
|
||
|
void Copy(const wxFont& rFont);
|
||
|
wxFont& Font() const;
|
||
|
|
||
|
TFontId& operator=(const TFontId& f) { Copy(f); return *this; }
|
||
|
bool operator==(const TFontId& f) const { return IsEqual(f); }
|
||
|
bool operator!=(const TFontId& f) const { return !IsEqual(f); }
|
||
|
|
||
|
TFontId() : m_win(NULL_WIN), m_nSize(0), m_wMask(0) { }
|
||
|
TFontId(const TFontId& f) : m_win(NULL_WIN) { Copy(f); }
|
||
|
};
|
||
|
|
||
|
class TDC : public wxObject
|
||
|
{
|
||
|
wxWindow* _owner;
|
||
|
|
||
|
protected:
|
||
|
wxDC* _dc;
|
||
|
RCT _clip;
|
||
|
|
||
|
DRAW_CTOOLS _real_dct;
|
||
|
TFontId _real_font;
|
||
|
|
||
|
bool PenChanged() const;
|
||
|
bool BrushChanged() const;
|
||
|
bool FontChanged() const;
|
||
|
|
||
|
public:
|
||
|
DRAW_CTOOLS _dct;
|
||
|
TFontId _font;
|
||
|
int _dirty; // false = 0, true = 1, very_dirty = -1;
|
||
|
|
||
|
|
||
|
wxPoint _pnt;
|
||
|
|
||
|
void SetClippingBox(const RCT* pRct);
|
||
|
bool GetClippingBox(RCT* pRct) const;
|
||
|
|
||
|
virtual wxDC& GetDC(bool bPaint = false);
|
||
|
void KillDC();
|
||
|
TDC(wxWindow* owner);
|
||
|
virtual ~TDC();
|
||
|
};
|
||
|
|
||
|
class TPrintDC : public TDC
|
||
|
{
|
||
|
public:
|
||
|
virtual wxDC& GetDC(bool);
|
||
|
TPrintDC(wxWindow* owner);
|
||
|
virtual ~TPrintDC();
|
||
|
};
|
||
|
|
||
|
#endif
|