]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/mask.h
Adding label editing to native OS X listctrl.
[wxWidgets.git] / include / wx / generic / mask.h
CommitLineData
87f83ac8
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/generic/mask.h
3// Purpose: generic implementation of wxMask
4// Author: Vadim Zeitlin
5// Created: 2006-09-28
6// RCS-ID: $Id$
7// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_GENERIC_MASKG_H_
12#define _WX_GENERIC_MASKG_H_
13
14// ----------------------------------------------------------------------------
15// generic wxMask implementation
16// ----------------------------------------------------------------------------
17
18class WXDLLEXPORT wxMask : public wxMaskBase
19{
20public:
21 wxMask() { }
22 wxMask(const wxBitmap& bitmap, const wxColour& colour)
23 {
24 InitFromColour(bitmap, colour);
25 }
26
27#if wxUSE_PALETTE
28 wxMask(const wxBitmap& bitmap, int paletteIndex)
29 {
30 Create(bitmap, paletteIndex);
31 }
32#endif // wxUSE_PALETTE
33
34 wxMask(const wxBitmap& bitmap)
35 {
36 InitFromMonoBitmap(bitmap);
37 }
38
39 // implementation-only from now on
40 wxBitmap GetBitmap() const { return m_bitmap; }
41
42private:
43 // implement wxMaskBase pure virtuals
44 virtual void FreeData();
45 virtual bool InitFromColour(const wxBitmap& bitmap, const wxColour& colour);
46 virtual bool InitFromMonoBitmap(const wxBitmap& bitmap);
47
48 wxBitmap m_bitmap;
49
50 DECLARE_DYNAMIC_CLASS(wxMask)
51};
52
53#endif // _WX_GENERIC_MASKG_H_
54