]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/pen.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPen class
4 // Author: David Webster
7 // Copyright: (c) David Webster
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
14 #include "wx/gdiobj.h"
15 #include "wx/bitmap.h"
17 typedef long wxPMDash
;
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
23 class WXDLLIMPEXP_CORE wxPen
: public wxPenBase
27 wxPen( const wxColour
& rColour
29 ,wxPenStyle nStyle
= wxPENSTYLE_SOLID
31 #if FUTURE_WXWIN_COMPATIBILITY_3_0
32 wxDEPRECATED_FUTURE( wxPen(const wxColour
& col
, int width
, int style
) );
35 wxPen( const wxBitmap
& rStipple
40 bool operator == (const wxPen
& rPen
) const;
41 inline bool operator != (const wxPen
& rPen
) const
42 { return !(*this == rPen
); }
45 // Override in order to recreate the pen
47 void SetColour(const wxColour
& rColour
);
48 void SetColour(unsigned char cRed
, unsigned char cGreen
, unsigned char cBlue
);
50 void SetWidth(int nWidth
);
51 void SetStyle(wxPenStyle nStyle
);
52 void SetStipple(const wxBitmap
& rStipple
);
53 void SetDashes( int nNbDashes
56 void SetJoin(wxPenJoin nJoin
);
57 void SetCap(wxPenCap nCap
);
60 wxColour
GetColour(void) const;
61 int GetWidth(void) const;
62 wxPenStyle
GetStyle(void) const;
63 wxPenJoin
GetJoin(void) const;
64 wxPenCap
GetCap(void) const;
65 int GetPS(void) const;
66 int GetDashes(wxDash
**ptr
) const;
67 wxDash
* GetDash() const;
68 int GetDashCount() const;
69 wxBitmap
* GetStipple(void) const;
71 #if FUTURE_WXWIN_COMPATIBILITY_3_0
72 wxDEPRECATED_FUTURE( void SetStyle(int style
) )
73 { SetStyle((wxPenStyle
)style
); }
81 // Useful helper: create the brush resource
83 bool RealizeResource(void);
84 bool FreeResource(bool bForce
= false);
85 virtual WXHANDLE
GetResourceHandle(void) const;
86 bool IsFree(void) const;
89 LINEBUNDLE m_vLineBundle
;
90 AREABUNDLE m_vAreaBundle
;
93 virtual wxGDIRefData
* CreateGDIRefData() const;
94 virtual wxGDIRefData
* CloneGDIRefData(const wxGDIRefData
* data
) const;
96 // same as FreeResource() + RealizeResource()
99 DECLARE_DYNAMIC_CLASS(wxPen
)
100 }; // end of CLASS wxPen
102 extern int wx2os2PenStyle(wxPenStyle nWxStyle
);