X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41d9dcbc6047e00f84de319d8036c80dd711c638..f30b9eed380fc267a812460087ae50c3bbd06452:/src/richtext/richtextindentspage.cpp?ds=sidebyside diff --git a/src/richtext/richtextindentspage.cpp b/src/richtext/richtextindentspage.cpp index 626de8d2d1..b7afe7325e 100644 --- a/src/richtext/richtextindentspage.cpp +++ b/src/richtext/richtextindentspage.cpp @@ -92,6 +92,7 @@ void wxRichTextIndentsSpacingPage::Init() m_spacingBefore = NULL; m_spacingAfter = NULL; m_spacingLine = NULL; + m_pageBreakCtrl = NULL; m_previewCtrl = NULL; ////@end wxRichTextIndentsSpacingPage member initialisation @@ -314,9 +315,16 @@ void wxRichTextIndentsSpacingPage::CreateControls() m_spacingLine->SetToolTip(_("The line spacing.")); itemFlexGridSizer38->Add(m_spacingLine, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5); + m_pageBreakCtrl = new wxCheckBox( itemRichTextDialogPage1, ID_RICHTEXTINDENTSSPACINGPAGE_PAGEBREAK, _("&Page Break"), wxDefaultPosition, wxDefaultSize, 0 ); + m_pageBreakCtrl->SetValue(false); + m_pageBreakCtrl->SetHelpText(_("Inserts a page break before the paragraph.")); + if (wxRichTextIndentsSpacingPage::ShowToolTips()) + m_pageBreakCtrl->SetToolTip(_("Inserts a page break before the paragraph.")); + itemBoxSizer34->Add(m_pageBreakCtrl, 0, wxALIGN_LEFT|wxALL, 5); + itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL, 5); - m_previewCtrl = new wxRichTextCtrl( itemRichTextDialogPage1, ID_RICHTEXTINDENTSSPACINGPAGE_PREVIEW_CTRL, wxEmptyString, wxDefaultPosition, wxSize(350, 100), wxVSCROLL|wxTE_READONLY ); + m_previewCtrl = new wxRichTextCtrl( itemRichTextDialogPage1, ID_RICHTEXTINDENTSSPACINGPAGE_PREVIEW_CTRL, wxEmptyString, wxDefaultPosition, wxSize(350, 100), wxBORDER_THEME|wxVSCROLL|wxTE_READONLY ); m_previewCtrl->SetHelpText(_("Shows a preview of the paragraph settings.")); if (wxRichTextIndentsSpacingPage::ShowToolTips()) m_previewCtrl->SetToolTip(_("Shows a preview of the paragraph settings.")); @@ -450,6 +458,8 @@ bool wxRichTextIndentsSpacingPage::TransferDataFromWindow() else attr->SetOutlineLevel(outlineLevel-1); + attr->SetPageBreak(m_pageBreakCtrl->GetValue()); + return true; } @@ -546,6 +556,8 @@ bool wxRichTextIndentsSpacingPage::TransferDataToWindow() else m_outlineLevelCtrl->SetSelection(0); + m_pageBreakCtrl->SetValue(attr->HasPageBreak()); + UpdatePreview(); m_dontUpdate = false;