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


C++ Sheet::clear方法代码示例

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


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

示例1: write

/**************************************************************
***
**   EphemView   ---   write
***
***************************************************************/
void EphemView::write()
{
	//printf( "EphemView::write mode %d widget %ld swidget %ld twidget %ld\n", mode, (long)widget, (long)swidget, (long)twidget ); 
	//printf( "EphemView::write mode %d month %d year %d\n", mode, month, year );
	assert( mode >= 0 && mode < MAX_EPHEM_VIEWTYPES );
	int ret = 0;

	expert->prepareMonth( month, year, isLocaltime );
	if ( mode == 1 )
	{
		assert( swidget );
		Sheet *sheet = swidget->getSheet();
		assert( sheet );
		sheet->clear();
		ret = expert->calcMonth();

		SheetWidgetGrid *grid = new SheetWidgetGrid( 1, .5, 100, 100, 1600, 800 );
		SheetWidgetItem *w = new GraphicalEphemWidgetItem( props, expert, max_deg, isLocaltime );
		grid->addItem( w );
		sheet->addItem( grid );
		swidget->OnDataChanged();
	}
	else
	{
		assert( twidget );
		Sheet *sheet = twidget->getSheet();
		sheet->clear();
		switch ( mode )
		{
			case 2:
				expert->writeDetails( sheet );
				break;
			case 3:
				ret = expert->writeIngress( sheet );
				break;
			case 4:
				expert->writeLunar( sheet );
				break;
			case 5:
				expert->writeKp( sheet, dasaId );
				break;
			default:
				ret = expert->writeLongitudes( sheet );
			break;
		}
		twidget->OnDataChanged();
	}
	Refresh();

	if ( ret )
	{
		wxCommandEvent event( SHOW_EPHEM_FILE_WARNING );
		event.SetEventObject( (wxWindow*)this );
		wxPostEvent( GetParent(), event );
	}
}
开发者ID:martin-pe,项目名称:maitreya8,代码行数:61,代码来源:EphemView.cpp

示例2: pickUiSample

	void pickUiSample(Sheet& sheet, Widget& selected)
	{
		const string name = selected.label();
		
		if(sheet.stripe().sequence().size() > 0)
			sheet.clear();

		if(name == "Dockspace")
			createUiTestDockspace(sheet);
		else if(name == "Window")
			createUiTestWindow(sheet);
		else if(name == "Filtered List")
			createUiTestFilteredList(sheet);
		else if(name == "Custom List")
			createUiTestCustomList(sheet);
		else if(name == "Text Editor")
			createUiTestTextEditor(sheet);
		else if(name == "Tabs")
			createUiTestTabs(sheet);
		else if(name == "Table")
			createUiTestTable(sheet);
		else if(name == "Tree")
			createUiTestTree(sheet);
		else if(name == "Controls")
			createUiTestControls(sheet);
		else if(name == "File Browser")
			createUiTestFileBrowser(sheet);
		else if(name == "File Tree")
			createUiTestFileTree(sheet);
		else if(name == "Progress Dialog")
			createUiTestProgressDialog(sheet);
	}
开发者ID:alexeyknyshev,项目名称:kiui,代码行数:32,代码来源:mkUiExample.cpp


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