From ebf7d5c40ad5436cb2fd43d58193c2d32423504a Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Wed, 9 Dec 2009 05:25:32 +0000 Subject: [PATCH] Add OSX prefix, and be clear that this is OS X only API to avoid any expectation that this API may work elsewhere. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/cocoa/private.h | 2 +- include/wx/osx/core/private.h | 2 +- include/wx/osx/toplevel.h | 4 ++-- include/wx/toplevel.h | 4 ++-- interface/wx/toplevel.h | 17 +++++++++++------ src/osx/cocoa/nonownedwnd.mm | 2 +- src/osx/toplevel_osx.cpp | 8 ++++---- 7 files changed, 22 insertions(+), 17 deletions(-) diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index 65991e48df..dabd225172 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -246,7 +246,7 @@ public : virtual bool IsActive(); virtual void SetModified(bool modified); - virtual bool GetModified() const; + virtual bool IsModified() const; wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } protected : diff --git a/include/wx/osx/core/private.h b/include/wx/osx/core/private.h index 59d4841241..6f64bc39c1 100644 --- a/include/wx/osx/core/private.h +++ b/include/wx/osx/core/private.h @@ -755,7 +755,7 @@ public : long style, long extraStyle, const wxString& name ) ; virtual void SetModified(bool WXUNUSED(modified)) { } - virtual bool GetModified() const { return false; } + virtual bool IsModified() const { return false; } protected : wxNonOwnedWindow* m_wxPeer; diff --git a/include/wx/osx/toplevel.h b/include/wx/osx/toplevel.h index 1e7f864463..14fb396b8b 100644 --- a/include/wx/osx/toplevel.h +++ b/include/wx/osx/toplevel.h @@ -75,8 +75,8 @@ public: virtual void SetTitle( const wxString& title); virtual wxString GetTitle() const; - virtual void SetModified(bool modified); - virtual bool GetModified() const; + virtual void OSXSetModified(bool modified); + virtual bool OSXIsModified() const; protected: // common part of all ctors diff --git a/include/wx/toplevel.h b/include/wx/toplevel.h index 53213dd885..cce46ab1cb 100644 --- a/include/wx/toplevel.h +++ b/include/wx/toplevel.h @@ -257,8 +257,8 @@ public: virtual void SetMinSize(const wxSize& minSize); virtual void SetMaxSize(const wxSize& maxSize); - virtual void SetModified(bool modified) { m_modified = modified; } - virtual bool GetModified() const { return m_modified; } + virtual void OSXSetModified(bool modified) { m_modified = modified; } + virtual bool OSXIsModified() const { return m_modified; } protected: // the frame client to screen translation should take account of the diff --git a/interface/wx/toplevel.h b/interface/wx/toplevel.h index d712256b50..29a65bfb2f 100644 --- a/interface/wx/toplevel.h +++ b/interface/wx/toplevel.h @@ -441,16 +441,21 @@ public: virtual bool ShouldPreventAppExit() const; /** - This function sets the wxTopLevelWindow's modified state, so that the - wxTopLevelWindow can change its GUI to reflect the current state. (e.g. on - Mac, the close button gets a black dot to reflect that there are unsaved changes) + This function sets the wxTopLevelWindow's modified state on OS X, + which currently draws a black dot in the wxTopLevelWindow's close button. + On other platforms, this method does nothing. + + @see OSXIsModified() */ - virtual void SetModified(bool modified); + virtual void OSXSetModified(bool modified); /** - Returns the current modified state of the wxTopLevelWindow. + Returns the current modified state of the wxTopLevelWindow on OS X. + On other platforms, this method does nothing. + + @see OSXSetModified() */ - virtual bool GetModified() const; + virtual bool OSXIsModified() const; /** Depending on the value of @a show parameter the window is either shown diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index 10098f74f5..9ed1300159 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -732,7 +732,7 @@ void wxNonOwnedWindowCocoaImpl::SetModified(bool modified) [m_macWindow setDocumentEdited:modified]; } -bool wxNonOwnedWindowCocoaImpl::GetModified() const +bool wxNonOwnedWindowCocoaImpl::IsModified() const { return [m_macWindow isDocumentEdited]; } diff --git a/src/osx/toplevel_osx.cpp b/src/osx/toplevel_osx.cpp index cd91ccb82b..3b6f61c6a2 100644 --- a/src/osx/toplevel_osx.cpp +++ b/src/osx/toplevel_osx.cpp @@ -187,12 +187,12 @@ bool wxTopLevelWindowMac::IsActive() return m_nowpeer->IsActive(); } -void wxTopLevelWindowMac::SetModified(bool modified) +void wxTopLevelWindowMac::OSXSetModified(bool modified) { m_nowpeer->SetModified(modified); } -bool wxTopLevelWindowMac::GetModified() const +bool wxTopLevelWindowMac::OSXIsModified() const { - return m_nowpeer->GetModified(); -} \ No newline at end of file + return m_nowpeer->IsModified(); +} -- 2.47.2