]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/bitmap.h
DnD updates
[wxWidgets.git] / include / wx / gtk / bitmap.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: bitmap.h
3// Purpose:
4// Author: Robert Roebling
6f65e337 5// RCS-ID: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
f05df5a8 7// Licence: wxWindows licence
c801d85f
KB
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
c801d85f
KB
27class wxMask;
28class wxBitmap;
29
4bc67cc5
RR
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
c801d85f
KB
42//-----------------------------------------------------------------------------
43// wxMask
44//-----------------------------------------------------------------------------
45
46class wxMask: public wxObject
47{
48 DECLARE_DYNAMIC_CLASS(wxMask)
49
fd0eed64
RR
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
f3cb6592 58
fd0eed64
RR
59 GdkBitmap *m_bitmap;
60 GdkBitmap *GetBitmap() const;
c801d85f
KB
61};
62
63//-----------------------------------------------------------------------------
64// wxBitmap
65//-----------------------------------------------------------------------------
66
67class wxBitmap: public wxObject
68{
69 DECLARE_DYNAMIC_CLASS(wxBitmap)
70
fd0eed64
RR
71public:
72 wxBitmap();
73 wxBitmap( int width, int height, int depth = -1 );
74 wxBitmap( const char bits[], int width, int height, int depth = 1 );
e52f60e6 75 wxBitmap( const char **bits );
fd0eed64
RR
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;
01111366 85
fd0eed64
RR
86 int GetHeight() const;
87 int GetWidth() const;
88 int GetDepth() const;
c801d85f 89
fd0eed64
RR
90 wxMask *GetMask() const;
91 void SetMask( wxMask *mask );
44216b3b 92
fd0eed64
RR
93 bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL );
94 bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM );
debe6624 95
fd0eed64
RR
96 wxPalette *GetPalette() const;
97 wxPalette *GetColourMap() const
98 { return GetPalette(); };
f3cb6592 99
fd0eed64 100// implementation
c801d85f 101
4bc67cc5
RR
102 void SetHeight( int height );
103 void SetWidth( int width );
104 void SetDepth( int depth );
105 void SetPixmap( GdkPixmap *pixmap );
106
fd0eed64
RR
107 GdkPixmap *GetPixmap() const;
108 GdkBitmap *GetBitmap() const;
f05df5a8 109
c801d85f
KB
110 // no data :-)
111};
112
113#endif // __GTKBITMAPH__