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


C++ Layout::AddWin方法代码示例

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


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

示例1: if

	CharsetDlg1(NCDialogParent *parent, int curCharset)
	:	NCDialog(createDialogAsChild, 0, parent, utf8_to_unicode( _LT("Charset") ).ptr(), bListOkCancel), 
		layout(10,10),
		list(this, 7),
		otherButton(0, this, utf8_to_unicode( _LT("Other...") ).ptr(), CMD_OTHER),
		addButton(0, this, utf8_to_unicode( carray_cat<char>(_LT("Add..."), "(Ins)").ptr() ).ptr(), CMD_ADD),
		delButton(0, this, utf8_to_unicode( carray_cat<char>(_LT("Del..."), "(Del)").ptr() ).ptr(), CMD_DEL)
	{ 
		int i;

		InitOperCharsets();
		list.SetList(::csList.ptr(), ::csList.count());
		list.MoveFirst(0);

		for (int i = 0; i < ::csList.count(); i++) 
			if (::csList[i]->id == curCharset) {
				list.MoveCurrent(i);
				break;
			}
		
		/*
			LO
			L
			LA
			LD
		*/
		layout.AddWin(&list,0,0,3,0); list.Enable(); list.Show(); 
		list.SetFocus();
		layout.AddWin(&otherButton,0,1); otherButton.Enable(); otherButton.Show();
		layout.AddWin(&addButton,2,1); addButton.Enable(); addButton.Show();
		layout.AddWin(&delButton,3,1); delButton.Enable(); delButton.Show();

		int mx = 0, my = 0;
		LSize ls;

		otherButton.GetLSize(&ls); if (mx < ls.x.maximal) mx = ls.x.maximal; if (my < ls.y.maximal) my = ls.y.maximal;
		addButton.GetLSize(&ls); if (mx < ls.x.maximal) mx = ls.x.maximal;	if (my < ls.y.maximal) my = ls.y.maximal;
		delButton.GetLSize(&ls); if (mx < ls.x.maximal) mx = ls.x.maximal;	if (my < ls.y.maximal) my = ls.y.maximal;
		ls.x.minimal = ls.x.maximal = mx;
		ls.y.minimal = ls.y.maximal = my;
		otherButton.SetLSize(ls);
		addButton.SetLSize(ls);
		delButton.SetLSize(ls);

		layout.SetLineGrowth(1);

		AddLayout(&layout);
		SetEnterCmd(CMD_OK);
		SetPosition();
	};
开发者ID:Karamax,项目名称:WalCommander,代码行数:50,代码来源:charsetdlg.cpp

示例2:

	CopyDialog(NCDialogParent *parent, bool move = false)
	:	SimpleCFThreadWin(parent, move ? _LT("Move") : _LT("Copy") ),
		_layout(7,2), 
		_text1(0, this, utf8_to_unicode(move ? _LT("Moving the file") : _LT("Copying the file") ).ptr()),
		_text2(0, this, utf8_to_unicode( _LT("to") ).ptr()),
		_text3(0, this, utf8_to_unicode( _LT("Files processed") ).ptr()),
		_from(this),
		_to(this),
		_countWin(this), 
		_progressWin(this)
	{
		_layout.AddWin(&_text1, 0, 0, 0, 1);
		_layout.AddWin(&_from, 1, 0, 1, 1);
		_layout.AddWin(&_text2, 2, 0, 2, 1);
		_layout.AddWin(&_to, 3, 0, 3, 1);
		_layout.AddWin(&_progressWin, 4,0,4,1);
		_layout.AddWin(&_text3, 5, 0);
		_layout.AddWin(&_countWin, 5, 1);
		_text1.Show(); _text1.Enable();
		_text2.Show(); _text2.Enable();
		_text3.Show(); _text3.Enable();
		_from.Show(); _from.Enable();
		_to.Show(); _to.Enable();
		_countWin.Show(); _countWin.Enable();
		_progressWin.Show(); _progressWin.Enable();
		AddLayout(&_layout);
		SetPosition();
	}
开发者ID:Karamax,项目名称:WalCommander,代码行数:28,代码来源:fileopers.cpp

