From 17b1d76b4add82305463d10b9f65668d06169363 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Mon, 23 Oct 2006 11:58:28 +0000 Subject: [PATCH] Correct 'markup' for GetResourceHandle after recent change in wx/gdiobj.h. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/os2/brush.h | 2 +- include/wx/os2/font.h | 4 ++-- include/wx/os2/gdiimage.h | 10 +++++----- include/wx/os2/pen.h | 2 +- src/os2/brush.cpp | 2 +- src/os2/font.cpp | 4 ++-- src/os2/gdiimage.cpp | 2 +- src/os2/pen.cpp | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/wx/os2/brush.h b/include/wx/os2/brush.h index f1d7be63e6..c7657279d5 100644 --- a/include/wx/os2/brush.h +++ b/include/wx/os2/brush.h @@ -72,7 +72,7 @@ public: // Useful helper: create the brush resource // bool RealizeResource(void); - WXHANDLE GetResourceHandle(void) ; + virtual WXHANDLE GetResourceHandle(void) const; bool FreeResource(bool bForce = false); bool IsFree(void) const; void Unshare(void); diff --git a/include/wx/os2/font.h b/include/wx/os2/font.h index 08e7ade7e3..92e0b22698 100644 --- a/include/wx/os2/font.h +++ b/include/wx/os2/font.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: font.h +// Name: wx/os2/font.h // Purpose: wxFont class // Author: David Webster // Modified by: @@ -105,7 +105,7 @@ public: // virtual bool IsFree(void) const; virtual bool RealizeResource(void); - virtual WXHANDLE GetResourceHandle(void); + virtual WXHANDLE GetResourceHandle(void) const; virtual bool FreeResource(bool bForce = false); WXHFONT GetHFONT(void) const; diff --git a/include/wx/os2/gdiimage.h b/include/wx/os2/gdiimage.h index 34c4c73d0d..4b645fe9da 100644 --- a/include/wx/os2/gdiimage.h +++ b/include/wx/os2/gdiimage.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: include/wx/os2/gdiimage.h +// Name: wx/os2/gdiimage.h // Purpose: wxGDIImage class: base class for wxBitmap, wxIcon, wxCursor // under OS/2 // Author: David Webster (adapted from msw version by Vadim Zeitlin) @@ -44,8 +44,8 @@ public: bool IsOk() const { if (m_hHandle == 0) - return FALSE; - return TRUE; + return false; + return true; } void SetSize( int nW @@ -226,8 +226,8 @@ public: pData->m_uId = uId; } // forward some of base class virtuals to wxGDIImageRefData - bool FreeResource(bool bForce = FALSE); - virtual WXHANDLE GetResourceHandle(); + bool FreeResource(bool bForce = false); + virtual WXHANDLE GetResourceHandle() const; protected: // create the data for the derived class here diff --git a/include/wx/os2/pen.h b/include/wx/os2/pen.h index 17c6822ac0..233016dc12 100644 --- a/include/wx/os2/pen.h +++ b/include/wx/os2/pen.h @@ -105,7 +105,7 @@ public: // bool RealizeResource(void); bool FreeResource(bool bForce = false); - WXHANDLE GetResourceHandle(void); + virtual WXHANDLE GetResourceHandle(void) const; bool IsFree(void) const; void Unshare(void); diff --git a/src/os2/brush.cpp b/src/os2/brush.cpp index 8e4682fff7..1c9f7c84d5 100644 --- a/src/os2/brush.cpp +++ b/src/os2/brush.cpp @@ -212,7 +212,7 @@ bool wxBrush::RealizeResource() return false; } // end of wxBrush::RealizeResource -WXHANDLE wxBrush::GetResourceHandle() +WXHANDLE wxBrush::GetResourceHandle() const { if (!M_BRUSHDATA) return 0; diff --git a/src/os2/font.cpp b/src/os2/font.cpp index a85ff9d642..0742d23070 100644 --- a/src/os2/font.cpp +++ b/src/os2/font.cpp @@ -51,7 +51,7 @@ class WXDLLEXPORT wxFontRefData: public wxGDIRefData public: wxFontRefData() { - Init(-1, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, FALSE, + Init(-1, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString, wxFONTENCODING_DEFAULT); } @@ -948,7 +948,7 @@ bool wxFont::FreeResource( bool WXUNUSED(bForce) ) return false; } // end of wxFont::FreeResource -WXHANDLE wxFont::GetResourceHandle() +WXHANDLE wxFont::GetResourceHandle() const { return GetHFONT(); } // end of wxFont::GetResourceHandle diff --git a/src/os2/gdiimage.cpp b/src/os2/gdiimage.cpp index a5b6a56e7a..0d21c81be0 100644 --- a/src/os2/gdiimage.cpp +++ b/src/os2/gdiimage.cpp @@ -241,7 +241,7 @@ bool wxGDIImage::FreeResource( bool WXUNUSED(bForce) ) return true; } -WXHANDLE wxGDIImage::GetResourceHandle() +WXHANDLE wxGDIImage::GetResourceHandle() const { return GetHandle(); } diff --git a/src/os2/pen.cpp b/src/os2/pen.cpp index 4079248642..24d89e39b2 100644 --- a/src/os2/pen.cpp +++ b/src/os2/pen.cpp @@ -304,7 +304,7 @@ bool wxPen::RealizeResource() return false; } // end of wxPen::RealizeResource -WXHANDLE wxPen::GetResourceHandle() +WXHANDLE wxPen::GetResourceHandle() const { if (!M_PENDATA) return 0; -- 2.45.2