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