本文整理汇总了C++中wxAuiPaneInfo::HasMaximizeButton方法的典型用法代码示例。如果您正苦于以下问题:C++ wxAuiPaneInfo::HasMaximizeButton方法的具体用法?C++ wxAuiPaneInfo::HasMaximizeButton怎么用?C++ wxAuiPaneInfo::HasMaximizeButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxAuiPaneInfo
的用法示例。
在下文中一共展示了wxAuiPaneInfo::HasMaximizeButton方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wxAuiFloatingFrameBaseClass
wxAuiFloatingFrame::wxAuiFloatingFrame(wxWindow* parent,
wxAuiManager* owner_mgr,
const wxAuiPaneInfo& pane,
wxWindowID id /*= wxID_ANY*/,
long style /*=wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT |
wxCLIP_CHILDREN
*/)
: wxAuiFloatingFrameBaseClass(parent, id, wxEmptyString,
pane.floating_pos, pane.floating_size,
style |
(pane.HasCloseButton()?wxCLOSE_BOX:0) |
(pane.HasMaximizeButton()?wxMAXIMIZE_BOX:0) |
(pane.IsFixed()?0:wxRESIZE_BORDER)
)
{
m_owner_mgr = owner_mgr;
m_moving = false;
m_mgr.SetManagedWindow(this);
m_solid_drag = true;
// find out if the system supports solid window drag.
// on non-msw systems, this is assumed to be the case
#ifdef __WXMSW__
BOOL b = TRUE;
SystemParametersInfo(38 /*SPI_GETDRAGFULLWINDOWS*/, 0, &b, 0);
m_solid_drag = b ? true : false;
#endif
SetExtraStyle(wxWS_EX_PROCESS_IDLE);
}
示例2: DrawCaption
void wxAuiDefaultDockArt::DrawCaption(wxDC& dc, wxWindow *WXUNUSED(window),
const wxString& text,
const wxRect& rect,
wxAuiPaneInfo& pane)
{
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetFont(m_captionFont);
DrawCaptionBackground(dc, rect,
(pane.state & wxAuiPaneInfo::optionActive)?true:false);
int caption_offset = 0;
if ( pane.icon.IsOk() )
{
DrawIcon(dc, rect, pane);
caption_offset += pane.icon.GetWidth() + 3;
}
if (pane.state & wxAuiPaneInfo::optionActive)
dc.SetTextForeground(m_activeCaptionTextColour);
else
dc.SetTextForeground(m_inactiveCaptionTextColour);
wxCoord w,h;
dc.GetTextExtent(wxT("ABCDEFHXfgkj"), &w, &h);
wxRect clip_rect = rect;
clip_rect.width -= 3; // text offset
clip_rect.width -= 2; // button padding
if (pane.HasCloseButton())
clip_rect.width -= m_buttonSize;
if (pane.HasPinButton())
clip_rect.width -= m_buttonSize;
if (pane.HasMaximizeButton())
clip_rect.width -= m_buttonSize;
wxString draw_text = wxAuiChopText(dc, text, clip_rect.width);
dc.SetClippingRegion(clip_rect);
dc.DrawText(draw_text, rect.x+3 + caption_offset, rect.y+(rect.height/2)-(h/2)-1);
dc.DestroyClippingRegion();
}
示例3: tmpRect
void
clAuiDockArt::DrawCaption(wxDC& dc, wxWindow* window, const wxString& text, const wxRect& rect, wxAuiPaneInfo& pane)
{
wxRect tmpRect(wxPoint(0, 0), rect.GetSize());
// Hackishly prevent assertions on linux
if(tmpRect.GetHeight() == 0) tmpRect.SetHeight(1);
if(tmpRect.GetWidth() == 0) tmpRect.SetWidth(1);
#ifdef __WXOSX__
tmpRect = rect;
window->PrepareDC(dc);
// Prepare the colours
wxColour bgColour, penColour, textColour;
textColour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
bgColour = DrawingUtils::DarkColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE), 2.0);
; // Same as the notebook background colour
penColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW);
penColour = bgColour;
wxFont f = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
dc.SetFont(f);
dc.SetPen(penColour);
dc.SetBrush(bgColour);
dc.DrawRectangle(tmpRect);
// Fill the caption to look like OSX caption
wxColour topColour("#d3d2d3");
wxColour bottomColour("#e8e8e8");
dc.GradientFillLinear(tmpRect, topColour, bottomColour, wxNORTH);
dc.SetPen(penColour);
dc.SetBrush(*wxTRANSPARENT_BRUSH);
dc.DrawRectangle(tmpRect);
int caption_offset = 0;
if(pane.icon.IsOk()) {
DrawIcon(dc, tmpRect, pane);
caption_offset += pane.icon.GetWidth() + 3;
} else {
caption_offset = 3;
}
dc.SetTextForeground(textColour);
wxCoord w, h;
dc.GetTextExtent(wxT("ABCDEFHXfgkj"), &w, &h);
wxRect clip_rect = tmpRect;
clip_rect.width -= 3; // text offset
clip_rect.width -= 2; // button padding
if(pane.HasCloseButton()) clip_rect.width -= m_buttonSize;
if(pane.HasPinButton()) clip_rect.width -= m_buttonSize;
if(pane.HasMaximizeButton()) clip_rect.width -= m_buttonSize;
wxString draw_text = wxAuiChopText(dc, text, clip_rect.width);
wxSize textSize = dc.GetTextExtent(draw_text);
dc.SetTextForeground(textColour);
dc.DrawText(draw_text, tmpRect.x + 3 + caption_offset, tmpRect.y + ((tmpRect.height - textSize.y) / 2));
#else
wxBitmap bmp(tmpRect.GetSize());
{
wxMemoryDC memDc;
memDc.SelectObject(bmp);
wxGCDC gdc;
wxDC* pDC = NULL;
if(!DrawingUtils::GetGCDC(memDc, gdc)) {
pDC = &memDc;
} else {
pDC = &gdc;
}
// Prepare the colours
wxColour bgColour, penColour, textColour;
textColour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
bgColour = DrawingUtils::DarkColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE), 2.0);
; // Same as the notebook background colour
penColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW);
penColour = bgColour;
wxFont f = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
pDC->SetFont(f);
pDC->SetPen(penColour);
pDC->SetBrush(bgColour);
pDC->DrawRectangle(tmpRect);
pDC->SetPen(penColour);
pDC->SetBrush(*wxTRANSPARENT_BRUSH);
pDC->DrawRectangle(tmpRect);
int caption_offset = 0;
if(pane.icon.IsOk()) {
DrawIcon(gdc, tmpRect, pane);
caption_offset += pane.icon.GetWidth() + 3;
} else {
caption_offset = 3;
}
pDC->SetTextForeground(textColour);
wxCoord w, h;
pDC->GetTextExtent(wxT("ABCDEFHXfgkj"), &w, &h);
//.........这里部分代码省略.........
示例4: DrawCaption
void SAuiDockArt::DrawCaption(wxDC& dc,
wxWindow *window,
const wxString& text,
const wxRect& rect,
wxAuiPaneInfo& pane)
{
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetFont(m_captionFont);
dc.SetBrush(wxBrush(captionBackColour));
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height);
//dc.SetPen(m_borderPen);
//dc.SetBrush(wxBrush(Drawing::darkColour(captionBackColour, 2.0f)));
//dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height);
wxColor sepCol;
int l = rgba_t(captionBackColour.Red(), captionBackColour.Green(), captionBackColour.Blue()).greyscale().r;
if (l < 100)
sepCol = Drawing::lightColour(captionBackColour, 2.0f);
else
sepCol = Drawing::darkColour(captionBackColour, 2.0f);
//dc.SetPen(wxPen(sepCol));
//dc.DrawLine(rect.x, rect.y + rect.height - 1, rect.x + rect.width, rect.y + rect.height - 1);
dc.SetBrush(wxBrush(sepCol));
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height + 1);
int caption_offset = 0;
if (pane.icon.IsOk())
{
DrawIcon(dc, rect, pane);
caption_offset += pane.icon.GetWidth() + 3;
}
dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
wxRect clip_rect = rect;
clip_rect.width -= 3; // text offset
clip_rect.width -= 2; // button padding
if (pane.HasCloseButton())
clip_rect.width -= m_buttonSize;
if (pane.HasPinButton())
clip_rect.width -= m_buttonSize;
if (pane.HasMaximizeButton())
clip_rect.width -= m_buttonSize;
wxString draw_text = wxAuiChopText(dc, text, clip_rect.width);
wxCoord w, h;
dc.GetTextExtent(draw_text, &w, &h);
dc.SetClippingRegion(clip_rect);
#ifdef __WXMSW__
dc.DrawText(draw_text, rect.x + 5 + caption_offset, rect.y + (rect.height / 2) - (h / 2));
#else
dc.DrawText(draw_text, rect.x + 5 + caption_offset, rect.y + (rect.height / 2) - (h / 2) + 1);
#endif
//dc.SetPen(wxPen(captionAccentColour));
//dc.DrawLine(rect.x + w + 8, rect.y + (rect.height / 2) - 1, rect.x + rect.width - 16, rect.y + (rect.height / 2) - 1);
//dc.DrawLine(rect.x + w + 8, rect.y + (rect.height / 2) + 1, rect.x + rect.width - 16, rect.y + (rect.height / 2) + 1);
dc.DestroyClippingRegion();
}
示例5: DrawCaption
void clAuiDockArt::DrawCaption(wxDC& dc, wxWindow* window, const wxString& text, const wxRect& rect, wxAuiPaneInfo& pane)
{
wxRect tmpRect(wxPoint(0, 0), rect.GetSize());
// Hackishly prevent assertions on linux
if (tmpRect.GetHeight() == 0)
tmpRect.SetHeight(1);
if (tmpRect.GetWidth() == 0)
tmpRect.SetWidth(1);
wxBitmap bmp(tmpRect.GetSize());
wxMemoryDC memDc;
memDc.SelectObject(bmp);
memDc.SetPen(*wxTRANSPARENT_PEN);
memDc.SetFont(m_captionFont);
// Prepare the colours
bool is_dark_theme = DrawingUtils::IsThemeDark();
wxColour bgColour, penColour, textColour;
if ( is_dark_theme ) {
bgColour = wxColour(EditorConfigST::Get()->GetCurrentOutputviewBgColour());
penColour = DrawingUtils::DarkColour(bgColour, 5.0);
textColour = *wxWHITE;
} else {
// Use the settings provided by a plugin
// Allow the plugins to override the border colour
wxColour originalPenColour = penColour;
clColourEvent borderColourEvent( wxEVT_GET_TAB_BORDER_COLOUR );
if ( EventNotifier::Get()->ProcessEvent( borderColourEvent ) ) {
bgColour = borderColourEvent.GetBorderColour();
penColour = DrawingUtils::DarkColour(bgColour, 3.0);
if ( DrawingUtils::IsDark(bgColour) ) {
textColour = *wxWHITE;
} else {
textColour = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT);
}
} else {
bgColour = DrawingUtils::DarkColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE), 2.0);
penColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW);
textColour = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT);
}
}
memDc.SetPen( penColour );
memDc.SetBrush( bgColour );
memDc.DrawRectangle( tmpRect );
wxPoint bottomLeft, bottomRight;
bottomLeft = tmpRect.GetBottomLeft();
bottomRight = tmpRect.GetBottomRight();
bottomRight.x += 1;
memDc.SetPen( bgColour );
memDc.DrawLine(bottomLeft, bottomRight);
memDc.SetPen( penColour );
bottomLeft.y--;
bottomRight.y--;
memDc.DrawLine(bottomLeft, bottomRight);
int caption_offset = 0;
if ( pane.icon.IsOk() ) {
DrawIcon(memDc, tmpRect, pane);
caption_offset += pane.icon.GetWidth() + 3;
} else {
caption_offset = 3;
}
memDc.SetTextForeground( textColour );
wxCoord w,h;
memDc.GetTextExtent(wxT("ABCDEFHXfgkj"), &w, &h);
wxRect clip_rect = tmpRect;
clip_rect.width -= 3; // text offset
clip_rect.width -= 2; // button padding
if (pane.HasCloseButton())
clip_rect.width -= m_buttonSize;
if (pane.HasPinButton())
clip_rect.width -= m_buttonSize;
if (pane.HasMaximizeButton())
clip_rect.width -= m_buttonSize;
wxString draw_text = wxAuiChopText(memDc, text, clip_rect.width);
wxSize textSize = memDc.GetTextExtent(draw_text);
memDc.DrawText(draw_text, tmpRect.x+3 + caption_offset, tmpRect.y+((tmpRect.height - textSize.y)/2));
memDc.SelectObject(wxNullBitmap);
dc.DrawBitmap( bmp, rect.x, rect.y, true );
}