X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41d9dcbc6047e00f84de319d8036c80dd711c638..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/richtext/richtextindentspage.cpp?ds=sidebyside diff --git a/src/richtext/richtextindentspage.cpp b/src/richtext/richtextindentspage.cpp index 626de8d2d1..604476ae3e 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,6 +315,13 @@ 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 ); @@ -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;