- wxHtmlHelpFrameOptionsDialog(wxWindow *parent) : wxDialog(parent, -1, wxString(_("Help Browser Options")))
- {
- wxString choices[3] = {_("small"), _("medium"), _("large")};
- wxString choices2[2] = {_("italic"), _("slant")};
- wxBoxSizer *topsizer, *sizer, *sizer2, *sizer3;
-
- topsizer = new wxBoxSizer(wxVERTICAL);
-
- sizer = new wxBoxSizer(wxHORIZONTAL);
-
- sizer2 = new wxBoxSizer(wxVERTICAL);
- sizer2 -> Add(new wxStaticText(this, -1, _("Normal font:")),
- 0, wxLEFT | wxTOP, 10);
- sizer2 -> Add(NormalFont = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition,
- wxSize(200, 200),
- 0, NULL, wxCB_DROPDOWN | wxCB_READONLY),
- 1, wxEXPAND | wxLEFT | wxRIGHT, 10);
-
- sizer3 = new wxBoxSizer(wxHORIZONTAL);
- sizer3 -> Add(SFI_i = new wxRadioButton(this, -1, _("use italic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP),
- 1, wxEXPAND, 0);
- sizer3 -> Add(SFI_s = new wxRadioButton(this, -1, _("use slant"), wxDefaultPosition, wxDefaultSize, 0),
- 1, wxEXPAND, 0);
- sizer2 -> Add(sizer3, 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
-
- sizer -> Add(sizer2, 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
-
- sizer2 = new wxBoxSizer(wxVERTICAL);
- sizer2 -> Add(new wxStaticText(this, -1, _("Fixed font:")),
- 0, wxLEFT | wxTOP, 10);
- sizer2 -> Add(FixedFont = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition,
- wxSize(200, 200),
- 0, NULL, wxCB_DROPDOWN | wxCB_READONLY),
- 1, wxEXPAND | wxLEFT | wxRIGHT, 10);
-
- sizer3 = new wxBoxSizer(wxHORIZONTAL);
- sizer3 -> Add(FFI_i = new wxRadioButton(this, -1, _("use italic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP),
- 1, wxEXPAND, 0);
- sizer3 -> Add(FFI_s = new wxRadioButton(this, -1, _("use slant"), wxDefaultPosition, wxDefaultSize, 0),
- 1, wxEXPAND, 0);
- sizer2 -> Add(sizer3, 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
-
- sizer -> Add(sizer2, 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
-
- topsizer -> Add(sizer);
-
- topsizer -> Add(RadioBox = new wxRadioBox(this, -1, _("Font size:"),
- wxDefaultPosition, wxDefaultSize, 3, choices, 3),
- 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
-
- topsizer -> Add(new wxStaticText(this, -1, _("Preview:")),
- 0, wxLEFT | wxTOP, 10);
- topsizer -> Add(TestWin = new wxHtmlWindow(this, -1, wxDefaultPosition, wxSize(-1, 150)),
- 1, wxEXPAND | wxLEFT | wxTOP, 10);
-
- sizer = new wxBoxSizer(wxHORIZONTAL);
- sizer -> Add(new wxButton(this, wxID_OK, _("OK")), 0, wxALL, 10);
- sizer -> Add(new wxButton(this, wxID_CANCEL, _("Cancel")), 0, wxALL, 10);
- topsizer -> Add(sizer, 0, wxALIGN_RIGHT);
-
- SetAutoLayout(TRUE);
- SetSizer(topsizer);
- topsizer -> Fit(this);
- Centre(wxBOTH);
- }
-
+ wxHtmlHelpFrameOptionsDialog(wxWindow *parent)
+ : wxDialog(parent, -1, wxString(_("Help Browser Options")))
+ {
+ wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL);
+ wxFlexGridSizer *sizer = new wxFlexGridSizer(2, 3, 2, 5);
+
+ sizer->Add(new wxStaticText(this, -1, _("Normal font:")));
+ sizer->Add(new wxStaticText(this, -1, _("Fixed font:")));
+ sizer->Add(new wxStaticText(this, -1, _("Font size:")));
+
+ sizer->Add(NormalFont = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition,
+ wxSize(200, 200),
+ 0, NULL, wxCB_DROPDOWN | wxCB_READONLY));
+
+ sizer->Add(FixedFont = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition,
+ wxSize(200, 200),
+ 0, NULL, wxCB_DROPDOWN | wxCB_READONLY));
+
+ sizer->Add(FontSize = new wxSpinCtrl(this, -1));
+ FontSize->SetRange(2, 100);
+
+ topsizer->Add(sizer, 0, wxLEFT|wxRIGHT|wxTOP, 10);
+
+ topsizer->Add(new wxStaticText(this, -1, _("Preview:")),
+ 0, wxLEFT | wxTOP, 10);
+ topsizer->Add(TestWin = new wxHtmlWindow(this, -1, wxDefaultPosition, wxSize(20, 150),
+ wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER),
+ 1, wxEXPAND | wxLEFT|wxTOP|wxRIGHT, 10);
+
+ wxBoxSizer *sizer2 = new wxBoxSizer(wxHORIZONTAL);
+ wxButton *ok;
+ sizer2->Add(ok = new wxButton(this, wxID_OK, _("OK")), 0, wxALL, 10);
+ ok->SetDefault();
+ sizer2->Add(new wxButton(this, wxID_CANCEL, _("Cancel")), 0, wxALL, 10);
+ topsizer->Add(sizer2, 0, wxALIGN_RIGHT);
+
+ SetAutoLayout(TRUE);
+ SetSizer(topsizer);
+ topsizer->Fit(this);
+ Centre(wxBOTH);
+ }