9460e73d9a
Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Utilizzato nome applicazione come titolo documento di stampa al posto della parola "Printout" proposta come standard git-svn-id: svn://10.65.10.50/trunk@11287 c028cbd2-c16b-5b4b-a496-9718f37d4682
88 lines
1.8 KiB
C++
Executable File
88 lines
1.8 KiB
C++
Executable File
#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(wxDC* dc) 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_nSize(0), m_wMask(0), m_win(NULL_WIN) { }
|
|
TFontId(const TFontId& f) : m_win(NULL_WIN) { Copy(f); }
|
|
};
|
|
|
|
class TDC : public wxObject
|
|
{
|
|
wxWindow* _owner;
|
|
|
|
protected:
|
|
wxDC* _dc;
|
|
RCT _clip;
|
|
int _dirty; // false = 0, true = 1, very_dirty = -1;
|
|
int _deltaf;
|
|
|
|
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;
|
|
void SetDirty(int d = 1);
|
|
int GetFontDelta() const { return _deltaf; }
|
|
|
|
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();
|
|
};
|
|
|
|
wxString _GetAppTitle();
|
|
|
|
#endif
|