~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to include/wx/msw/palette.h

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/////////////////////////////////////////////////////////////////////////////
 
2
// Name:        wx/msw/palette.h
 
3
// Purpose:     wxPalette class
 
4
// Author:      Julian Smart
 
5
// Modified by:
 
6
// Created:     01/02/97
 
7
// RCS-ID:      $Id: palette.h 70040 2011-12-17 23:52:47Z VZ $
 
8
// Copyright:   (c) Julian Smart
 
9
// Licence:     wxWindows licence
 
10
/////////////////////////////////////////////////////////////////////////////
 
11
 
 
12
#ifndef _WX_PALETTE_H_
 
13
#define _WX_PALETTE_H_
 
14
 
 
15
#include "wx/gdiobj.h"
 
16
 
 
17
class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase
 
18
{
 
19
public:
 
20
    wxPalette() { }
 
21
    wxPalette(int n,
 
22
              const unsigned char *red, const unsigned char *green, const unsigned char *blue)
 
23
    {
 
24
        Create(n, red, green, blue);
 
25
    }
 
26
 
 
27
    bool Create(int n,
 
28
                const unsigned char *red, const unsigned char *green, const unsigned char *blue);
 
29
 
 
30
    virtual int GetColoursCount() const;
 
31
 
 
32
    int
 
33
    GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
 
34
 
 
35
    bool
 
36
    GetRGB(int pixel,
 
37
           unsigned char *red, unsigned char *green, unsigned char *blue) const;
 
38
 
 
39
    // implemetation
 
40
    WXHPALETTE GetHPALETTE() const;
 
41
    void SetHPALETTE(WXHPALETTE pal);
 
42
 
 
43
protected:
 
44
    virtual wxGDIRefData *CreateGDIRefData() const;
 
45
    virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
 
46
 
 
47
private:
 
48
    DECLARE_DYNAMIC_CLASS(wxPalette)
 
49
};
 
50
 
 
51
#endif // _WX_PALETTE_H_