]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/pen.h
fix unused parameter warnings
[wxWidgets.git] / include / wx / msw / pen.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
46562151 2// Name: wx/msw/pen.h
2bda0e17
KB
3// Purpose: wxPen class
4// Author: Julian Smart
5c57bf07 5// Modified by: Vadim Zeitlin: fixed operator=(), ==(), !=()
2bda0e17
KB
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
078cf5cb 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_PEN_H_
13#define _WX_PEN_H_
2bda0e17 14
2bda0e17 15#include "wx/gdiobj.h"
ce3b4b90 16#include "wx/gdicmn.h"
2bda0e17 17
5c57bf07 18// ----------------------------------------------------------------------------
2bda0e17 19// Pen
5c57bf07
VZ
20// ----------------------------------------------------------------------------
21
22class WXDLLEXPORT wxPen : public wxGDIObject
2bda0e17 23{
2bda0e17 24public:
8c583381 25 wxPen() { }
5c57bf07
VZ
26 wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
27 wxPen(const wxBitmap& stipple, int width);
8c583381 28 virtual ~wxPen() { }
5c57bf07 29
ce3b4b90 30 bool operator==(const wxPen& pen) const;
5c57bf07
VZ
31 bool operator!=(const wxPen& pen) const { return !(*this == pen); }
32
b7cacb43
VZ
33 virtual bool Ok() const { return IsOk(); }
34 virtual bool IsOk() const { return (m_refData != NULL); }
5c57bf07
VZ
35
36 // Override in order to recreate the pen
37 void SetColour(const wxColour& col);
1a1498c0 38 void SetColour(unsigned char r, unsigned char g, unsigned char b);
5c57bf07
VZ
39
40 void SetWidth(int width);
41 void SetStyle(int style);
42 void SetStipple(const wxBitmap& stipple);
43 void SetDashes(int nb_dashes, const wxDash *dash);
44 void SetJoin(int join);
45 void SetCap(int cap);
46
ce3b4b90
PC
47 wxColour& GetColour() const;
48 int GetWidth() const;
49 int GetStyle() const;
50 int GetJoin() const;
51 int GetCap() const;
52 int GetDashes(wxDash** ptr) const;
53 wxDash* GetDash() const;
54 int GetDashCount() const;
55 wxBitmap* GetStipple() const;
5c57bf07 56
8c583381
VZ
57 // internal: wxGDIObject methods
58 virtual bool RealizeResource();
59 virtual bool FreeResource(bool force = false);
60 virtual WXHANDLE GetResourceHandle() const;
61 virtual bool IsFree() const;
5c57bf07 62
7c310bc8
PC
63protected:
64 virtual wxObjectRefData* CreateRefData() const;
65 virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const;
66
8c583381
VZ
67 // same as FreeResource() + RealizeResource()
68 bool Recreate();
69
5c57bf07 70 DECLARE_DYNAMIC_CLASS(wxPen)
2bda0e17
KB
71};
72
5c57bf07 73#endif // _WX_PEN_H_