当前位置: 首页>>代码示例>>C++>>正文


C++ Border::set_Content方法代码示例

本文整理汇总了C++中Border::set_Content方法的典型用法代码示例。如果您正苦于以下问题:C++ Border::set_Content方法的具体用法?C++ Border::set_Content怎么用?C++ Border::set_Content使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Border的用法示例。


在下文中一共展示了Border::set_Content方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Length

P2PFrame::P2PFrame()
{
//	std::string filename = DownloadFile("http://www.lerstad.com/");

	put_Width(new Length(400, Length::UnitAbsolute));
	put_Height(new Length(300, Length::UnitAbsolute));

	DockPanel* p = new DockPanel;
	{

		{
			CUIDockBar* pDockbar = new CUIDockBar;
			{
				pDockbar->put_BackgroundBrush(new SolidColorBrush(new Color(236, 233, 216)));
				{
					//Gripper* pGripper = new Gripper;
				//	pGripper->put_BackgroundBrush(new CLSolidColorBrush(new CLColor(255, 0, 0)));
					{
						Toolbar* pToolbar = new Toolbar;
					//	pToolbar->put_BackgroundBrush(new CLSolidColorBrush(new CLColor(0, 255, 0)));

						{

							CLXUIMenuElement* pMenu = new CLXUIMenuElement(new TextString(OLESTR("File")));
							{
								pMenu->AddItem(new TextString(OLESTR("Open")), ID_FILE_OPEN);
								pMenu->AddItem(new TextString(OLESTR("Save")));
								pMenu->AddItem(new TextString(OLESTR("Open Program")), ID_FILE_OPENPROGRAM);
								{
									CLXUIMenuElement* pMenu2 = new CLXUIMenuElement(new TextString(OLESTR("Debug")));
									pMenu2->AddItem(new TextString(OLESTR("Go")), ID_DEBUG_GO);
									pMenu2->AddItem(new TextString(OLESTR("Step Into")), ID_DEBUG_STEPINTO);
									pMenu->AddMenuItem(pMenu2);
								}
								{
									CLXUIMenuElement* pMenu2 = new CLXUIMenuElement(new TextString(OLESTR("Edit")));
									pMenu2->AddItem(new TextString(OLESTR("Cut")), ID_EDIT_CUT);
									pMenu2->AddItem(new TextString(OLESTR("Copy")), ID_EDIT_COPY);
									pMenu2->AddItem(new TextString(OLESTR("Paste")), ID_EDIT_PASTE);
									pMenu->AddMenuItem(pMenu2);
								}
								/*
								{
									CLXUIMenuElement* pMenu2 = new CLXUIMenuElement(new TextString(OLESTR("Prefs2")));
									pMenu2->AddItem(new TextString(OLESTR("Local")));
									pMenu2->AddItem(new TextString(OLESTR("Global")));
									pMenu2->AddItem(new TextString(OLESTR("Something")));
									{
										CLXUIMenuElement* pMenu3 = new CLXUIMenuElement(new TextString(OLESTR("Prefs3")));
										pMenu3->AddItem(new TextString(OLESTR("Local")));
										pMenu3->AddItem(new TextString(OLESTR("Global")));
										pMenu3->AddItem(new TextString(OLESTR("Something")));
										pMenu2->AddMenuItem(pMenu3);
									}

									pMenu->AddMenuItem(pMenu2);
								}
								*/
								pMenu->AddSeparator();
								pMenu->AddItem(new TextString(OLESTR("Exit")), ID_APP_EXIT);
							}
							pToolbar->AddRChild(pMenu);

						}

						{
							Button* pButton = new Button;
							pButton->set_Content(new TextString(OLESTR("Save")));
							pToolbar->AddRChild(pButton);
						}

						{
							Button* pButton = new Button;
							pButton->set_Content(new TextString(OLESTR("Exit")));
							pToolbar->AddRChild(pButton);
						}

						/*
						{
							TextString* pText = new TextString(OLESTR("Button0"), font);
							pToolbar->AddRChild(pText);
						}

						{
							TextString* pText = new TextString(OLESTR("Button1"), font);
							pToolbar->AddRChild(pText);
						}

						{
							TextString* pText = new TextString(OLESTR("Button2"), font);
							pToolbar->AddRChild(pText);
						}
						*/

						//pGripper->put_Content(pToolbar);
						pDockbar->DockControlBar(pToolbar);
					}
					//pDockbar->DockControlBar(pGripper);
				}

//.........这里部分代码省略.........
开发者ID:sigurdle,项目名称:FirstProject2,代码行数:101,代码来源:P2PFrame.cpp

示例2: TreeItemChildren

TreeItem::TreeItem(TreeControl* ownerTree)
{
	ASSERT(0);
#if 0
	m_itemData = NULL;
//	m_iIndex = -1;
	m_cChildren = -1;

	m_userdata = NULL;
	//m_expanded = false;

	m_Span = new Border;

//	m_Content = NULL;

//	DockPanel* pPanel = new DockPanel;

	m_ownerCtl = ownerTree;

	if (ownerTree)
		m_pos = ownerTree->m_treeItems.insert(ownerTree->m_treeItems.end(), this);

	m_Children = NULL;
#if 0
	m_Children = new TreeItemChildren(ownerTree);
	m_Children->put_Visibility(Collapsed);
#endif
	//m_Button = new Canvas;
	{
		m_ExpandButton = new Border(new Thickness(new Length(1)));
	//	m_ExpandButton->put_Width(Length(22));
	//	m_ExpandButton->put_Height(Length(22));

		/*
			m_ExpandButton->m_LeftBrush = new SolidColorBrush(Color(0,0,0));
			m_ExpandButton->m_TopBrush = new SolidColorBrush(Color(0,0,0));
			m_ExpandButton->m_RightBrush = new SolidColorBrush(Color(0,0,0));
			m_ExpandButton->m_BottomBrush = new SolidColorBrush(Color(0,0,0));
			*/

		//Border* pRect = new Border(Thickness(Length(1), Length(1), Length(1), Length(1)));
	//	m_ExpandButton->put_Visibility(Hidden);
		{
			Border* pRect = new Border(new Thickness(new Length(1)));
			pRect->set_Width(new Length(14));
			pRect->set_Height(new Length(14));
			pRect->set_BorderBrush(new SolidColorBrush(new Color(90,90,90)));

			/*
			pRect->put_Fill(new SolidColorBrush(new Color(0, 0, 0)));
			pRect->put_RectangleWidth(new Length(14, Length::UnitAbsolute));
			pRect->put_RectangleHeight(new Length(14, Length::UnitAbsolute));
			*/
			{
				pRect->set_Content(new TextString(WSTR("-")));
			}
			m_ExpandButton->set_Content(pRect);
		}

		m_ExpandButton->set_Visibility(Hidden);

		//DockPanel::put_Dock(m_ExpandButton, DockPanel::Left);
		/*m_Button->*/AddRChild(m_ExpandButton);
	}

	AddRChild(m_Span);
	/*
	{
		m_ContentBorder = new CLXUICanvas;
	//	m_ContentBorder->put_Content(m_Content);
		DockPanel::put_Dock(m_ContentBorder, DockPanel::Fill);
		m_Button->AddRChild(m_ContentBorder);
	}
	*/
	//AddRChild(m_Button);
#if 0
	AddRChild(m_Children);
#endif
/*
	pPanel->AddRChild(m_Button);
	pPanel->AddRChild(m_Children);

	put_VisualTree(pPanel);
*/

//	m_pFont = m_ownerCtl->m_pFont;

//	m_ownerCtl->m_items.push_back(this);
#endif
}
开发者ID:,项目名称:,代码行数:90,代码来源:


注:本文中的Border::set_Content方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。