fixed client area handling for wxFrame/Univ
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -49,6 +49,9 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
|
|
||||||
|
virtual void DoGetClientSize(int *width, int *height) const;
|
||||||
|
virtual void DoSetClientSize(int width, int height);
|
||||||
|
|
||||||
#if wxUSE_MENUS
|
#if wxUSE_MENUS
|
||||||
// override to update menu bar position when the frame size changes
|
// override to update menu bar position when the frame size changes
|
||||||
virtual void PositionMenuBar();
|
virtual void PositionMenuBar();
|
||||||
|
@@ -103,6 +103,28 @@ wxPoint wxFrame::GetClientAreaOrigin() const
|
|||||||
return pt;
|
return pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxFrame::DoGetClientSize(int *width, int *height) const
|
||||||
|
{
|
||||||
|
wxFrameBase::DoGetClientSize(width, height);
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
if ( m_frameMenuBar && height )
|
||||||
|
{
|
||||||
|
(*height) -= m_frameMenuBar->GetSize().y;
|
||||||
|
}
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxFrame::DoSetClientSize(int width, int height)
|
||||||
|
{
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
if ( m_frameMenuBar )
|
||||||
|
{
|
||||||
|
height += m_frameMenuBar->GetSize().y;
|
||||||
|
}
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
wxFrameBase::DoSetClientSize(width, height);
|
||||||
|
}
|
||||||
|
|
||||||
bool wxFrame::Enable(bool enable)
|
bool wxFrame::Enable(bool enable)
|
||||||
{
|
{
|
||||||
if (!wxFrameBase::Enable(enable))
|
if (!wxFrameBase::Enable(enable))
|
||||||
|
Reference in New Issue
Block a user