- // create the controls
- // -------------------
-
- // the icon first
- c = new wxLayoutConstraints;
- c->width.Absolute(iconSize);
- c->height.Absolute(iconSize);
- c->top.SameAs(this, wxTop, 3*LAYOUT_Y_MARGIN);
- c->left.SameAs(this, wxLeft, 2*LAYOUT_X_MARGIN);
- icon->SetConstraints(c);
-
- wxStaticText *text = NULL;
- for ( size_t nLine = 0; nLine < nLineCount; nLine++ ) {
- c = new wxLayoutConstraints;
- if ( text == NULL )
- c->top.SameAs(this, wxTop, 3*LAYOUT_Y_MARGIN);
- else
- c->top.Below(text);
-
- c->left.RightOf(icon, 2*LAYOUT_X_MARGIN);
- c->width.Absolute(widthTextMax);
- c->height.Absolute(heightTextMax);
- text = new wxStaticText(this, -1, lines[nLine]);
- text->SetConstraints(c);
- }
-
- // create the buttons
- wxButton *btnPrevious = (wxButton *)NULL;
- for ( nBtn = 0; nBtn < Btn_Max; nBtn++ ) {
- if ( buttons[nBtn] ) {
- c = new wxLayoutConstraints;
-
- if ( btnPrevious ) {
- c->left.RightOf(btnPrevious, LAYOUT_X_MARGIN);
- }
- else {
- c->left.SameAs(this, wxLeft,
- (widthDlg - widthButtonsTotal) / 2);
- }
-
- c->width.Absolute(widthBtnMax);
- c->top.Below(text, 4*LAYOUT_Y_MARGIN);
- c->height.Absolute(heightButton);
- buttons[nBtn]->SetConstraints(c);