本文整理汇总了C++中wxAuiPaneInfo::IsMaximized方法的典型用法代码示例。如果您正苦于以下问题:C++ wxAuiPaneInfo::IsMaximized方法的具体用法?C++ wxAuiPaneInfo::IsMaximized怎么用?C++ wxAuiPaneInfo::IsMaximized使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxAuiPaneInfo
的用法示例。
在下文中一共展示了wxAuiPaneInfo::IsMaximized方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawPaneButton
void clAuiDockArt::DrawPaneButton(
wxDC& dc, wxWindow* window, int button, int button_state, const wxRect& _rect, wxAuiPaneInfo& pane)
{
int xx = _rect.GetTopLeft().x + ((_rect.GetWidth() - AUI_BUTTON_SIZE) / 2);
int yy = _rect.GetTopLeft().y + ((_rect.GetHeight() - AUI_BUTTON_SIZE) / 2);
switch(button) {
case wxAUI_BUTTON_CLOSE:
dc.DrawBitmap(m_dockCloseBmp, xx, yy);
break;
case wxAUI_BUTTON_MAXIMIZE_RESTORE:
if(pane.IsMaximized()) {
dc.DrawBitmap(m_dockMinimizeBmp, xx, yy);
} else {
dc.DrawBitmap(m_dockExpandeBmp, xx, yy);
}
break;
case wxAUI_BUTTON_PIN:
dc.DrawBitmap(m_dockMoreBmp, xx, yy);
break;
default:
wxAuiDefaultDockArt::DrawPaneButton(dc, window, button, button_state, _rect, pane);
break;
}
}
示例2: DrawPaneButton
void wxAuiDefaultDockArt::DrawPaneButton(wxDC& dc, wxWindow *WXUNUSED(window),
int button,
int button_state,
const wxRect& _rect,
wxAuiPaneInfo& pane)
{
wxBitmap bmp;
switch (button)
{
default:
case wxAUI_BUTTON_CLOSE:
if (pane.state & wxAuiPaneInfo::optionActive)
bmp = m_activeCloseBitmap;
else
bmp = m_inactiveCloseBitmap;
break;
case wxAUI_BUTTON_PIN:
if (pane.state & wxAuiPaneInfo::optionActive)
bmp = m_activePinBitmap;
else
bmp = m_inactivePinBitmap;
break;
case wxAUI_BUTTON_MAXIMIZE_RESTORE:
if (pane.IsMaximized())
{
if (pane.state & wxAuiPaneInfo::optionActive)
bmp = m_activeRestoreBitmap;
else
bmp = m_inactiveRestoreBitmap;
}
else
{
if (pane.state & wxAuiPaneInfo::optionActive)
bmp = m_activeMaximizeBitmap;
else
bmp = m_inactiveMaximizeBitmap;
}
break;
}
wxRect rect = _rect;
int old_y = rect.y;
rect.y = rect.y + (rect.height/2) - (bmp.GetHeight()/2);
rect.height = old_y + rect.height - rect.y - 1;
if (button_state == wxAUI_BUTTON_STATE_PRESSED)
{
rect.x++;
rect.y++;
}
if (button_state == wxAUI_BUTTON_STATE_HOVER ||
button_state == wxAUI_BUTTON_STATE_PRESSED)
{
if (pane.state & wxAuiPaneInfo::optionActive)
{
dc.SetBrush(wxBrush(m_activeCaptionColour.ChangeLightness(120)));
dc.SetPen(wxPen(m_activeCaptionColour.ChangeLightness(70)));
}
else
{
dc.SetBrush(wxBrush(m_inactiveCaptionColour.ChangeLightness(120)));
dc.SetPen(wxPen(m_inactiveCaptionColour.ChangeLightness(70)));
}
// draw the background behind the button
dc.DrawRectangle(rect.x, rect.y, 15, 15);
}
// draw the button itself
dc.DrawBitmap(bmp, rect.x, rect.y, true);
}