Toolbar updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -74,9 +74,11 @@ void wxBitmapRefData::Free()
|
||||
wxLogLastError("GpiDeleteBitmap(hbitmap)");
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pBitmapMask)
|
||||
{
|
||||
delete m_pBitmapMask;
|
||||
m_pBitmapMask = NULL;
|
||||
}
|
||||
} // end of wxBitmapRefData::Free
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -1390,7 +1390,7 @@ void wxDC::DoDrawBitmap(
|
||||
//
|
||||
// Need to get a background color for mask blitting
|
||||
//
|
||||
if (IsKindOf(CLASSINFO(wxPaintDC)))
|
||||
if (IsKindOf(CLASSINFO(wxWindowDC)))
|
||||
{
|
||||
wxWindowDC* pWindowDC = wxDynamicCast(this, wxWindowDC);
|
||||
|
||||
|
@@ -695,29 +695,13 @@ bool wxFrame::ShowFullScreen(
|
||||
// Checks if there is a toolbar, and returns the first free client position
|
||||
wxPoint wxFrame::GetClientAreaOrigin() const
|
||||
{
|
||||
wxPoint vPoint(0, 0);
|
||||
wxPoint vPoint = wxTopLevelWindow::GetClientAreaOrigin();
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
if (GetToolBar())
|
||||
{
|
||||
int nWidth;
|
||||
int nHeight;
|
||||
|
||||
GetToolBar()->GetSize( &nWidth
|
||||
,&nHeight
|
||||
);
|
||||
|
||||
if (GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL)
|
||||
{
|
||||
vPoint.x += nWidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
// PM is backwards from windows
|
||||
vPoint.y += nHeight;
|
||||
}
|
||||
}
|
||||
#endif //wxUSE_TOOLBAR
|
||||
//
|
||||
// In OS/2 the toolbar and statusbar are frame extensions so there is no
|
||||
// adjustment. The client is supposedly resized for a toolbar in OS/2
|
||||
// as it is for the status bar.
|
||||
//
|
||||
return vPoint;
|
||||
} // end of wxFrame::GetClientAreaOrigin
|
||||
|
||||
|
@@ -2592,6 +2592,8 @@ MRESULT wxWindowOS2::OS2WindowProc(
|
||||
{
|
||||
if (pFrame->GetStatusBar())
|
||||
pFrame->PositionStatusBar();
|
||||
if (pFrame->GetToolBar())
|
||||
pFrame->PositionToolBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4364,10 +4366,22 @@ int wxWindowOS2::GetOS2ParentHeight(
|
||||
IsKindOf(CLASSINFO(wxMenuBar)) ||
|
||||
IsKindOf(CLASSINFO(wxToolBar))
|
||||
)
|
||||
{
|
||||
if (IsKindOf(CLASSINFO(wxToolBar)))
|
||||
{
|
||||
wxFrame* pFrame = wxDynamicCast(GetParent(), wxFrame);
|
||||
|
||||
if (pFrame->GetToolBar() == this)
|
||||
return(pParent->GetSize().y);
|
||||
else
|
||||
return(pParent->GetClientSize().y);
|
||||
}
|
||||
else
|
||||
return(pParent->GetSize().y);
|
||||
}
|
||||
else
|
||||
return(pParent->GetClientSize().y);
|
||||
}
|
||||
//
|
||||
// Case -- this is for any window that is the sole child of a Frame.
|
||||
// The grandparent must exist and it must be of type CFrame
|
||||
|
Reference in New Issue
Block a user