]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/pen.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPen class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/gdiobj.h"
16 #include "wx/bitmap.h"
18 typedef long wxPMDash
;
20 // ----------------------------------------------------------------------------
22 // ----------------------------------------------------------------------------
24 class WXDLLIMPEXP_CORE wxPen
: public wxPenBase
28 wxPen( const wxColour
& rColour
30 ,wxPenStyle nStyle
= wxPENSTYLE_SOLID
32 #if FUTURE_WXWIN_COMPATIBILITY_3_0
33 wxDEPRECATED_FUTURE( wxPen(const wxColour
& col
, int width
, int style
) );
36 wxPen( const wxBitmap
& rStipple
41 bool operator == (const wxPen
& rPen
) const;
42 inline bool operator != (const wxPen
& rPen
) const
43 { return !(*this == rPen
); }
46 // Override in order to recreate the pen
48 void SetColour(const wxColour
& rColour
);
49 void SetColour(unsigned char cRed
, unsigned char cGreen
, unsigned char cBlue
);
51 void SetWidth(int nWidth
);
52 void SetStyle(wxPenStyle nStyle
);
53 void SetStipple(const wxBitmap
& rStipple
);
54 void SetDashes( int nNbDashes
57 void SetJoin(wxPenJoin nJoin
);
58 void SetCap(wxPenCap nCap
);
61 wxColour
GetColour(void) const;
62 int GetWidth(void) const;
63 wxPenStyle
GetStyle(void) const;
64 wxPenJoin
GetJoin(void) const;
65 wxPenCap
GetCap(void) const;
66 int GetPS(void) const;
67 int GetDashes(wxDash
**ptr
) const;
68 wxDash
* GetDash() const;
69 int GetDashCount() const;
70 wxBitmap
* GetStipple(void) const;
77 // Useful helper: create the brush resource
79 bool RealizeResource(void);
80 bool FreeResource(bool bForce
= false);
81 virtual WXHANDLE
GetResourceHandle(void) const;
82 bool IsFree(void) const;
85 LINEBUNDLE m_vLineBundle
;
86 AREABUNDLE m_vAreaBundle
;
89 virtual wxGDIRefData
* CreateGDIRefData() const;
90 virtual wxGDIRefData
* CloneGDIRefData(const wxGDIRefData
* data
) const;
92 // same as FreeResource() + RealizeResource()
95 DECLARE_DYNAMIC_CLASS(wxPen
)
96 }; // end of CLASS wxPen
98 extern int wx2os2PenStyle(wxPenStyle nWxStyle
);