]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/pen.h
don't hardcode 16/32 as sizes for small/normal icons (fixes bug 1862812)
[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
5c57bf07
VZ
33 // Override in order to recreate the pen
34 void SetColour(const wxColour& col);
1a1498c0 35 void SetColour(unsigned char r, unsigned char g, unsigned char b);
5c57bf07
VZ
36
37 void SetWidth(int width);
38 void SetStyle(int style);
39 void SetStipple(const wxBitmap& stipple);
40 void SetDashes(int nb_dashes, const wxDash *dash);
41 void SetJoin(int join);
42 void SetCap(int cap);
43
ce3b4b90
PC
44 wxColour& GetColour() const;
45 int GetWidth() const;
46 int GetStyle() const;
47 int GetJoin() const;
48 int GetCap() const;
49 int GetDashes(wxDash** ptr) const;
50 wxDash* GetDash() const;
51 int GetDashCount() const;
52 wxBitmap* GetStipple() const;
5c57bf07 53
8c583381
VZ
54 // internal: wxGDIObject methods
55 virtual bool RealizeResource();
56 virtual bool FreeResource(bool force = false);
57 virtual WXHANDLE GetResourceHandle() const;
58 virtual bool IsFree() const;
5c57bf07 59
7c310bc8 60protected:
8f884a0d
VZ
61 virtual wxGDIRefData* CreateGDIRefData() const;
62 virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const;
7c310bc8 63
8c583381
VZ
64 // same as FreeResource() + RealizeResource()
65 bool Recreate();
66
5c57bf07 67 DECLARE_DYNAMIC_CLASS(wxPen)
2bda0e17
KB
68};
69
5c57bf07 70#endif // _WX_PEN_H_