]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk/bitmap.h
Fix wrong format specifiers in the samples.
[wxWidgets.git] / include / wx / gtk / bitmap.h
index 32a612d4a9768ecbcdfe4a6ec9e9f210dd335dcf..c3245532de535fca9eff5c253efee31374eba896 100644 (file)
@@ -17,10 +17,11 @@ class WXDLLIMPEXP_FWD_CORE wxPixelDataBase;
 // wxMask
 //-----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_CORE wxMask: public wxObject
+class WXDLLIMPEXP_CORE wxMask: public wxMaskBase
 {
 public:
     wxMask();
+    wxMask(const wxMask& mask);
     wxMask( const wxBitmap& bitmap, const wxColour& colour );
 #if wxUSE_PALETTE
     wxMask( const wxBitmap& bitmap, int paletteIndex );
@@ -28,18 +29,18 @@ public:
     wxMask( const wxBitmap& bitmap );
     virtual ~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;
+    wxMask(GdkPixmap*);
+    GdkPixmap* GetBitmap() const;
 
-    GdkBitmap *GetBitmap() const;
+protected:
+    virtual void FreeData();
+    virtual bool InitFromColour(const wxBitmap& bitmap, const wxColour& colour);
+    virtual bool InitFromMonoBitmap(const wxBitmap& bitmap);
 
 private:
+    GdkPixmap* m_bitmap;
+
     DECLARE_DYNAMIC_CLASS(wxMask)
 };
 
@@ -67,6 +68,7 @@ public:
     wxBitmap( const wxImage& image, int depth = wxBITMAP_SCREEN_DEPTH )
         { (void)CreateFromImage(image, depth); }
 #endif // wxUSE_IMAGE
+    wxBitmap(GdkPixbuf* pixbuf);
     virtual ~wxBitmap();
 
     bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
@@ -96,7 +98,7 @@ public:
 #if wxUSE_PALETTE
     wxPalette *GetPalette() const;
     void SetPalette(const wxPalette& palette);
-    wxPalette *GetColourMap() const { return GetPalette(); };
+    wxPalette *GetColourMap() const { return GetPalette(); }
 #endif // wxUSE_PALETTE
 
     static void InitStandardHandlers();
@@ -107,8 +109,6 @@ public:
     void SetHeight( int height );
     void SetWidth( int width );
     void SetDepth( int depth );
-    void SetPixmap( GdkPixmap *pixmap );
-    void SetPixbuf(GdkPixbuf* pixbuf, int depth = 0);
 
     GdkPixmap *GetPixmap() const;
     bool HasPixmap() const;
@@ -130,6 +130,7 @@ protected:
     virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const;
 
 private:
+    void SetPixmap(GdkPixmap* pixmap);
 #if wxUSE_IMAGE
     // to be called from CreateFromImage only!
     bool CreateFromImageAsPixmap(const wxImage& image, int depth);
@@ -147,7 +148,6 @@ public:
     // (wxBitmap may keep same bitmap e.g. as both pixmap and pixbuf):
     void PurgeOtherRepresentations(Representation keep);
 
-private:
     DECLARE_DYNAMIC_CLASS(wxBitmap)
 };