pen.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/dfb/pen.h
  3. // Purpose: wxPen class declaration
  4. // Author: Vaclav Slavik
  5. // Created: 2006-08-04
  6. // Copyright: (c) 2006 REA Elektronik GmbH
  7. // Licence: wxWindows licence
  8. /////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_DFB_PEN_H_
  10. #define _WX_DFB_PEN_H_
  11. #include "wx/defs.h"
  12. #include "wx/object.h"
  13. #include "wx/string.h"
  14. #include "wx/gdiobj.h"
  15. #include "wx/gdicmn.h"
  16. //-----------------------------------------------------------------------------
  17. // classes
  18. //-----------------------------------------------------------------------------
  19. class WXDLLIMPEXP_FWD_CORE wxBitmap;
  20. class WXDLLIMPEXP_FWD_CORE wxPen;
  21. //-----------------------------------------------------------------------------
  22. // wxPen
  23. //-----------------------------------------------------------------------------
  24. class WXDLLIMPEXP_CORE wxPen: public wxPenBase
  25. {
  26. public:
  27. wxPen() {}
  28. wxPen(const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
  29. #if FUTURE_WXWIN_COMPATIBILITY_3_0
  30. wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
  31. #endif
  32. wxPen(const wxBitmap& stipple, int width);
  33. bool operator==(const wxPen& pen) const;
  34. bool operator!=(const wxPen& pen) const { return !(*this == pen); }
  35. void SetColour(const wxColour &colour);
  36. void SetColour(unsigned char red, unsigned char green, unsigned char blue);
  37. void SetCap(wxPenCap capStyle);
  38. void SetJoin(wxPenJoin joinStyle);
  39. void SetStyle(wxPenStyle style);
  40. void SetWidth(int width);
  41. void SetDashes(int number_of_dashes, const wxDash *dash);
  42. void SetStipple(const wxBitmap& stipple);
  43. wxColour GetColour() const;
  44. wxPenCap GetCap() const;
  45. wxPenJoin GetJoin() const;
  46. wxPenStyle GetStyle() const;
  47. int GetWidth() const;
  48. int GetDashes(wxDash **ptr) const;
  49. int GetDashCount() const;
  50. wxDash* GetDash() const;
  51. wxBitmap *GetStipple() const;
  52. #if FUTURE_WXWIN_COMPATIBILITY_3_0
  53. wxDEPRECATED_FUTURE( void SetStyle(int style) )
  54. { SetStyle((wxPenStyle)style); }
  55. #endif
  56. protected:
  57. virtual wxGDIRefData *CreateGDIRefData() const;
  58. virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
  59. DECLARE_DYNAMIC_CLASS(wxPen)
  60. };
  61. #endif // _WX_DFB_PEN_H_