add wxShowEvent::IsShown() and wxIconizeEvent::IsIconized() instead of (now deprecated) GetShow() and Iconized() respectively (#978)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-06-21 16:17:13 +00:00
parent 48e487e37f
commit d317fdebc3
4 changed files with 66 additions and 4 deletions

View File

@ -1366,7 +1366,13 @@ public:
{ m_show = event.m_show; }
void SetShow(bool show) { m_show = show; }
bool GetShow() const { return m_show; }
// return true if the window was shown, false if hidden
bool IsShown() const { return m_show; }
#ifdef WXWIN_COMPATIBILITY_2_8
wxDEPRECATED( bool GetShow() const { return IsShown(); } )
#endif
virtual wxEvent *Clone() const { return new wxShowEvent(*this); }
@ -1391,8 +1397,11 @@ public:
: wxEvent(event)
{ m_iconized = event.m_iconized; }
#ifdef WXWIN_COMPATIBILITY_2_8
wxDEPRECATED( bool Iconized() const { return IsIconized(); } )
#endif
// return true if the frame was iconized, false if restored
bool Iconized() const { return m_iconized; }
bool IsIconized() const { return m_iconized; }
virtual wxEvent *Clone() const { return new wxIconizeEvent(*this); }

View File

@ -3115,6 +3115,54 @@ public:
bool IsPopup() const;
};
/**
@class wxShowEvent
@wxheader{event.h}
An event being sent when the window is shown or hidden.
Currently only wxMSW, wxGTK and wxOS2 generate such events.
@onlyfor{wxmsw,wxgtk,wxos2}
@beginEventTable{wxShowEvent}
@event{EVT_SHOW(func)}
Process a wxEVT_SHOW event.
@endEventTable
@library{wxcore}
@category{events}
@see @ref overview_eventhandling, wxWindow::Show,
wxWindow::IsShown
*/
class wxShowEvent : public wxEvent
{
public:
/**
Constructor.
*/
wxShowEvent(int winid = 0, bool show = false);
/**
Set whether the windows was shown or hidden.
*/
void SetShow(bool show);
/**
Return @true if the window has been shown, @false if it has been
hidden.
*/
bool IsShown() const;
/**
@deprecated This function is deprecated in favour of IsShown().
*/
bool GetShow() const;
};
/**
@class wxIconizeEvent
@ -3149,6 +3197,11 @@ public:
Returns @true if the frame has been iconized, @false if it has been
restored.
*/
bool IsIconized() const;
/**
@deprecated This function is deprecated in favour of IsIconized().
*/
bool Iconized() const;
};

View File

@ -132,7 +132,7 @@ public:
@param iconize
If @true, iconizes the window; if @false, shows and restores it.
@see IsIconized(), Maximize().
@see IsIconized(), Maximize(), wxIconizeEvent.
*/
void Iconize(bool iconize);

View File

@ -2429,7 +2429,7 @@ public:
@return @true if the window has been shown or hidden or @false if nothing
was done because it already was in the requested state.
@see IsShown(), Hide(), wxRadioBox::Show
@see IsShown(), Hide(), wxRadioBox::Show, wxShowEvent.
*/
virtual bool Show(bool show = true);