From 4bd1dd129c7bd600db8bf27ad7ba6dd646894e24 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Wed, 12 Jun 2002 14:27:30 +0000 Subject: [PATCH] Forward declare ParagraphParameters in ControlParagraph.h. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4383 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/controllers/ChangeLog | 4 ++++ src/frontends/controllers/ControlParagraph.C | 10 ++++++++++ src/frontends/controllers/ControlParagraph.h | 7 ++++++- src/frontends/xforms/ChangeLog | 5 +++++ src/frontends/xforms/FormParagraph.C | 1 + 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index c4f6e880a9..0f31d13f40 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,7 @@ +2002-06-12 Angus Leeming + + * ControlParagraph.[Ch]: forward declare ParagraphParameters. + 2002-06-12 Angus Leeming * ControlInset.tmpl: add missing header file, ButtonControllerBase.h. diff --git a/src/frontends/controllers/ControlParagraph.C b/src/frontends/controllers/ControlParagraph.C index faf4dca43c..e554cb1e5a 100644 --- a/src/frontends/controllers/ControlParagraph.C +++ b/src/frontends/controllers/ControlParagraph.C @@ -16,6 +16,7 @@ #include "ViewBase.h" #include "ButtonControllerBase.h" #include "ControlParagraph.h" +#include "ParagraphParameters.h" #include "Dialogs.h" #include "Liason.h" #include "LyXView.h" @@ -37,22 +38,30 @@ ControlParagraph::ControlParagraph(LyXView & lv, Dialogs & d) d_.showParagraph = boost::bind(&ControlParagraph::show, this); } + +ControlParagraph::~ControlParagraph() +{} + + ParagraphParameters & ControlParagraph::params() { lyx::Assert(pp_.get()); return *pp_; } + bool ControlParagraph::inInset() const { return ininset_; } + LyXAlignment ControlParagraph::alignPossible() const { return alignpos_; } + void ControlParagraph::apply() { if (!lv_.view()->available()) @@ -84,6 +93,7 @@ void ControlParagraph::apply() setMinibuffer(&lv_, _("Paragraph layout set")); } + void ControlParagraph::setParams() { if (!pp_.get()) diff --git a/src/frontends/controllers/ControlParagraph.h b/src/frontends/controllers/ControlParagraph.h index 3e6be99334..b089a07ec9 100644 --- a/src/frontends/controllers/ControlParagraph.h +++ b/src/frontends/controllers/ControlParagraph.h @@ -17,7 +17,9 @@ #endif #include "ControlDialog_impl.h" -#include "ParagraphParameters.h" +#include "layout.h" // for LyXAlignment + +class ParagraphParameters; /** A controller for Paragraph dialogs. */ @@ -26,6 +28,9 @@ class ControlParagraph : public ControlDialogBD public: /// ControlParagraph(LyXView &, Dialogs &); + /** Declaring this out of line allows us to forward declare + ParagraphParameters without upsetting boost::scoped_ptr. */ + ~ControlParagraph(); /// ParagraphParameters & params(); diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index be75cfbfcd..5b670bb63d 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2002-06-12 Angus Leeming + + * FormParagraph.C: include ParagraphParameters.h now that + ParagraphParameters is forward declared in ControlParagraph.h. + 2002-05-24 Martin Vermeer * FormMathsDelim.C: fix delimiter pre-display rendering diff --git a/src/frontends/xforms/FormParagraph.C b/src/frontends/xforms/FormParagraph.C index 6e2a271664..f3eb8426e9 100644 --- a/src/frontends/xforms/FormParagraph.C +++ b/src/frontends/xforms/FormParagraph.C @@ -17,6 +17,7 @@ #include "FormParagraph.h" #include "form_paragraph.h" #include "ControlParagraph.h" +#include "ParagraphParameters.h" #include "xforms_helpers.h" #include "lyxrc.h" // to set the deafult length values #include "input_validators.h" -- 2.39.2