本文整理汇总了C++中Relayout函数的典型用法代码示例。如果您正苦于以下问题:C++ Relayout函数的具体用法?C++ Relayout怎么用?C++ Relayout使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Relayout函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetClientRect
int CPlayerColorControlBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if(__super::OnCreate(lpCreateStruct) == -1)
return -1;
CRect r;
GetClientRect(r);
GetSystemFontWithScale(&m_font);
csBrightLabel.Create( ResStr(IDS_COLOR_CONTROL_LABEL_BRIGHT),WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE ,
r, this, IDC_STATIC);
csBrightLabel.SetFont(&m_font);
csConstLabel.Create( ResStr(IDS_COLOR_CONTROL_LABEL_CONSTANT), WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE,
r, this, IDC_STATIC);
csConstLabel.SetFont(&m_font);
csl_bright.Create( WS_CHILD|WS_VISIBLE|TBS_AUTOTICKS|TBS_HORZ|TBS_NOTICKS , r, this, IDC_SLIDER1);
csl_const.Create( WS_CHILD|WS_VISIBLE|TBS_AUTOTICKS|TBS_HORZ|TBS_NOTICKS , r, this, IDC_SLIDER2);
cb_reset.Create( ResStr(IDS_COLOR_CONTROL_BUTTON_RESET), WS_VISIBLE|WS_CHILD|BS_FLAT|BS_VCENTER|BS_CENTER, r , this, IDC_BUTTONRESETCOLORCONTROL);
cb_reset.SetFont(&m_font);
//cb_enablectrl.Create( ResStr(IDS_COLOR_CONTROL_BUTTON_ENABLE), WS_VISIBLE|WS_CHILD|BS_FLAT|BS_VCENTER|BS_CENTER, r , this, IDC_BUTTONENABLECOLORCONTROL);
//cb_enablectrl.SetFont(&m_font);
Relayout();
CheckAbility();
return 0;
}
示例2: Relayout
void CPlayerInfoBar::RemoveAllLines()
{
m_label.RemoveAll();
m_info.RemoveAll();
Relayout();
}
示例3: RemoveLine
void CPlayerInfoBar::SetLine(CString label, CString info)
{
info.Trim();
if (info.IsEmpty()) {
RemoveLine(label);
return;
}
for (size_t idx = 0; idx < m_label.GetCount(); idx++) {
CString tmp;
m_label[idx]->GetWindowText(tmp);
if (label == tmp) {
m_info[idx]->GetWindowText(tmp);
if (info != tmp) {
m_info[idx]->SetWindowText(info);
m_tooltip.UpdateTipText(info, m_info[idx]);
}
return;
}
}
CAutoPtr<CStatusLabel> l(DEBUG_NEW CStatusLabel(true, false));
l->Create(label, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | SS_OWNERDRAW, CRect(0, 0, 0, 0), this);
m_label.Add(l);
CAutoPtr<CStatusLabel> i(DEBUG_NEW CStatusLabel(false, true));
i->Create(info, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | SS_OWNERDRAW | SS_NOTIFY, CRect(0, 0, 0, 0), this);
m_tooltip.AddTool(i, info);
m_info.Add(i);
Relayout();
}
示例4: Invalidate
void CPlayerStatusBar::OnSize(UINT nType, int cx, int cy)
{
CDialogBar::OnSize(nType, cx, cy);
Invalidate();
Relayout();
}
示例5: MoveTo
void
BAbstractSpinner::_UpdateFrame()
{
if (fLayoutData->label_layout_item == NULL
|| fLayoutData->text_view_layout_item == NULL) {
return;
}
BRect labelFrame = fLayoutData->label_layout_item->Frame();
BRect textViewFrame = fLayoutData->text_view_layout_item->Frame();
if (!labelFrame.IsValid() || !textViewFrame.IsValid())
return;
// update divider
fDivider = textViewFrame.left - labelFrame.left;
BRect frame = textViewFrame | labelFrame;
MoveTo(frame.left, frame.top);
BSize oldSize = Bounds().Size();
ResizeTo(frame.Width(), frame.Height());
BSize newSize = Bounds().Size();
// If the size changes, ResizeTo() will trigger a relayout, otherwise
// we need to do that explicitly.
if (newSize != oldSize)
Relayout();
}
示例6: floorf
void
BMenuField::SetDivider(float divider)
{
divider = floorf(divider + 0.5);
float dx = fDivider - divider;
if (dx == 0.0f)
return;
fDivider = divider;
if (Flags() & B_SUPPORTS_LAYOUT) {
// We should never get here, since layout support means, we also
// layout the divider, and don't use this method at all.
Relayout();
} else {
BRect dirty(fMenuBar->Frame());
fMenuBar->MoveTo(_MenuBarOffset(), kVMargin);
if (fFixedSizeMB)
fMenuBar->ResizeTo(_MenuBarWidth(), dirty.Height());
dirty = dirty | fMenuBar->Frame();
dirty.InsetBy(-kVMargin, -kVMargin);
Invalidate(dirty);
}
}
示例7: CALLED
void
BMenuField::_UpdateFrame()
{
CALLED();
if (fLayoutData->label_layout_item && fLayoutData->menu_bar_layout_item) {
BRect labelFrame = fLayoutData->label_layout_item->Frame();
BRect menuFrame = fLayoutData->menu_bar_layout_item->Frame();
// update divider
fDivider = menuFrame.left - labelFrame.left;
// update our frame
MoveTo(labelFrame.left, labelFrame.top);
BSize oldSize = Bounds().Size();
ResizeTo(menuFrame.left + menuFrame.Width() - labelFrame.left,
menuFrame.top + menuFrame.Height() - labelFrame.top);
BSize newSize = Bounds().Size();
// If the size changes, ResizeTo() will trigger a relayout, otherwise
// we need to do that explicitly.
if (newSize != oldSize)
Relayout();
}
}
示例8: SASSERT
int SSplitWnd::InsertItem(SSplitPane* pane, int index /*= -1 */)
{
//禁止重复插入
if (ArrayFind(m_lstPane,pane)!=-1)
{
SASSERT(FALSE);
return -1;
}
if(index <0 )
{
index = (int)m_lstPane.GetCount();
}
m_lstPane.InsertAt(index, pane);
m_lstPriority.Add(pane);
SortPriorityList(m_lstPriority);
CRect rcContainer;
GetClientRect(&rcContainer);
if (!rcContainer.IsRectEmpty())
{
PANESIZELIST lstPaneSize;
FatchPaneSizeInfo(m_lstPriority, lstPaneSize);
const int index = ArrayFind(m_lstPriority,pane);
lstPaneSize[index].actural = lstPaneSize[index].preferred;
Relayout(rcContainer, lstPaneSize);
}
return index;
}
示例9: Relayout
BOOL SSplitWnd::HidePane(UINT iPane)
{
if (iPane < 0 || iPane >= m_lstPane.GetCount()) return FALSE;
m_lstPane[iPane]->SetVisible(FALSE);
Relayout(GetClientRect());
return TRUE;
}
示例10: Relayout
void
BSplitView::MouseUp(BPoint where)
{
if (fSplitLayout->StopDraggingSplitter()) {
Relayout();
Invalidate();
}
}
示例11: Relayout
HRESULT CXStackPanel::SetStackType( EStackPanelType eType )
{
if(m_eStackType != eType)
{
m_eStackType = eType;
Relayout();
}
return S_OK;
}
示例12: Relayout
BOOL CDuiSplitWnd::ShowPanel(int iPane)
{
if (iPane < 0 || iPane >= m_arrPane.GetCount()) return FALSE;
m_arrPane[iPane]->SetVisible(TRUE);
Relayout(m_bColMode?layout_vert:layout_horz);
NotifyInvalidate();
return TRUE;
}
示例13: Relayout
void OpGroup::OnShow(BOOL show)
{
// If a group is being shown call a re-layout.
// This is to make sure that controls that are hidden and shown like in
// tabbed dialogs actually get a relayout and show themselves since
// invisible controls are normally skipped
if (show)
Relayout();
}
示例14: Relayout
void
SplitView::SetProportionalMode(bool proportional)
{
if (fProportional == proportional)
return;
fProportional = proportional;
Relayout();
}
示例15: SetStatusBitmap
void CPlayerStatusBar::Clear()
{
m_status.SetWindowText(_T(""));
m_time.SetWindowText(_T(""));
SetStatusBitmap(0);
SetStatusTypeIcon(0);
Relayout();
}