本文整理汇总了C++中Notebook::setTab方法的典型用法代码示例。如果您正苦于以下问题:C++ Notebook::setTab方法的具体用法?C++ Notebook::setTab怎么用?C++ Notebook::setTab使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notebook
的用法示例。
在下文中一共展示了Notebook::setTab方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Notebook
PrefsDialog::PrefsDialog( Window *frame, Window *parent ) :
Dialog( frame, parent, Strings::get( 168 ),
AWindow::CENTER | AWindow::ISMODAL | AWindow::ADJUSTSIZE,
0, 0, 500, 365 )
{
char *namestr = "PrefsDialog";
name = new char[strlen(namestr)+1];
strcpy( name, namestr );
getGraphics()->setDialogFont();
int margin = 10, fontHeight = Graphics::dialogDesignFontHeight,
yStart = getClientHeight() - fontHeight*2 - 20,
interSpace = fontHeight + fontHeight / 2;
prevUseBigFont = AGraphics::useBigFont;
Notebook *notebook =
new Notebook( this, 0, 50, getClientWidth(), getClientHeight() - 50,
Color::BKGR, 0 );
asciiDialog = new AsciiDialog( notebook, notebook );
ascii2Dialog = new Ascii2Dialog( notebook, notebook );
hexDialog = new HexDialog( notebook, notebook );
editorDialog = new EditorDialog( notebook, notebook );
displayDialog = new DisplayDialog( notebook, notebook );
miscDialog = new MiscDialog( notebook, notebook );
notebook->add( editorDialog, Strings::get(188) );
notebook->add( displayDialog, Strings::get(190) );
notebook->add( asciiDialog, Strings::get(166) );
notebook->add( ascii2Dialog, Strings::get(209) );
notebook->add( hexDialog, Strings::get(179) );
notebook->add( miscDialog, Strings::get(196) );
OKButton = new Button( this, Strings::get(8), AWindow::ISDEFAULT|ISTABSTOP,
10, 10, 70, 30 );
OKButton->setYMove( FOLLOW );
cancelButton = new Button( this, Strings::get(9), ISTABSTOP, 90, 10, 70, 30 );
cancelButton->setYMove( FOLLOW );
setControlsVisible();
notebook->setTab( 0 );
OKButton->addButtonListener( this );
cancelButton->addButtonListener( this );
adjustForFontSize();
// Save/restore window position
initSize();
int x = getX(), y = getY(), width = getWidth(), height = getHeight();
WinProperties::retrieveProperty( name, x, y, width, height );
setSize( width, height );
center( x, y );
setPos( x, y );
}