]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/bitmap.h
DnD updates
[wxWidgets.git] / include / wx / gtk / bitmap.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: bitmap.h
3// Purpose:
4// Author: Robert Roebling
5// RCS-ID: $Id$
6// Copyright: (c) 1998 Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKBITMAPH__
12#define __GTKBITMAPH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
19#include "wx/object.h"
20#include "wx/string.h"
21#include "wx/palette.h"
22
23//-----------------------------------------------------------------------------
24// classes
25//-----------------------------------------------------------------------------
26
27class wxMask;
28class wxBitmap;
29
30//-----------------------------------------------------------------------------
31// also implemented here from wxImage
32//-----------------------------------------------------------------------------
33
34/*
35class wxImage : wxGDIObject
36{
37 wxImage( const wxBitmap &bitmap );
38 wxBitmap ConvertToBitmap() const;
39}
40*/
41
42//-----------------------------------------------------------------------------
43// wxMask
44//-----------------------------------------------------------------------------
45
46class wxMask: public wxObject
47{
48 DECLARE_DYNAMIC_CLASS(wxMask)
49
50public:
51 wxMask();
52 wxMask( const wxBitmap& bitmap, const wxColour& colour );
53 wxMask( const wxBitmap& bitmap, int paletteIndex );
54 wxMask( const wxBitmap& bitmap );
55 ~wxMask();
56
57 // implementation
58
59 GdkBitmap *m_bitmap;
60 GdkBitmap *GetBitmap() const;
61};
62
63//-----------------------------------------------------------------------------
64// wxBitmap
65//-----------------------------------------------------------------------------
66
67class wxBitmap: public wxObject
68{
69 DECLARE_DYNAMIC_CLASS(wxBitmap)
70
71public:
72 wxBitmap();
73 wxBitmap( int width, int height, int depth = -1 );
74 wxBitmap( const char bits[], int width, int height, int depth = 1 );
75 wxBitmap( const char **bits );
76 wxBitmap( char **bits );
77 wxBitmap( const wxBitmap& bmp );
78 wxBitmap( const wxBitmap* bmp );
79 wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
80 ~wxBitmap();
81 wxBitmap& operator = ( const wxBitmap& bmp );
82 bool operator == ( const wxBitmap& bmp );
83 bool operator != ( const wxBitmap& bmp );
84 bool Ok() const;
85
86 int GetHeight() const;
87 int GetWidth() const;
88 int GetDepth() const;
89
90 wxMask *GetMask() const;
91 void SetMask( wxMask *mask );
92
93 bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL );
94 bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM );
95
96 wxPalette *GetPalette() const;
97 wxPalette *GetColourMap() const
98 { return GetPalette(); };
99
100// implementation
101
102 void SetHeight( int height );
103 void SetWidth( int width );
104 void SetDepth( int depth );
105 void SetPixmap( GdkPixmap *pixmap );
106
107 GdkPixmap *GetPixmap() const;
108 GdkBitmap *GetBitmap() const;
109
110 // no data :-)
111};
112
113#endif // __GTKBITMAPH__