added wxStaticLine and wxStaticBitmap

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-08-25 17:46:17 +00:00
parent a360b8503e
commit 325443b96b
19 changed files with 612 additions and 106 deletions

View File

@@ -222,12 +222,28 @@ void wxControlRenderer::DrawButtonBorder()
m_renderer->DrawBackground(m_dc, m_rect, flags);
}
void wxControlRenderer::DrawBitmap(const wxBitmap& bitmap)
{
int style = m_ctrl->GetWindowStyle();
DoDrawBitmap(bitmap,
style & wxALIGN_MASK,
style & wxBI_EXPAND ? wxEXPAND : wxSTRETCH_NOT);
}
void wxControlRenderer::DrawBackgroundBitmap()
{
// get the bitmap and the flags
int alignment;
wxStretch stretch;
wxBitmap bmp = m_ctrl->GetBackgroundBitmap(&alignment, &stretch);
DoDrawBitmap(bmp, alignment, stretch);
}
void wxControlRenderer::DoDrawBitmap(const wxBitmap& bmp,
int alignment,
wxStretch stretch)
{
if ( !bmp.Ok() )
return;
@@ -282,7 +298,7 @@ void wxControlRenderer::DrawBackgroundBitmap()
}
// do draw it
m_dc.DrawBitmap(bmp, x, y);
m_dc.DrawBitmap(bmp, x, y, TRUE /* use mask */);
}
void wxControlRenderer::DrawScrollbar(const wxScrollBar *scrollbar)
@@ -316,3 +332,14 @@ void wxControlRenderer::DrawScrollbar(const wxScrollBar *scrollbar)
thumbStart, thumbEnd, m_rect,
flags);
}
void wxControlRenderer::DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
{
wxASSERT_MSG( x1 == x2 || y1 == y2,
_T("line must be either horizontal or vertical") );
if ( x1 == x2 )
m_renderer->DrawVerticalLine(m_dc, x1, y1, y2);
else // horizontal
m_renderer->DrawHorizontalLine(m_dc, y1, x1, x2);
}