// Author: Robert Roebling and Robin Dunn
// Modified by: Ron Lee, Vadim Zeitlin (wxSizerFlags)
// Created:
-// RCS-ID: $Id$
// Copyright: (c) Robin Dunn, Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
wxSizerFlags& Border(int direction, int borderInPixels)
{
wxCHECK_MSG( !(direction & ~wxALL), *this,
- wxS("direction must be a combination of wxDirection enum "
- "values.") );
+ wxS("direction must be a combination of wxDirection ")
+ wxS("enum values.") );
m_flags &= ~wxALL;
m_flags |= direction;
void Show(bool show) { ShowItems(show); }
+ // This is the ShowItems() counterpart and returns true if any of the sizer
+ // items are shown.
+ virtual bool AreAnyItemsShown() const;
+
protected:
wxSize m_size;
wxSize m_minSize;
"Can't calculate number of cols if number of rows is not specified"
);
- return (m_children.GetCount() + m_rows - 1) / m_rows;
+ return int(m_children.GetCount() + m_rows - 1) / m_rows;
}
int CalcRows() const
"Can't calculate number of cols if number of rows is not specified"
);
- return (m_children.GetCount() + m_cols - 1) / m_cols;
+ return int(m_children.GetCount() + m_cols - 1) / m_cols;
}
private:
// override to hide/show the static box as well
virtual void ShowItems (bool show);
+ virtual bool AreAnyItemsShown() const;
virtual bool Detach( wxWindow *window );
virtual bool Detach( wxSizer *sizer ) { return wxBoxSizer::Detach(sizer); }