本文整理汇总了C++中FrameView::AddChild方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameView::AddChild方法的具体用法?C++ FrameView::AddChild怎么用?C++ FrameView::AddChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameView
的用法示例。
在下文中一共展示了FrameView::AddChild方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Layout
void LoginView::Layout()
{
VLayoutNode* pcRoot = new VLayoutNode("root");
pcUserIconView = new os::IconView(Rect(1,2,2000,82),"",CF_FOLLOW_ALL);
pcUserIconView->SetSelChangeMsg(new Message(M_SEL_CHANGED));
PopulateIcons();
pcUserIconView->SetTabOrder( 1 );
FrameView* pcFrameView = new FrameView(Rect(0,0,2000,84),"","");
pcFrameView->AddChild(pcUserIconView);
AddChild(pcFrameView);
pcLayoutView = new LayoutView(Rect(0,89,GetBounds().Width(),GetBounds().Height()),"layout_view",NULL);
HLayoutNode* pcPassNode = new HLayoutNode("pass_node");
pcPassNode->AddChild(new HLayoutSpacer("",2,2));
pcPassNode->AddChild(pcPassString = new StringView(Rect(),"pass_string","Password:"));
pcPassNode->AddChild(new HLayoutSpacer("",2,2));
pcPassNode->AddChild(pcPassText = new TextView(Rect(),"pass_text",""));
pcPassText->SetPasswordMode(true);
pcPassText->SetMaxPreferredSize(28,1);
pcPassText->SetMinPreferredSize(28,1);
pcPassText->SetTabOrder( 2 );
pcPassNode->AddChild(new HLayoutSpacer("",5,5));
pcPassNode->AddChild(pcLoginButton = new Button(Rect(),"login_but","_Login",new Message(M_LOGIN)));
pcLoginButton->SetTabOrder( 3 );
pcPassNode->AddChild(new HLayoutSpacer("",2,2));
pcPassNode->SameHeight("login_but",NULL);
pcPassNode->ExtendMaxSize(pcPassNode->GetPreferredSize(false));
HLayoutNode* pcKeymapNode = new HLayoutNode("keymap_node");
pcKeymapNode->AddChild(selector = new KeymapSelector(os::Messenger(pcParentWindow)));
HLayoutNode* pcOtherNode = new HLayoutNode("other_node");
pcOtherNode->SetHAlignment(ALIGN_RIGHT);
pcOtherNode->AddChild(pcShutdownButton = new Button(Rect(),"shut_but","_Shutdown",new Message(M_SHUTDOWN)));
pcShutdownButton->SetTabOrder( 4 );
pcOtherNode->AddChild(new HLayoutSpacer("",150,150));
pcOtherNode->AddChild(pcDateString = new StringView(Rect(),"","9 Aug 05, 10:00am"));
UpdateTime();
pcRoot->AddChild(pcPassNode);
pcRoot->AddChild(new os::VLayoutSpacer("",10,10));
pcRoot->AddChild(pcKeymapNode);
pcRoot->AddChild(new os::VLayoutSpacer("",10,10));
pcRoot->AddChild(pcOtherNode);
pcRoot->SameHeight("shut_but","login_but",NULL);
pcRoot->SameWidth("shut_but","login_but",NULL);
pcLayoutView->SetRoot(pcRoot);
AddChild(pcLayoutView);
ResizeTo(os::Point(pcLayoutView->GetPreferredSize(false).x,GetBounds().Height()));
}