本文整理汇总了C++中wxAuiPaneInfo::HasGripperTop方法的典型用法代码示例。如果您正苦于以下问题:C++ wxAuiPaneInfo::HasGripperTop方法的具体用法?C++ wxAuiPaneInfo::HasGripperTop怎么用?C++ wxAuiPaneInfo::HasGripperTop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxAuiPaneInfo
的用法示例。
在下文中一共展示了wxAuiPaneInfo::HasGripperTop方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawGripper
void wxAuiDefaultDockArt::DrawGripper(wxDC& dc, wxWindow *WXUNUSED(window),
const wxRect& rect,
wxAuiPaneInfo& pane)
{
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetBrush(m_gripperBrush);
dc.DrawRectangle(rect.x, rect.y, rect.width,rect.height);
if (!pane.HasGripperTop())
{
int y = 5;
while (1)
{
dc.SetPen(m_gripperPen1);
dc.DrawPoint(rect.x+3, rect.y+y);
dc.SetPen(m_gripperPen2);
dc.DrawPoint(rect.x+3, rect.y+y+1);
dc.DrawPoint(rect.x+4, rect.y+y);
dc.SetPen(m_gripperPen3);
dc.DrawPoint(rect.x+5, rect.y+y+1);
dc.DrawPoint(rect.x+5, rect.y+y+2);
dc.DrawPoint(rect.x+4, rect.y+y+2);
y += 4;
if (y > rect.GetHeight()-5)
break;
}
}
else
{
int x = 5;
while (1)
{
dc.SetPen(m_gripperPen1);
dc.DrawPoint(rect.x+x, rect.y+3);
dc.SetPen(m_gripperPen2);
dc.DrawPoint(rect.x+x+1, rect.y+3);
dc.DrawPoint(rect.x+x, rect.y+4);
dc.SetPen(m_gripperPen3);
dc.DrawPoint(rect.x+x+1, rect.y+5);
dc.DrawPoint(rect.x+x+2, rect.y+5);
dc.DrawPoint(rect.x+x+2, rect.y+4);
x += 4;
if (x > rect.GetWidth()-5)
break;
}
}
}
示例2: SetPaneWindow
void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane)
{
m_pane_window = pane.window;
m_pane_window->Reparent(this);
wxAuiPaneInfo contained_pane = pane;
contained_pane.Dock().Center().Show().
CaptionVisible(false).
PaneBorder(false).
Layer(0).Row(0).Position(0);
// Carry over the minimum size
wxSize pane_min_size = pane.window->GetMinSize();
// if the frame window's max size is greater than the min size
// then set the max size to the min size as well
wxSize cur_max_size = GetMaxSize();
if (cur_max_size.IsFullySpecified() &&
(cur_max_size.x < pane.min_size.x ||
cur_max_size.y < pane.min_size.y)
)
{
SetMaxSize(pane_min_size);
}
SetMinSize(pane.window->GetMinSize());
m_mgr.AddPane(m_pane_window, contained_pane);
m_mgr.Update();
if (pane.min_size.IsFullySpecified())
{
// because SetSizeHints() calls Fit() too (which sets the window
// size to its minimum allowed), we keep the size before calling
// SetSizeHints() and reset it afterwards...
wxSize tmp = GetSize();
GetSizer()->SetSizeHints(this);
SetSize(tmp);
}
SetTitle(pane.caption);
if (pane.floating_size != wxDefaultSize)
{
SetSize(pane.floating_size);
}
else
{
wxSize size = pane.best_size;
if (size == wxDefaultSize)
size = pane.min_size;
if (size == wxDefaultSize)
size = m_pane_window->GetSize();
if (m_owner_mgr && pane.HasGripper())
{
if (pane.HasGripperTop())
size.y += m_owner_mgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE);
else
size.x += m_owner_mgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE);
}
SetClientSize(size);
}
if (pane.IsFixed())
{
SetWindowStyleFlag(GetWindowStyleFlag() & ~wxRESIZE_BORDER);
}
}
示例3: SetPaneWindow
void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane)
{
m_pane_window = pane.window;
m_pane_window->Reparent(this);
wxAuiPaneInfo contained_pane = pane;
contained_pane.Dock().Center().Show().
CaptionVisible(false).
PaneBorder(false).
Layer(0).Row(0).Position(0);
// Carry over the minimum size
wxSize pane_min_size = pane.window->GetMinSize();
// if the frame window's max size is greater than the min size
// then set the max size to the min size as well
wxSize cur_max_size = GetMaxSize();
if (cur_max_size.IsFullySpecified() &&
(cur_max_size.x < pane.min_size.x ||
cur_max_size.y < pane.min_size.y)
)
{
SetMaxSize(pane_min_size);
}
SetMinSize(pane.window->GetMinSize());
m_mgr.AddPane(m_pane_window, contained_pane);
m_mgr.Update();
if (pane.min_size.IsFullySpecified())
{
// because SetSizeHints() calls Fit() too (which sets the window
// size to its minimum allowed), we keep the size before calling
// SetSizeHints() and reset it afterwards...
wxSize tmp = GetSize();
GetSizer()->SetSizeHints(this);
SetSize(tmp);
}
SetTitle(pane.caption);
// This code is slightly awkward because we need to reset wxRESIZE_BORDER
// before calling SetClientSize() below as doing it after setting the
// client size would actually change it, at least under MSW, where the
// total window size doesn't change and hence, as the borders size changes,
// the client size does change.
//
// So we must call it first but doing it generates a size event and updates
// pane.floating_size from inside it so we must also record its original
// value before doing it.
const bool hasFloatingSize = pane.floating_size != wxDefaultSize;
if (pane.IsFixed())
{
SetWindowStyleFlag(GetWindowStyleFlag() & ~wxRESIZE_BORDER);
}
if ( hasFloatingSize )
{
SetSize(pane.floating_size);
}
else
{
wxSize size = pane.best_size;
if (size == wxDefaultSize)
size = pane.min_size;
if (size == wxDefaultSize)
size = m_pane_window->GetSize();
if (m_owner_mgr && pane.HasGripper())
{
if (pane.HasGripperTop())
size.y += m_owner_mgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE);
else
size.x += m_owner_mgr->m_art->GetMetric(wxAUI_DOCKART_GRIPPER_SIZE);
}
SetClientSize(size);
}
}