示例3: NCDialog

	clFileAssociationsWin( NCDialogParent* parent, std::vector<clNCFileAssociation>* Associations )
		: NCDialog( ::createDialogAsChild, 0, parent, utf8_to_unicode( _LT( "File associations" ) ).data(), bListOkCancel )
		, m_ListWin( this, Associations )
		, m_Layout( 10, 10 )
		, m_AddCurrentButton( 0, this, utf8_to_unicode( "+ (&Ins)" ).data(), CMD_PLUS )
		, m_DelButton( 0, this, utf8_to_unicode( "- (&Del)" ).data(), CMD_MINUS )
		, m_EditButton( 0, this, utf8_to_unicode( _LT( "&Edit" ) ).data(), CMD_EDIT )
		, m_Saved( true )
	{
		m_AddCurrentButton.Enable();
		m_AddCurrentButton.Show();
		m_DelButton.Enable();
		m_DelButton.Show();
		m_EditButton.Enable();
		m_EditButton.Show();

		LSize lsize = m_AddCurrentButton.GetLSize();
		LSize lsize2 = m_DelButton.GetLSize();
		LSize lsize3 = m_EditButton.GetLSize();

		if ( lsize.x.minimal < lsize2.x.minimal ) { lsize.x.minimal = lsize2.x.minimal; }

		if ( lsize.x.minimal < lsize3.x.minimal ) { lsize.x.minimal = lsize3.x.minimal; }

		if ( lsize.x.maximal < lsize.x.minimal ) { lsize.x.maximal = lsize.x.minimal; }

		m_AddCurrentButton.SetLSize( lsize );
		m_DelButton.SetLSize( lsize );
		m_EditButton.SetLSize( lsize );

		m_Layout.AddWinAndEnable( &m_ListWin, 0, 0, 9, 0 );
		m_Layout.AddWin( &m_AddCurrentButton, 0, 1 );
		m_Layout.AddWin( &m_DelButton, 1, 1 );
		m_Layout.AddWin( &m_EditButton, 2, 1 );
		m_Layout.SetLineGrowth( 9 );

		this->AddLayout( &m_Layout );

		SetPosition();

		m_ListWin.SetFocus();
		this->SetEnterCmd( CMD_OK );
	}
开发者ID:0-wiz-0,项目名称:WCMCommander,代码行数:43,代码来源:fileassociations.cpp

示例4: PathListDlg

	FoldersHistoryDlg( NCDialogParent* parent, PathList& dataList )
	 : PathListDlg( parent, m_historyWin, _LT( "Folders History" ), 0 )
	 , m_historyWin( this, dataList )
	 , m_lo( 10, 10 )
	{
		m_ListWin.Show();
		m_ListWin.Enable();

		m_lo.AddWin( &m_ListWin, 0, 0, 9, 0 );
		m_lo.SetLineGrowth( 9 );
		AddLayout( &m_lo );

		SetPosition();
		m_ListWin.SetFocus();

		if ( dataList.GetCount() > 0 )
		{
			// select the last item and make it visible
			m_ListWin.MoveCurrent( dataList.GetCount() - 1 );
		}
	}
开发者ID:0-wiz-0,项目名称:WCMCommander,代码行数:21,代码来源:folder-history.cpp

示例5: SimpleCFThreadWin

	CopyDialog( NCDialogParent* parent, bool move = false )
		:  SimpleCFThreadWin( parent, move ? _LT( "Move" ) : _LT( "Copy" ) ),
		   _layout( 7, 2 ),
		   _text1( 0, this, utf8_to_unicode( move ? _LT( "Moving the file" ) : _LT( "Copying the file" ) ).data() ),
		   _text2( 0, this, utf8_to_unicode( _LT( "to" ) ).data() ),
		   _text3( 0, this, utf8_to_unicode( _LT( "Files processed" ) ).data() ),
		   _from( this ),
		   _to( this ),
		   _countWin( this ),
		   _progressWin( this ),
		   _speedStr( uiValue, this, 0, 0, StaticLine::LEFT, 10 ),
		   _lastMs( GetTickMiliseconds() )
	{
		_layout.AddWin( &_text1, 0, 0, 0, 1 );
		_layout.AddWin( &_from, 1, 0, 1, 1 );
		_layout.AddWin( &_text2, 2, 0, 2, 1 );
		_layout.AddWin( &_to, 3, 0, 3, 1 );
		_layout.AddWin( &_progressWin, 4, 0, 4, 1 );
		_layout.AddWin( &_text3, 5, 0 );
		_layout.AddWin( &_countWin, 5, 1 );
		_layout.AddWin( &_speedStr, 6, 0 );
		_text1.Show();
		_text1.Enable();
		_text2.Show();
		_text2.Enable();
		_text3.Show();
		_text3.Enable();
		_from.Show();
		_from.Enable();
		_to.Show();
		_to.Enable();
		_countWin.Show();
		_countWin.Enable();
		_progressWin.Show();
		_progressWin.Enable();
		_speedStr.Show();
		_speedStr.Enable();
		AddLayout( &_layout );
		SetTimer( 1, 1000 );
		SetPosition();
	}
