本文整理汇总了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 );
}
}
示例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);
}