本文整理汇总了C++中DockableCtrl::GetTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ DockableCtrl::GetTitle方法的具体用法?C++ DockableCtrl::GetTitle怎么用?C++ DockableCtrl::GetTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DockableCtrl
的用法示例。
在下文中一共展示了DockableCtrl::GetTitle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ComposeTab
void AutoHideBar::ComposeTab(Tab& tab, const Font &font, Color ink, int style)
{
DockableCtrl *d;
WString txt;
const Value &q = tab.value;
ink = (style == CTRL_DISABLED) ? SColorDisabled : ink;
if (IsTypeRaw<DockCont *>(q)) {
DockCont *c = ValueTo<DockCont *>(q);
d = &c->GetCurrent();
txt = c->GetTitle();
}
else {
ASSERT(IsTypeRaw<DockableCtrl *>(q));
d = ValueTo<DockableCtrl *>(q);
txt = d->GetTitle();
}
if(icons)
{
tab.AddImage((style == CTRL_DISABLED) ? DisabledImage(d->GetIcon()) : d->GetIcon());
}
if (showtext)
{
tab.AddText(txt, font, ink);
}
}
示例2: TabSelected
void DockCont::TabSelected()
{
int ix = tabbar.GetCursor();
if (ix >= 0) {
DockableCtrl *dc = Get0(ix);
if (!dc) return;
Ctrl *ctrl = GetCtrl(ix);
Ctrl *first = &handle;
for (Ctrl *c = first->GetNext(); c; c = c->GetNext())
if (c != ctrl) c->Hide();
ctrl->Show();
Icon(dc->GetIcon()).Title(dc->GetTitle());
handle.dc = dc;
SyncButtons(*dc);
if (IsTabbed()) {
DockCont *c = static_cast<DockCont *>(GetParent());
c->tabbar.SyncRepos();
c->TabSelected();
c->RefreshFrame();
}
else
RefreshLayout();
}
}
示例3: GetStdSize
Size DockTabBar::GetStdSize(const Tab &t)
{
DockableCtrl *d;
const Value &q = t.key;
Value v;
if (IsTypeRaw<DockCont *>(q)) {
DockCont *c = ValueTo<DockCont *>(q);
d = &c->GetCurrent();
v = c->GetTitle();
}
else {
ASSERT(IsTypeRaw<DockableCtrl *>(q));
d = ValueTo<DockableCtrl *>(q);
v = d->GetTitle();
}
int isz = (IsVert() ? d->GetIcon().GetHeight() : d->GetIcon().GetWidth());
return showtext ? (TabBar::GetStdSize(v) + Size(isz+2, 0)) : Size(isz, isz);
}