开发者ID:FaionWeb,项目名称:WCMCommander,代码行数:41,代码来源:fileopers.cpp

示例6: NCDialog

	DirCalcThreadWin( NCDialogParent* parent, const char* name, OperDirCalcData* pD, const unicode_t* dirName )
		:  NCDialog( ::createDialogAsChild, 0, parent, utf8_to_unicode( name ).data(), bListOk ),
		   pData( pD ),
		   lo( 12, 10 ),
		   cPathWin( this ),
		   curFileCount( -1 ),
		   curFolderCount( -1 ),
		   curSumSize( -1 ),
		   curBadDirs( -1 ),
		   dirString( 0, this, ScanedDirString( dirName ).data() ),
		   fileCountName( uiVariable, this, utf8_to_unicode( _LT( "Files:" ) ).data() ),
		   fileCountNum( uiValue, this, utf8_to_unicode( "AAAAAAAAAA" ).data() ),
		   folderCountName( uiVariable, this, utf8_to_unicode( _LT( "Folders:" ) ).data() ),
		   folderCountNum( uiValue, this, utf8_to_unicode( "AAAAAAAAAA" ).data() ),
		   sumSizeName( uiVariable, this, utf8_to_unicode( _LT( "Files size:" ) ).data() ),
		   sumSizeNum( uiValue, this, utf8_to_unicode( "AAAAAAAAAAAAAAAAAAAA" ).data() ),
		   badDirsName( uiVariable, this, utf8_to_unicode( _LT( "Not readable folders:" ) ).data() ),
		   badDirsNum( uiValue, this, utf8_to_unicode( "AAAAAAAAAA" ).data() )
	{
		lo.AddWin( &dirString, 0, 0, 0, 3 );
		lo.AddWin( &cPathWin, 9, 0, 9, 3 );
		lo.LineSet( 1, 10 );
		lo.AddWin( &fileCountName, 3, 1 );
		lo.AddWin( &folderCountName, 4, 1 );
		lo.AddWin( &sumSizeName, 5, 1 );
		lo.AddWin( &fileCountNum, 3, 2 );
		lo.AddWin( &folderCountNum, 4, 2 );
		lo.AddWin( &sumSizeNum, 5, 2 );
		lo.LineSet( 6, 7 );
		lo.AddWin( &badDirsName, 7, 1 );
		lo.AddWin( &badDirsNum, 7, 2 );
		lo.LineSet( 8, 10 );

		dirString.Show();
		dirString.Enable();
		cPathWin.Show();
		cPathWin.Enable();
		fileCountName.Show();
		fileCountName.Enable();
		fileCountNum.Show();
		fileCountNum.Enable();

		folderCountName.Show();
		folderCountName.Enable();
		folderCountNum.Show();
		folderCountNum.Enable();

		sumSizeName.Show();
		sumSizeName.Enable();
		sumSizeNum.Show();
		sumSizeNum.Enable();
		badDirsName.Show();
		badDirsName.Enable();
		badDirsNum.Show();
		badDirsNum.Enable();

		lo.SetColGrowth( 3 );
		lo.SetColGrowth( 0 );

		this->AddLayout( &lo );
		this->SetEnterCmd( CMD_OK );
		SetPosition();

		RefreshCounters();
	}
开发者ID:0-wiz-0,项目名称:WCMCommander,代码行数:65,代码来源:dircalc.cpp


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