deprecated wxSizerItem::IsShown() because it doesn't really make sense for the sizers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11,6 +11,13 @@ INCOMPATIBLE CHANGES SINCE 2.6.x
|
|||||||
- For all wxInputStreams, Eof() becomes true after an attempt has been made
|
- For all wxInputStreams, Eof() becomes true after an attempt has been made
|
||||||
to read _past_ the end of file.
|
to read _past_ the end of file.
|
||||||
|
|
||||||
|
Deprecated methods since 2.6.x and their replacements
|
||||||
|
-----------------------------------------------------
|
||||||
|
|
||||||
|
- wxGetWorkingDirectory() deprecated in favour of wxGetCwd()
|
||||||
|
- wxDC::BeginDrawing() and wxDC::EndDrawing() deprecated, just don't use them
|
||||||
|
- wxSizerItem::IsShown(): no replacement as it doesn't have clear semantics
|
||||||
|
|
||||||
|
|
||||||
2.7.0
|
2.7.0
|
||||||
-----
|
-----
|
||||||
@@ -19,7 +26,6 @@ All:
|
|||||||
|
|
||||||
- wxLaunchDefaultBrowser() now supports wxBROWSER_NEW_WINDOW flag
|
- wxLaunchDefaultBrowser() now supports wxBROWSER_NEW_WINDOW flag
|
||||||
- Added wxStringTokenizer::GetLastDelimiter(); improved documentation
|
- Added wxStringTokenizer::GetLastDelimiter(); improved documentation
|
||||||
- wxGetWorkingDirectory() deprecated. Use wxGetCwd() instead.
|
|
||||||
- Speed improvements to wxRegEx when matching is done in a loop such as
|
- Speed improvements to wxRegEx when matching is done in a loop such as
|
||||||
during a search and replace.
|
during a search and replace.
|
||||||
- Fix regerror and regfree name conficts when built-in regex and system regex
|
- Fix regerror and regfree name conficts when built-in regex and system regex
|
||||||
@@ -75,7 +81,6 @@ All (GUI):
|
|||||||
- Added wxToolbook (uses a wxToolBar to control pages).
|
- Added wxToolbook (uses a wxToolBar to control pages).
|
||||||
- Added SetSheetStyle to wxPropertySheetDialog and allowed it to
|
- Added SetSheetStyle to wxPropertySheetDialog and allowed it to
|
||||||
behave like a Mac OS X settings dialog.
|
behave like a Mac OS X settings dialog.
|
||||||
- wxDC::BeginDrawing() and wxDC::EndDrawing() deprecated.
|
|
||||||
- Added <disabled> XRC tag for wxToolBar elements and <bg> for wxToolBar itself
|
- Added <disabled> XRC tag for wxToolBar elements and <bg> for wxToolBar itself
|
||||||
|
|
||||||
wxMSW:
|
wxMSW:
|
||||||
|
@@ -147,12 +147,6 @@ Get the userData item attribute.
|
|||||||
|
|
||||||
If this item is tracking a window then return it. NULL otherwise.
|
If this item is tracking a window then return it. NULL otherwise.
|
||||||
|
|
||||||
\membersection{wxSizerItem::IsShown}\label{wxsizeritemisshown}
|
|
||||||
|
|
||||||
\constfunc{bool}{IsShown}{\void}
|
|
||||||
|
|
||||||
Is this item shown?
|
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxSizerItem::IsSizer}\label{wxsizeritemissizer}
|
\membersection{wxSizerItem::IsSizer}\label{wxsizeritemissizer}
|
||||||
|
|
||||||
|
@@ -253,7 +253,6 @@ public:
|
|||||||
wxSize GetSpacer() const;
|
wxSize GetSpacer() const;
|
||||||
|
|
||||||
void Show(bool show);
|
void Show(bool show);
|
||||||
bool IsShown() const;
|
|
||||||
|
|
||||||
void SetUserData(wxObject* userData)
|
void SetUserData(wxObject* userData)
|
||||||
{ delete m_userData; m_userData = userData; }
|
{ delete m_userData; m_userData = userData; }
|
||||||
@@ -269,6 +268,11 @@ public:
|
|||||||
void SetSpacer(const wxSize& size);
|
void SetSpacer(const wxSize& size);
|
||||||
void SetSpacer(int width, int height) { SetSpacer(wxSize(width, height)); }
|
void SetSpacer(int width, int height) { SetSpacer(wxSize(width, height)); }
|
||||||
|
|
||||||
|
// this function is deprecated because if this item is a sizer, then it
|
||||||
|
// doesn't really make sense: sizer is neither shown nor hidden, because
|
||||||
|
// some of its elements may be hidden while others are shown
|
||||||
|
wxDEPRECATED( bool IsShown() const );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// common part of several ctors
|
// common part of several ctors
|
||||||
void Init() { m_userData = NULL; }
|
void Init() { m_userData = NULL; }
|
||||||
@@ -276,6 +280,8 @@ protected:
|
|||||||
// common part of ctors taking wxSizerFlags
|
// common part of ctors taking wxSizerFlags
|
||||||
void Init(const wxSizerFlags& flags);
|
void Init(const wxSizerFlags& flags);
|
||||||
|
|
||||||
|
|
||||||
|
// discriminated union: depending on m_kind one of the fields is valid
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
Item_None,
|
Item_None,
|
||||||
@@ -322,7 +328,7 @@ WX_DECLARE_EXPORTED_LIST( wxSizerItem, wxSizerItemList );
|
|||||||
class WXDLLEXPORT wxSizer: public wxObject, public wxClientDataContainer
|
class WXDLLEXPORT wxSizer: public wxObject, public wxClientDataContainer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxSizer();
|
wxSizer() { }
|
||||||
~wxSizer();
|
~wxSizer();
|
||||||
|
|
||||||
// methods for adding elements to the sizer: there are Add/Insert/Prepend
|
// methods for adding elements to the sizer: there are Add/Insert/Prepend
|
||||||
@@ -486,18 +492,13 @@ public:
|
|||||||
// Recursively call wxWindow::Show () on all sizer items.
|
// Recursively call wxWindow::Show () on all sizer items.
|
||||||
virtual void ShowItems (bool show);
|
virtual void ShowItems (bool show);
|
||||||
|
|
||||||
void Show(bool show)
|
void Show(bool show) { ShowItems(show); }
|
||||||
{ m_isShown = show;
|
|
||||||
ShowItems(show);
|
|
||||||
}
|
|
||||||
bool IsShown() const { return m_isShown; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxSize m_size;
|
wxSize m_size;
|
||||||
wxSize m_minSize;
|
wxSize m_minSize;
|
||||||
wxPoint m_position;
|
wxPoint m_position;
|
||||||
wxSizerItemList m_children;
|
wxSizerItemList m_children;
|
||||||
bool m_isShown;
|
|
||||||
|
|
||||||
wxSize GetMaxWindowSize( wxWindow *window ) const;
|
wxSize GetMaxWindowSize( wxWindow *window ) const;
|
||||||
wxSize GetMinWindowSize( wxWindow *window );
|
wxSize GetMinWindowSize( wxWindow *window );
|
||||||
|
@@ -447,7 +447,20 @@ bool wxSizerItem::IsShown() const
|
|||||||
return m_window->IsShown();
|
return m_window->IsShown();
|
||||||
|
|
||||||
case Item_Sizer:
|
case Item_Sizer:
|
||||||
return m_sizer->IsShown();
|
// arbitrarily decide that if at least one of our elements is
|
||||||
|
// shown, so are we (this arbitrariness is the reason for
|
||||||
|
// deprecating this function)
|
||||||
|
{
|
||||||
|
for ( wxSizerItemList::compatibility_iterator
|
||||||
|
node = m_sizer->GetChildren().GetFirst();
|
||||||
|
node;
|
||||||
|
node = node->GetNext() )
|
||||||
|
{
|
||||||
|
if ( node->GetData()->IsShown() )
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
|
||||||
case Item_Spacer:
|
case Item_Spacer:
|
||||||
return m_spacer->IsShown();
|
return m_spacer->IsShown();
|
||||||
@@ -475,11 +488,6 @@ int wxSizerItem::GetOption() const
|
|||||||
// wxSizer
|
// wxSizer
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
wxSizer::wxSizer()
|
|
||||||
{
|
|
||||||
m_isShown = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxSizer::~wxSizer()
|
wxSizer::~wxSizer()
|
||||||
{
|
{
|
||||||
WX_CLEAR_LIST(wxSizerItemList, m_children);
|
WX_CLEAR_LIST(wxSizerItemList, m_children);
|
||||||
|
Reference in New Issue
Block a user