]>
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;
72 #if FUTURE_WXWIN_COMPATIBILITY_3_0
73 wxDEPRECATED_FUTURE( void SetStyle(int style
) )
74 { SetStyle((wxPenStyle
)style
); }
82 // Useful helper: create the brush resource
84 bool RealizeResource(void);
85 bool FreeResource(bool bForce
= false);
86 virtual WXHANDLE
GetResourceHandle(void) const;
87 bool IsFree(void) const;
90 LINEBUNDLE m_vLineBundle
;
91 AREABUNDLE m_vAreaBundle
;
94 virtual wxGDIRefData
* CreateGDIRefData() const;
95 virtual wxGDIRefData
* CloneGDIRefData(const wxGDIRefData
* data
) const;
97 // same as FreeResource() + RealizeResource()
100 DECLARE_DYNAMIC_CLASS(wxPen
)
101 }; // end of CLASS wxPen
103 extern int wx2os2PenStyle(wxPenStyle nWxStyle
);