2002-02-28 14:26:23 +00:00
|
|
|
#ifndef __XVINTERN_H
|
|
|
|
#define __XVINTERN_H
|
|
|
|
|
|
|
|
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;
|
2005-09-28 11:51:41 +00:00
|
|
|
int Weight() const;
|
2002-02-28 14:26:23 +00:00
|
|
|
|
|
|
|
void SetFaceName(const char* f) { m_strFace = f; }
|
|
|
|
const char* FaceName() const;
|
|
|
|
int Family() const;
|
|
|
|
|
|
|
|
void Copy(const wxFont& rFont);
|
2004-03-17 17:15:44 +00:00
|
|
|
wxFont& Font(wxDC* dc, WINDOW w) const;
|
2002-02-28 14:26:23 +00:00
|
|
|
|
|
|
|
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); }
|
|
|
|
|
2003-05-22 15:25:25 +00:00
|
|
|
TFontId() : m_nSize(0), m_wMask(0), m_win(NULL_WIN) { }
|
2002-02-28 14:26:23 +00:00
|
|
|
TFontId(const TFontId& f) : m_win(NULL_WIN) { Copy(f); }
|
|
|
|
};
|
|
|
|
|
2003-05-22 15:25:25 +00:00
|
|
|
class TDC : public wxObject
|
2002-02-28 14:26:23 +00:00
|
|
|
{
|
2003-05-22 15:25:25 +00:00
|
|
|
wxWindow* _owner;
|
2002-02-28 14:26:23 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
wxDC* _dc;
|
|
|
|
RCT _clip;
|
2003-02-05 14:26:24 +00:00
|
|
|
int _dirty; // false = 0, true = 1, very_dirty = -1;
|
2003-05-22 15:07:21 +00:00
|
|
|
int _deltaf;
|
2002-02-28 14:26:23 +00:00
|
|
|
|
|
|
|
DRAW_CTOOLS _real_dct;
|
|
|
|
TFontId _real_font;
|
|
|
|
|
|
|
|
bool PenChanged() const;
|
|
|
|
bool BrushChanged() const;
|
|
|
|
bool FontChanged() const;
|
|
|
|
|
|
|
|
public:
|
|
|
|
DRAW_CTOOLS _dct;
|
|
|
|
TFontId _font;
|
|
|
|
wxPoint _pnt;
|
|
|
|
|
|
|
|
void SetClippingBox(const RCT* pRct);
|
|
|
|
bool GetClippingBox(RCT* pRct) const;
|
2003-02-05 14:26:24 +00:00
|
|
|
void SetDirty(int d = 1);
|
2003-05-22 15:07:21 +00:00
|
|
|
int GetFontDelta() const { return _deltaf; }
|
2002-02-28 14:26:23 +00:00
|
|
|
|
|
|
|
virtual wxDC& GetDC(bool bPaint = false);
|
2004-03-17 17:15:44 +00:00
|
|
|
virtual void KillDC();
|
2002-02-28 14:26:23 +00:00
|
|
|
TDC(wxWindow* owner);
|
|
|
|
virtual ~TDC();
|
|
|
|
};
|
|
|
|
|
|
|
|
class TPrintDC : public TDC
|
|
|
|
{
|
2004-06-28 15:24:28 +00:00
|
|
|
static bool _page_start;
|
|
|
|
|
2002-02-28 14:26:23 +00:00
|
|
|
public:
|
2004-06-28 15:24:28 +00:00
|
|
|
static void SetPageStart();
|
|
|
|
|
2002-02-28 14:26:23 +00:00
|
|
|
virtual wxDC& GetDC(bool);
|
2004-03-17 17:15:44 +00:00
|
|
|
virtual void KillDC();
|
2002-02-28 14:26:23 +00:00
|
|
|
TPrintDC(wxWindow* owner);
|
|
|
|
virtual ~TPrintDC();
|
|
|
|
};
|
|
|
|
|
2003-06-26 09:33:13 +00:00
|
|
|
wxString _GetAppTitle();
|
|
|
|
|
2002-02-28 14:26:23 +00:00
|
|
|
#endif
|