本文整理汇总了C++中wxAuiPaneInfo::IsToolbar方法的典型用法代码示例。如果您正苦于以下问题:C++ wxAuiPaneInfo::IsToolbar方法的具体用法?C++ wxAuiPaneInfo::IsToolbar怎么用?C++ wxAuiPaneInfo::IsToolbar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxAuiPaneInfo
的用法示例。
在下文中一共展示了wxAuiPaneInfo::IsToolbar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawBorder
void wxAuiDefaultDockArt::DrawBorder(wxDC& dc, wxWindow *WXUNUSED(window), const wxRect& _rect,
wxAuiPaneInfo& pane)
{
dc.SetPen(m_border_pen);
dc.SetBrush(*wxTRANSPARENT_BRUSH);
wxRect rect = _rect;
int i, border_width = GetMetric(wxAUI_DOCKART_PANE_BORDER_SIZE);
if (pane.IsToolbar())
{
for (i = 0; i < border_width; ++i)
{
dc.SetPen(*wxWHITE_PEN);
dc.DrawLine(rect.x, rect.y, rect.x+rect.width, rect.y);
dc.DrawLine(rect.x, rect.y, rect.x, rect.y+rect.height);
dc.SetPen(m_border_pen);
dc.DrawLine(rect.x, rect.y+rect.height-1,
rect.x+rect.width, rect.y+rect.height-1);
dc.DrawLine(rect.x+rect.width-1, rect.y,
rect.x+rect.width-1, rect.y+rect.height);
rect.Deflate(1);
}
}
else
{
for (i = 0; i < border_width; ++i)
{
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height);
rect.Deflate(1);
}
}
}
示例2: DrawBorder
void wxAuiDefaultDockArt::DrawBorder(wxDC& dc, wxWindow* window, const wxRect& _rect,
wxAuiPaneInfo& pane)
{
dc.SetPen(m_borderPen);
dc.SetBrush(*wxTRANSPARENT_BRUSH);
wxRect rect = _rect;
int i, border_width = GetMetric(wxAUI_DOCKART_PANE_BORDER_SIZE);
if (pane.IsToolbar())
{
for (i = 0; i < border_width; ++i)
{
dc.SetPen(*wxWHITE_PEN);
dc.DrawLine(rect.x, rect.y, rect.x+rect.width, rect.y);
dc.DrawLine(rect.x, rect.y, rect.x, rect.y+rect.height);
dc.SetPen(m_borderPen);
dc.DrawLine(rect.x, rect.y+rect.height-1,
rect.x+rect.width, rect.y+rect.height-1);
dc.DrawLine(rect.x+rect.width-1, rect.y,
rect.x+rect.width-1, rect.y+rect.height);
rect.Deflate(1);
}
}
else
{
// notebooks draw the border themselves, so they can use native rendering (e.g. tabartgtk)
wxAuiTabArt* art = 0;
wxAuiNotebook* nb = wxDynamicCast(window, wxAuiNotebook);
if (nb)
art = nb->GetArtProvider();
if (art)
art->DrawBorder(dc, window, rect);
else
{
for (i = 0; i < border_width; ++i)
{
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height);
rect.Deflate(1);
}
}
}
}