本文整理汇总了C++中ObjectStack::GetCount方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectStack::GetCount方法的具体用法?C++ ObjectStack::GetCount怎么用?C++ ObjectStack::GetCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectStack
的用法示例。
在下文中一共展示了ObjectStack::GetCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Apply
TRef<IObject> Apply(ObjectStack& stack)
{
TRef<StringValue> pstring; CastTo(pstring, (IObject*)stack.Pop());
TRef<ColorValue> pcolor; CastTo(pcolor, (IObject*)stack.Pop());
TRef<PointValue> ppointSize;
WinPoint ptSize;
if (stack.GetCount() > 0)
{
CastTo(ppointSize, (IObject*)stack.Pop());
ptSize = WinPoint(
(int)ppointSize->GetValue().X(),
(int)ppointSize->GetValue().Y()
);
}
Justification justification = JustifyLeft();
if (stack.GetCount() > 0)
{
TRef<Number> pjustify = Number::Cast((IObject*)stack.Pop());
justification.SetWord((DWORD)pjustify->GetValue());
}
TRef<IEngineFont> pfont = TrekResources::SmallFont();
if (stack.GetCount() > 0)
{
TRef<FontValue> pfontLocal; CastTo(pfontLocal, (IObject*)stack.Pop());
pfont = pfontLocal->GetValue();
}
bool bRightClip = false;
if (stack.GetCount() > 0)
bRightClip = GetBoolean((IObject*)stack.Pop());
TRef<StringValuePane> ppane;
if (ppointSize)
{
if (bRightClip)
justification = JustifyLeftClipRight();
ppane = new StringValuePane(pstring, pcolor, pfont, ptSize, justification);
}
else
ppane = new StringValuePane(pstring, pcolor, pfont);
return (Pane*)ppane;
}