pen.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk/pen.h
  3. // Purpose:
  4. // Author: Robert Roebling
  5. // Copyright: (c) 1998 Robert Roebling
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef _WX_GTK_PEN_H_
  9. #define _WX_GTK_PEN_H_
  10. typedef signed char wxGTKDash;
  11. //-----------------------------------------------------------------------------
  12. // wxPen
  13. //-----------------------------------------------------------------------------
  14. class WXDLLIMPEXP_CORE wxPen: public wxPenBase
  15. {
  16. public:
  17. wxPen() { }
  18. wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID );
  19. #if FUTURE_WXWIN_COMPATIBILITY_3_0
  20. wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
  21. #endif
  22. virtual ~wxPen();
  23. bool operator==(const wxPen& pen) const;
  24. bool operator!=(const wxPen& pen) const { return !(*this == pen); }
  25. void SetColour( const wxColour &colour );
  26. void SetColour( unsigned char red, unsigned char green, unsigned char blue );
  27. void SetCap( wxPenCap capStyle );
  28. void SetJoin( wxPenJoin joinStyle );
  29. void SetStyle( wxPenStyle style );
  30. void SetWidth( int width );
  31. void SetDashes( int number_of_dashes, const wxDash *dash );
  32. void SetStipple(const wxBitmap& stipple);
  33. wxColour GetColour() const;
  34. wxPenCap GetCap() const;
  35. wxPenJoin GetJoin() const;
  36. wxPenStyle GetStyle() const;
  37. int GetWidth() const;
  38. int GetDashes(wxDash **ptr) const;
  39. int GetDashCount() const;
  40. wxDash* GetDash() const;
  41. wxBitmap *GetStipple() const;
  42. #if FUTURE_WXWIN_COMPATIBILITY_3_0
  43. wxDEPRECATED_FUTURE( void SetStyle(int style) )
  44. { SetStyle((wxPenStyle)style); }
  45. #endif
  46. protected:
  47. virtual wxGDIRefData *CreateGDIRefData() const;
  48. virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
  49. DECLARE_DYNAMIC_CLASS(wxPen)
  50. };
  51. #endif // _WX_GTK_PEN_H_