/////////////////////////////////////////////////////////////////////////////
-// Name: bitmap.h
+// Name: wx/gtk/bitmap.h
// Purpose:
// Author: Robert Roebling
// RCS-ID: $Id$
public:
wxMask();
wxMask( const wxBitmap& bitmap, const wxColour& colour );
+#if wxUSE_PALETTE
wxMask( const wxBitmap& bitmap, int paletteIndex );
+#endif // wxUSE_PALETTE
wxMask( const wxBitmap& bitmap );
~wxMask();
-
+
bool Create( const wxBitmap& bitmap, const wxColour& colour );
+#if wxUSE_PALETTE
bool Create( const wxBitmap& bitmap, int paletteIndex );
+#endif // wxUSE_PALETTE
bool Create( const wxBitmap& bitmap );
// implementation
GdkBitmap *m_bitmap;
-
+
GdkBitmap *GetBitmap() const;
-
+
private:
DECLARE_DYNAMIC_CLASS(wxMask)
};
bool Ok() const;
bool Create(int width, int height, int depth = -1);
-
+
int GetHeight() const;
int GetWidth() const;
int GetDepth() const;
-
+
wxImage ConvertToImage() const;
// copies the contents and mask of the given (colour) icon to the bitmap
wxMask *GetMask() const;
void SetMask( wxMask *mask );
-
+
wxBitmap GetSubBitmap( const wxRect& rect ) const;
bool SaveFile(const wxString &name, wxBitmapType type,
bool HasPixbuf() const;
GdkPixbuf *GetPixbuf() const;
#endif
-
+
// Basically, this corresponds to Win32 StretchBlt()
wxBitmap Rescale( int clipx, int clipy, int clipwidth, int clipheight, int width, int height );
-
+
// raw bitmap access support functions
void *GetRawData(wxPixelDataBase& data, int bpp);
void UngetRawData(wxPixelDataBase& data);
#endif
friend class wxBitmapHandler;
-private:
+private:
DECLARE_DYNAMIC_CLASS(wxBitmap)
};
/////////////////////////////////////////////////////////////////////////////
-// Name: dc.h
+// Name: wx/gtk/dc.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
wxDC();
~wxDC() { }
+#if wxUSE_PALETTE
void SetColourMap( const wxPalette& palette ) { SetPalette(palette); };
+#endif // wxUSE_PALETTE
// Resolution in pixels per logical inch
virtual wxSize GetPPI() const;
/////////////////////////////////////////////////////////////////////////////
-// Name: bitmap.h
+// Name: wx/gtk/bitmap.h
// Purpose:
// Author: Robert Roebling
// RCS-ID: $Id$
public:
wxMask();
wxMask( const wxBitmap& bitmap, const wxColour& colour );
+#if wxUSE_PALETTE
wxMask( const wxBitmap& bitmap, int paletteIndex );
+#endif // wxUSE_PALETTE
wxMask( const wxBitmap& bitmap );
~wxMask();
-
+
bool Create( const wxBitmap& bitmap, const wxColour& colour );
+#if wxUSE_PALETTE
bool Create( const wxBitmap& bitmap, int paletteIndex );
+#endif // wxUSE_PALETTE
bool Create( const wxBitmap& bitmap );
// implementation
GdkBitmap *m_bitmap;
-
+
GdkBitmap *GetBitmap() const;
-
+
private:
DECLARE_DYNAMIC_CLASS(wxMask)
};
bool Ok() const;
bool Create(int width, int height, int depth = -1);
-
+
int GetHeight() const;
int GetWidth() const;
int GetDepth() const;
-
+
wxImage ConvertToImage() const;
// copies the contents and mask of the given (colour) icon to the bitmap
wxMask *GetMask() const;
void SetMask( wxMask *mask );
-
+
wxBitmap GetSubBitmap( const wxRect& rect ) const;
bool SaveFile(const wxString &name, wxBitmapType type,
bool HasPixbuf() const;
GdkPixbuf *GetPixbuf() const;
#endif
-
+
// Basically, this corresponds to Win32 StretchBlt()
wxBitmap Rescale( int clipx, int clipy, int clipwidth, int clipheight, int width, int height );
-
+
// raw bitmap access support functions
void *GetRawData(wxPixelDataBase& data, int bpp);
void UngetRawData(wxPixelDataBase& data);
#endif
friend class wxBitmapHandler;
-private:
+private:
DECLARE_DYNAMIC_CLASS(wxBitmap)
};
/////////////////////////////////////////////////////////////////////////////
-// Name: dc.h
+// Name: wx/gtk/dc.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
wxDC();
~wxDC() { }
+#if wxUSE_PALETTE
void SetColourMap( const wxPalette& palette ) { SetPalette(palette); };
+#endif // wxUSE_PALETTE
// Resolution in pixels per logical inch
virtual wxSize GetPPI() const;
/////////////////////////////////////////////////////////////////////////////
-// Name: bitmap.cpp
+// Name: src/gtk/bitmap.cpp
// Purpose:
// Author: Robert Roebling
// RCS-ID: $Id$
Create( bitmap, colour );
}
+#if wxUSE_PALETTE
wxMask::wxMask( const wxBitmap& bitmap, int paletteIndex )
{
m_bitmap = (GdkBitmap *) NULL;
Create( bitmap, paletteIndex );
}
+#endif // wxUSE_PALETTE
wxMask::wxMask( const wxBitmap& bitmap )
{
return true;
}
+#if wxUSE_PALETTE
bool wxMask::Create( const wxBitmap& bitmap, int paletteIndex )
{
unsigned char r,g,b;
return Create(bitmap, wxColour(r, g, b));
}
+#endif // wxUSE_PALETTE
bool wxMask::Create( const wxBitmap& bitmap )
{
gdk_pixbuf_unref( m_pixbuf );
#endif
delete m_mask;
+#if wxUSE_PALETTE
delete m_palette;
+#endif // wxUSE_PALETTE
}
//-----------------------------------------------------------------------------
return true;
}
+#if wxUSE_PALETTE
wxPalette *wxBitmap::GetPalette() const
{
if (!Ok())
{
// TODO
}
+#endif // wxUSE_PALETTE
void wxBitmap::SetHeight( int height )
{
{
// TODO: Insert handler based on GdkPixbufs handler later
}
-
-
/////////////////////////////////////////////////////////////////////////////
-// Name: bitmap.cpp
+// Name: src/gtk/bitmap.cpp
// Purpose:
// Author: Robert Roebling
// RCS-ID: $Id$
Create( bitmap, colour );
}
+#if wxUSE_PALETTE
wxMask::wxMask( const wxBitmap& bitmap, int paletteIndex )
{
m_bitmap = (GdkBitmap *) NULL;
Create( bitmap, paletteIndex );
}
+#endif // wxUSE_PALETTE
wxMask::wxMask( const wxBitmap& bitmap )
{
return true;
}
+#if wxUSE_PALETTE
bool wxMask::Create( const wxBitmap& bitmap, int paletteIndex )
{
unsigned char r,g,b;
return Create(bitmap, wxColour(r, g, b));
}
+#endif // wxUSE_PALETTE
bool wxMask::Create( const wxBitmap& bitmap )
{
gdk_pixbuf_unref( m_pixbuf );
#endif
delete m_mask;
+#if wxUSE_PALETTE
delete m_palette;
+#endif // wxUSE_PALETTE
}
//-----------------------------------------------------------------------------
return true;
}
+#if wxUSE_PALETTE
wxPalette *wxBitmap::GetPalette() const
{
if (!Ok())
{
// TODO
}
+#endif // wxUSE_PALETTE
void wxBitmap::SetHeight( int height )
{
{
// TODO: Insert handler based on GdkPixbufs handler later
}
-
-