本文整理汇总了C++中Area::Top方法的典型用法代码示例。如果您正苦于以下问题:C++ Area::Top方法的具体用法?C++ Area::Top怎么用?C++ Area::Top使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area::Top方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoLayout
/**
* Perform layout on the area.
*/
void Area::DoLayout()
{
if (Content() == NULL)
return; // empty areas need no layout
// if there is a childArea, then it is the childArea that actually contains the content
Area* area = (fChildArea != NULL) ? fChildArea : this;
// set content location and size
area->Content()->MoveTo(floor(area->Left()->Value() + 0.5),
floor(area->Top()->Value() + 0.5));
int32 width = (int32)floor(area->Right()->Value() - area->Left()->Value() + 0.5);
int32 height = (int32)floor(area->Bottom()->Value() - area->Top()->Value() + 0.5);
area->Content()->ResizeTo(width, height);
}
示例2: Add
BALMLayoutBuilder&
BALMLayoutBuilder::AddToLeft(BView* view, XTab* _left, YTab* top, YTab* bottom)
{
Area* currentArea = _CurrentArea();
BReference<XTab> left = _left;
if (_left == NULL)
left = fLayout->AddXTab();
XTab* right = currentArea->Left();
if (!top)
top = currentArea->Top();
if (!bottom)
bottom = currentArea->Bottom();
return Add(view, left, top, right, bottom);
}