本文整理汇总了C++中DockableCtrl::GetLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ DockableCtrl::GetLabel方法的具体用法?C++ DockableCtrl::GetLabel怎么用?C++ DockableCtrl::GetLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DockableCtrl
的用法示例。
在下文中一共展示了DockableCtrl::GetLabel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddWidgettoGroup
bool DockBase::AddWidgettoGroup(String name, DockableCtrl& ctrl)
{
CtrlRecord* record = GetCtrlRecord(ctrl);
if(!record || name == t_("Default")) return false;
NewWidgetGroup(name);
Vector<int>& ids = groups.Get(name);
for(int i = 0; i < ids.GetCount(); i++)
if(ids[i] == record->id)
{
Exclamation(Format(t_("Error: Widget (%s) is already in the group '%s'"), ctrl.GetLabel(), name));
return false;
}
ids.Add(record->id);
grouptab.grouptree.Add(grouptab.grouptree.Find(name), ctrl.GetIcon(), Value(record->id), Value(ctrl.GetLabel()));
return true;
}
示例2: NewWidgetGroup
void DockBase::NewWidgetGroup(String name, bool predefined)
{
predefined = true;
TreeCtrl& tree = grouptab.grouptree;
Vector<int> ids;
ids.Clear();
int group = groups.FindAdd(name, ids);
if(tree.Find(name) < 0) tree.Add(0, DockCtrlImages::DefaultImage(), Value(name));
if(name != t_("Default")) return;
for(int i = 0; i < ctrls.GetCount(); i++)
{
DockableCtrl * ctrl = ctrls[i]->ctrl;
int id = ctrls[i]->id;
ids.Add(ctrls[i]->id);
tree.Add(tree.Find(name), ctrl->GetIcon(), Value(id), Value(ctrl->GetLabel()));
}
groups[group] = ids;
}
示例3: RefreshPanel
void DockBase::RefreshPanel()
{
if(!controlpanel.IsOpen() || !controlpanel.IsVisible()) return;
listtab.list.Clear();
for(int i = 0; i < GetCtrlRecords().GetCount(); i++)
{
int alignment = 0;
bool tabbed = false;
bool floating = false;
DockableCtrl* ctrl = GetCtrlRecordFromIndex(i)->ctrl;
if(ctrl->IsTabbed())
{
TabWindow* tabwindow = dynamic_cast<DockWindow*>(ctrl)->GetOwnerTab();
if(tabwindow)
{
alignment = tabwindow->GetBaseTab()->Alignment();
floating = tabwindow->GetBaseTab()->IsAutoHidden();
tabbed = true;
}
}
else alignment = ctrl->Alignment();
String a, s;
switch(alignment)
{
case DockableCtrl::DOCK_LEFT:
a = t_("LEFT");
break;
case DockableCtrl::DOCK_TOP:
a = t_("TOP");
break;
case DockableCtrl::DOCK_RIGHT:
a = t_("RIGHT");
break;
case DockableCtrl::DOCK_BOTTOM:
a = t_("BOTTOM");
break;
case DockableCtrl::DOCK_NONE:
if(ctrl->IsFloating() || tabbed)
a = t_("FLOATING");
else
a = t_("NONE");
break;
}
switch(ctrl->State())
{
case DockableCtrl::STATE_SHOW:
s = t_("SHOWN");
break;
case DockableCtrl::STATE_HIDE:
s = t_("HIDDEN");
break;
case DockableCtrl::STATE_AUTO:
s = t_("AUTO HIDDEN");
break;
case DockableCtrl::STATE_SHUT:
s = t_("SHUT");
break;
case DockableCtrl::STATE_TABBED:
floating ?
s = t_("AUTO HIDDEN")
:
s = t_("TABBED");
break;
}
listtab.list.Add(0, Format("%s",ctrl->GetLabel()), a, s, ctrl->Position());
listtab.list.SetCtrl(i, 0, (panelicons.At(i))->SetImage(ctrl->GetIcon().IsNullInstance() ?
DockCtrlImages::DefaultImage : ctrl->GetIcon()));
}
controlpanel.Refresh();
}