- if (!buttonFont)
- buttonFont = wxTheFontList->FindOrCreateFont(fontSize, wxSWISS, wxNORMAL, wxBOLD);
- SetButtonFont(*buttonFont);
-
- int buttonWidth = 65;
- int buttonHeight = 24;
-
- int x = 5;
- int y = 5;
- int gap = 5;
-
- closeButton = new wxButton(this, wxID_PREVIEW_CLOSE, "Close",
- wxPoint(x, y), wxSize(buttonWidth, buttonHeight));
-
- x += gap + buttonWidth;
-
- if (buttonFlags & wxPREVIEW_PRINT)
- {
- printButton = new wxButton(this, wxID_PREVIEW_PRINT, "Print...", wxPoint(x, y),
- wxSize(buttonWidth, buttonHeight));
- x += gap + buttonWidth;
- }
-
- if (buttonFlags & wxPREVIEW_PREVIOUS)
- {
- previousPageButton = new wxButton(this, wxID_PREVIEW_PREVIOUS, "<<", wxPoint(x, y),
- wxSize(buttonWidth, buttonHeight));
- x += gap + buttonWidth;
- }
-
- if (buttonFlags & wxPREVIEW_NEXT)
- {
- nextPageButton = new wxButton(this, wxID_PREVIEW_NEXT, ">>",
- wxPoint(x, y), wxSize(buttonWidth, buttonHeight));
- x += gap + buttonWidth;
- }
-
- static wxString choices[] = { "10%", "20%", "25%", "30%", "35%", "40%", "45%", "50%", "55%", "60%",
- "65%", "70%", "75%", "80%", "85%", "90%", "95%", "100%", "110%", "120%", "150%", "200%" };
- int n = 22;
- if (buttonFlags & wxPREVIEW_ZOOM)
- {
- zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM, wxPoint(x, y),
- wxSize(100, -1), n, (wxString *)choices);
- SetZoomControl(printPreview->GetZoom());
- }
-
- closeButton->SetDefault();
-