X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6d51f2202930063f397b8fd9a892bc5229963a91..6c99908c512489b614fb7a4fb010b1d6c2a6857e:/include/wx/msw/bitmap.h diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index 85f7b683c5..f173d69e39 100644 --- a/include/wx/msw/bitmap.h +++ b/include/wx/msw/bitmap.h @@ -29,6 +29,7 @@ class WXDLLEXPORT wxMask; class WXDLLEXPORT wxCursor; class WXDLLEXPORT wxControl; class WXDLLEXPORT wxImage; +class WXDLLEXPORT wxPalette; // ---------------------------------------------------------------------------- // Bitmap data @@ -47,7 +48,9 @@ public: public: int m_numColors; +#if wxUSE_PALETTE wxPalette m_bitmapPalette; +#endif // wxUSE_PALETTE int m_quality; // MSW-specific @@ -60,6 +63,13 @@ public: // optional mask for transparent drawing wxMask *m_bitmapMask; + +#if wxUSE_DIB_FOR_BITMAP + WXHANDLE m_hFileMap; // file mapping handle for large DIB's +#endif + + + DECLARE_NO_COPY_CLASS(wxBitmapRefData) }; // ---------------------------------------------------------------------------- @@ -147,8 +157,10 @@ public: int GetQuality() const { return (GetBitmapData() ? GetBitmapData()->m_quality : 0); } void SetQuality(int q); +#if wxUSE_PALETTE wxPalette* GetPalette() const { return (GetBitmapData() ? (& GetBitmapData()->m_bitmapPalette) : (wxPalette*) NULL); } void SetPalette(const wxPalette& palette); +#endif // wxUSE_PALETTE wxMask *GetMask() const { return (GetBitmapData() ? GetBitmapData()->m_bitmapMask : (wxMask*) NULL); } void SetMask(wxMask *mask) ; @@ -160,16 +172,23 @@ public: void SetOk(bool isOk); #endif // WXWIN_COMPATIBILITY_2 +#if wxUSE_PALETTE #if WXWIN_COMPATIBILITY wxPalette *GetColourMap() const { return GetPalette(); } void SetColourMap(wxPalette *cmap) { SetPalette(*cmap); }; #endif // WXWIN_COMPATIBILITY +#endif // wxUSE_PALETTE // Implementation public: void SetHBITMAP(WXHBITMAP bmp) { SetHandle((WXHANDLE)bmp); } WXHBITMAP GetHBITMAP() const { return (WXHBITMAP)GetHandle(); } +#if wxUSE_DIB_FOR_BITMAP + void SetHFileMap(WXHANDLE hFileMap) { GetBitmapData()->m_hFileMap = hFileMap; } + WXHANDLE GetHFileMap() const { return GetBitmapData()->m_hFileMap; } +#endif // wxUSE_DIB_FOR_BITMAP + void SetSelectedInto(wxDC *dc) { if (GetBitmapData()) GetBitmapData()->m_selectedInto = dc; } wxDC *GetSelectedInto() const { return (GetBitmapData() ? GetBitmapData()->m_selectedInto : (wxDC*) NULL); } @@ -202,6 +221,11 @@ protected: bool CreateFromImage(const wxImage& image, int depth); #endif // wxUSE_IMAGE +#if wxUSE_DIB_FOR_BITMAP + void *CreateDIB(int width, int height, int depth); + void CopyDIBLine(void* src, void* dest, int count) const; +#endif + private: #ifdef __WIN32__ // common part of CopyFromIcon/CopyFromCursor for Win32