]> git.lyx.org Git - features.git/commitdiff
Wrap most of the frontend code up inside namespace lyx::frontend.
authorAngus Leeming <leeming@lyx.org>
Wed, 19 May 2004 15:11:37 +0000 (15:11 +0000)
committerAngus Leeming <leeming@lyx.org>
Wed, 19 May 2004 15:11:37 +0000 (15:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8766 a592a061-630c-0410-9148-cb99ea01b6c8

458 files changed:
src/ChangeLog
src/LaTeXFeatures.C
src/ToolbarBackend.C
src/bufferparams.C
src/bufferparams.h
src/frontends/ChangeLog
src/frontends/Dialogs.C
src/frontends/Dialogs.h
src/frontends/LyXView.C
src/frontends/LyXView.h
src/frontends/controllers/BCView.C
src/frontends/controllers/BCView.h
src/frontends/controllers/BCView.tmpl
src/frontends/controllers/ButtonController.C
src/frontends/controllers/ButtonController.h
src/frontends/controllers/ButtonPolicies.C
src/frontends/controllers/ButtonPolicies.h
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlAboutlyx.C
src/frontends/controllers/ControlAboutlyx.h
src/frontends/controllers/ControlBibtex.C
src/frontends/controllers/ControlBibtex.h
src/frontends/controllers/ControlBox.C
src/frontends/controllers/ControlBox.h
src/frontends/controllers/ControlBranch.C
src/frontends/controllers/ControlBranch.h
src/frontends/controllers/ControlChanges.C
src/frontends/controllers/ControlChanges.h
src/frontends/controllers/ControlCharacter.C
src/frontends/controllers/ControlCharacter.h
src/frontends/controllers/ControlCitation.C
src/frontends/controllers/ControlCitation.h
src/frontends/controllers/ControlCommand.C
src/frontends/controllers/ControlCommand.h
src/frontends/controllers/ControlCommandBuffer.C
src/frontends/controllers/ControlCommandBuffer.h
src/frontends/controllers/ControlDocument.C
src/frontends/controllers/ControlDocument.h
src/frontends/controllers/ControlERT.C
src/frontends/controllers/ControlERT.h
src/frontends/controllers/ControlErrorList.C
src/frontends/controllers/ControlErrorList.h
src/frontends/controllers/ControlExternal.C
src/frontends/controllers/ControlExternal.h
src/frontends/controllers/ControlFloat.C
src/frontends/controllers/ControlFloat.h
src/frontends/controllers/ControlGraphics.C
src/frontends/controllers/ControlGraphics.h
src/frontends/controllers/ControlInclude.C
src/frontends/controllers/ControlInclude.h
src/frontends/controllers/ControlLog.C
src/frontends/controllers/ControlLog.h
src/frontends/controllers/ControlMath.C
src/frontends/controllers/ControlMath.h
src/frontends/controllers/ControlNote.C
src/frontends/controllers/ControlNote.h
src/frontends/controllers/ControlParagraph.C
src/frontends/controllers/ControlParagraph.h
src/frontends/controllers/ControlPreamble.C
src/frontends/controllers/ControlPreamble.h
src/frontends/controllers/ControlPrefs.C
src/frontends/controllers/ControlPrefs.h
src/frontends/controllers/ControlPrint.C
src/frontends/controllers/ControlPrint.h
src/frontends/controllers/ControlRef.C
src/frontends/controllers/ControlRef.h
src/frontends/controllers/ControlSearch.C
src/frontends/controllers/ControlSearch.h
src/frontends/controllers/ControlSendto.C
src/frontends/controllers/ControlSendto.h
src/frontends/controllers/ControlShowFile.C
src/frontends/controllers/ControlShowFile.h
src/frontends/controllers/ControlSpellchecker.C
src/frontends/controllers/ControlSpellchecker.h
src/frontends/controllers/ControlTabular.C
src/frontends/controllers/ControlTabular.h
src/frontends/controllers/ControlTabularCreate.C
src/frontends/controllers/ControlTabularCreate.h
src/frontends/controllers/ControlTexinfo.C
src/frontends/controllers/ControlTexinfo.h
src/frontends/controllers/ControlThesaurus.C
src/frontends/controllers/ControlThesaurus.h
src/frontends/controllers/ControlToc.C
src/frontends/controllers/ControlToc.h
src/frontends/controllers/ControlVSpace.C
src/frontends/controllers/ControlVSpace.h
src/frontends/controllers/ControlWrap.C
src/frontends/controllers/ControlWrap.h
src/frontends/controllers/Dialog.C
src/frontends/controllers/Dialog.h
src/frontends/controllers/Kernel.C
src/frontends/controllers/Kernel.h
src/frontends/controllers/biblio.C
src/frontends/controllers/biblio.h
src/frontends/controllers/character.C
src/frontends/controllers/character.h
src/frontends/controllers/frnt_lang.C
src/frontends/controllers/frnt_lang.h
src/frontends/controllers/helper_funcs.C
src/frontends/controllers/helper_funcs.h
src/frontends/controllers/tex_helpers.C
src/frontends/controllers/tex_helpers.h
src/frontends/gtk/ChangeLog
src/frontends/gtk/Dialogs.C
src/frontends/gtk/GAboutlyx.C
src/frontends/gtk/GAboutlyx.h
src/frontends/gtk/GBC.C
src/frontends/gtk/GBC.h
src/frontends/gtk/GMathDelim.C
src/frontends/gtk/GMathDelim.h
src/frontends/gtk/GMathPanel.C
src/frontends/gtk/GMathPanel.h
src/frontends/gtk/GMenubar.C
src/frontends/gtk/GMenubar.h
src/frontends/gtk/GMiniBuffer.C
src/frontends/gtk/GMiniBuffer.h
src/frontends/gtk/GPainter.C
src/frontends/gtk/GPainter.h
src/frontends/gtk/GPrint.C
src/frontends/gtk/GPrint.h
src/frontends/gtk/GScreen.C
src/frontends/gtk/GScreen.h
src/frontends/gtk/GTableCreate.C
src/frontends/gtk/GTableCreate.h
src/frontends/gtk/GText.C
src/frontends/gtk/GText.h
src/frontends/gtk/GTimeout.C
src/frontends/gtk/GTimeout.h
src/frontends/gtk/GToolbar.C
src/frontends/gtk/GToolbar.h
src/frontends/gtk/GUrl.C
src/frontends/gtk/GUrl.h
src/frontends/gtk/GView.C
src/frontends/gtk/GView.h
src/frontends/gtk/GViewBase.C
src/frontends/gtk/GViewBase.h
src/frontends/gtk/GWorkArea.C
src/frontends/gtk/GWorkArea.h
src/frontends/gtk/LyXScreenFactory.C
src/frontends/gtk/WorkAreaFactory.C
src/frontends/gtk/ghelpers.C
src/frontends/gtk/ghelpers.h
src/frontends/gtk/lyx_gui.C
src/frontends/qt2/ChangeLog
src/frontends/qt2/Dialogs.C
src/frontends/qt2/QAbout.C
src/frontends/qt2/QAbout.h
src/frontends/qt2/QAboutDialog.C
src/frontends/qt2/QAboutDialog.h
src/frontends/qt2/QBibitem.C
src/frontends/qt2/QBibitem.h
src/frontends/qt2/QBibitemDialog.C
src/frontends/qt2/QBibitemDialog.h
src/frontends/qt2/QBibtex.C
src/frontends/qt2/QBibtex.h
src/frontends/qt2/QBibtexDialog.C
src/frontends/qt2/QBibtexDialog.h
src/frontends/qt2/QBox.C
src/frontends/qt2/QBox.h
src/frontends/qt2/QBoxDialog.C
src/frontends/qt2/QBoxDialog.h
src/frontends/qt2/QBranch.C
src/frontends/qt2/QBranch.h
src/frontends/qt2/QBranchDialog.C
src/frontends/qt2/QBranchDialog.h
src/frontends/qt2/QChanges.C
src/frontends/qt2/QChanges.h
src/frontends/qt2/QChangesDialog.C
src/frontends/qt2/QChangesDialog.h
src/frontends/qt2/QCharacter.C
src/frontends/qt2/QCharacter.h
src/frontends/qt2/QCharacterDialog.C
src/frontends/qt2/QCharacterDialog.h
src/frontends/qt2/QCitation.C
src/frontends/qt2/QCitation.h
src/frontends/qt2/QCitationDialog.C
src/frontends/qt2/QCitationDialog.h
src/frontends/qt2/QCommandBuffer.C
src/frontends/qt2/QCommandBuffer.h
src/frontends/qt2/QCommandEdit.C
src/frontends/qt2/QCommandEdit.h
src/frontends/qt2/QDelimiterDialog.C
src/frontends/qt2/QDelimiterDialog.h
src/frontends/qt2/QDialogView.C
src/frontends/qt2/QDialogView.h
src/frontends/qt2/QDocument.C
src/frontends/qt2/QDocument.h
src/frontends/qt2/QDocumentDialog.C
src/frontends/qt2/QDocumentDialog.h
src/frontends/qt2/QERT.C
src/frontends/qt2/QERT.h
src/frontends/qt2/QERTDialog.C
src/frontends/qt2/QERTDialog.h
src/frontends/qt2/QErrorList.C
src/frontends/qt2/QErrorList.h
src/frontends/qt2/QErrorListDialog.C
src/frontends/qt2/QErrorListDialog.h
src/frontends/qt2/QExternal.C
src/frontends/qt2/QExternal.h
src/frontends/qt2/QExternalDialog.C
src/frontends/qt2/QExternalDialog.h
src/frontends/qt2/QFloat.C
src/frontends/qt2/QFloat.h
src/frontends/qt2/QFloatDialog.C
src/frontends/qt2/QFloatDialog.h
src/frontends/qt2/QGraphics.C
src/frontends/qt2/QGraphics.h
src/frontends/qt2/QGraphicsDialog.C
src/frontends/qt2/QGraphicsDialog.h
src/frontends/qt2/QInclude.C
src/frontends/qt2/QInclude.h
src/frontends/qt2/QIncludeDialog.C
src/frontends/qt2/QIncludeDialog.h
src/frontends/qt2/QIndex.C
src/frontends/qt2/QIndex.h
src/frontends/qt2/QIndexDialog.C
src/frontends/qt2/QIndexDialog.h
src/frontends/qt2/QLMenubar.C
src/frontends/qt2/QLMenubar.h
src/frontends/qt2/QLPopupMenu.C
src/frontends/qt2/QLPopupMenu.h
src/frontends/qt2/QLPrintDialog.C
src/frontends/qt2/QLPrintDialog.h
src/frontends/qt2/QLToolbar.C
src/frontends/qt2/QLToolbar.h
src/frontends/qt2/QLog.C
src/frontends/qt2/QLog.h
src/frontends/qt2/QLogDialog.C
src/frontends/qt2/QLogDialog.h
src/frontends/qt2/QMath.C
src/frontends/qt2/QMath.h
src/frontends/qt2/QMathDialog.C
src/frontends/qt2/QMathDialog.h
src/frontends/qt2/QMathMatrixDialog.C
src/frontends/qt2/QMathMatrixDialog.h
src/frontends/qt2/QNote.C
src/frontends/qt2/QNote.h
src/frontends/qt2/QNoteDialog.C
src/frontends/qt2/QNoteDialog.h
src/frontends/qt2/QParagraph.C
src/frontends/qt2/QParagraph.h
src/frontends/qt2/QParagraphDialog.C
src/frontends/qt2/QParagraphDialog.h
src/frontends/qt2/QPrefs.C
src/frontends/qt2/QPrefs.h
src/frontends/qt2/QPrefsDialog.C
src/frontends/qt2/QPrefsDialog.h
src/frontends/qt2/QPrint.C
src/frontends/qt2/QPrint.h
src/frontends/qt2/QRef.C
src/frontends/qt2/QRef.h
src/frontends/qt2/QRefDialog.C
src/frontends/qt2/QRefDialog.h
src/frontends/qt2/QSearch.C
src/frontends/qt2/QSearch.h
src/frontends/qt2/QSearchDialog.C
src/frontends/qt2/QSearchDialog.h
src/frontends/qt2/QSendto.C
src/frontends/qt2/QSendto.h
src/frontends/qt2/QSendtoDialog.C
src/frontends/qt2/QSendtoDialog.h
src/frontends/qt2/QShowFile.C
src/frontends/qt2/QShowFile.h
src/frontends/qt2/QShowFileDialog.C
src/frontends/qt2/QShowFileDialog.h
src/frontends/qt2/QSpellchecker.C
src/frontends/qt2/QSpellchecker.h
src/frontends/qt2/QSpellcheckerDialog.C
src/frontends/qt2/QSpellcheckerDialog.h
src/frontends/qt2/QTabular.C
src/frontends/qt2/QTabular.h
src/frontends/qt2/QTabularCreate.C
src/frontends/qt2/QTabularCreate.h
src/frontends/qt2/QTabularCreateDialog.C
src/frontends/qt2/QTabularCreateDialog.h
src/frontends/qt2/QTabularDialog.C
src/frontends/qt2/QTabularDialog.h
src/frontends/qt2/QTexinfo.C
src/frontends/qt2/QTexinfo.h
src/frontends/qt2/QTexinfoDialog.C
src/frontends/qt2/QTexinfoDialog.h
src/frontends/qt2/QThesaurus.C
src/frontends/qt2/QThesaurus.h
src/frontends/qt2/QThesaurusDialog.C
src/frontends/qt2/QThesaurusDialog.h
src/frontends/qt2/QToc.C
src/frontends/qt2/QToc.h
src/frontends/qt2/QTocDialog.C
src/frontends/qt2/QTocDialog.h
src/frontends/qt2/QURL.C
src/frontends/qt2/QURL.h
src/frontends/qt2/QURLDialog.C
src/frontends/qt2/QURLDialog.h
src/frontends/qt2/QVSpace.C
src/frontends/qt2/QVSpace.h
src/frontends/qt2/QVSpaceDialog.C
src/frontends/qt2/QVSpaceDialog.h
src/frontends/qt2/QWrap.C
src/frontends/qt2/QWrap.h
src/frontends/qt2/QWrapDialog.C
src/frontends/qt2/QWrapDialog.h
src/frontends/qt2/Qt2BC.C
src/frontends/qt2/Qt2BC.h
src/frontends/qt2/QtView.C
src/frontends/qt2/QtView.h
src/frontends/qt2/checkedwidgets.C
src/frontends/qt2/checkedwidgets.h
src/frontends/qt2/lyx_gui.C
src/frontends/xforms/Alert_pimpl.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/Color.C
src/frontends/xforms/Color.h
src/frontends/xforms/ColorHandler.C
src/frontends/xforms/ColorHandler.h
src/frontends/xforms/Dialogs.C
src/frontends/xforms/FontInfo.C
src/frontends/xforms/FontInfo.h
src/frontends/xforms/FormAboutlyx.C
src/frontends/xforms/FormAboutlyx.h
src/frontends/xforms/FormBibitem.C
src/frontends/xforms/FormBibitem.h
src/frontends/xforms/FormBibtex.C
src/frontends/xforms/FormBibtex.h
src/frontends/xforms/FormBox.C
src/frontends/xforms/FormBox.h
src/frontends/xforms/FormBranch.C
src/frontends/xforms/FormBranch.h
src/frontends/xforms/FormBrowser.C
src/frontends/xforms/FormBrowser.h
src/frontends/xforms/FormChanges.C
src/frontends/xforms/FormChanges.h
src/frontends/xforms/FormCharacter.C
src/frontends/xforms/FormCharacter.h
src/frontends/xforms/FormCitation.C
src/frontends/xforms/FormCitation.h
src/frontends/xforms/FormColorpicker.C
src/frontends/xforms/FormColorpicker.h
src/frontends/xforms/FormDialogView.C
src/frontends/xforms/FormDialogView.h
src/frontends/xforms/FormDocument.C
src/frontends/xforms/FormDocument.h
src/frontends/xforms/FormERT.C
src/frontends/xforms/FormERT.h
src/frontends/xforms/FormErrorList.C
src/frontends/xforms/FormErrorList.h
src/frontends/xforms/FormExternal.C
src/frontends/xforms/FormExternal.h
src/frontends/xforms/FormFiledialog.C
src/frontends/xforms/FormFiledialog.h
src/frontends/xforms/FormFloat.C
src/frontends/xforms/FormFloat.h
src/frontends/xforms/FormGraphics.C
src/frontends/xforms/FormGraphics.h
src/frontends/xforms/FormInclude.C
src/frontends/xforms/FormInclude.h
src/frontends/xforms/FormLog.C
src/frontends/xforms/FormLog.h
src/frontends/xforms/FormMathsBitmap.C
src/frontends/xforms/FormMathsBitmap.h
src/frontends/xforms/FormMathsDelim.C
src/frontends/xforms/FormMathsDelim.h
src/frontends/xforms/FormMathsMatrix.C
src/frontends/xforms/FormMathsMatrix.h
src/frontends/xforms/FormMathsPanel.C
src/frontends/xforms/FormMathsPanel.h
src/frontends/xforms/FormMathsSpace.C
src/frontends/xforms/FormMathsSpace.h
src/frontends/xforms/FormMathsStyle.C
src/frontends/xforms/FormMathsStyle.h
src/frontends/xforms/FormNote.C
src/frontends/xforms/FormNote.h
src/frontends/xforms/FormParagraph.C
src/frontends/xforms/FormParagraph.h
src/frontends/xforms/FormPreamble.C
src/frontends/xforms/FormPreamble.h
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/FormPreferences.h
src/frontends/xforms/FormPrint.C
src/frontends/xforms/FormPrint.h
src/frontends/xforms/FormRef.C
src/frontends/xforms/FormRef.h
src/frontends/xforms/FormSearch.C
src/frontends/xforms/FormSearch.h
src/frontends/xforms/FormSendto.C
src/frontends/xforms/FormSendto.h
src/frontends/xforms/FormShowFile.C
src/frontends/xforms/FormShowFile.h
src/frontends/xforms/FormSpellchecker.C
src/frontends/xforms/FormSpellchecker.h
src/frontends/xforms/FormTabular.C
src/frontends/xforms/FormTabular.h
src/frontends/xforms/FormTabularCreate.C
src/frontends/xforms/FormTabularCreate.h
src/frontends/xforms/FormTexinfo.C
src/frontends/xforms/FormTexinfo.h
src/frontends/xforms/FormText.C
src/frontends/xforms/FormText.h
src/frontends/xforms/FormThesaurus.C
src/frontends/xforms/FormThesaurus.h
src/frontends/xforms/FormToc.C
src/frontends/xforms/FormToc.h
src/frontends/xforms/FormUrl.C
src/frontends/xforms/FormUrl.h
src/frontends/xforms/FormVSpace.C
src/frontends/xforms/FormVSpace.h
src/frontends/xforms/FormWrap.C
src/frontends/xforms/FormWrap.h
src/frontends/xforms/LyXKeySymFactory.C
src/frontends/xforms/LyXScreenFactory.C
src/frontends/xforms/RadioButtonGroup.C
src/frontends/xforms/RadioButtonGroup.h
src/frontends/xforms/Tooltips.C
src/frontends/xforms/Tooltips.h
src/frontends/xforms/WorkAreaFactory.C
src/frontends/xforms/XFormsMenubar.C
src/frontends/xforms/XFormsMenubar.h
src/frontends/xforms/XFormsToolbar.C
src/frontends/xforms/XFormsToolbar.h
src/frontends/xforms/XFormsView.C
src/frontends/xforms/XFormsView.h
src/frontends/xforms/XLyXKeySym.C
src/frontends/xforms/XLyXKeySym.h
src/frontends/xforms/XMiniBuffer.C
src/frontends/xforms/XMiniBuffer.h
src/frontends/xforms/XPainter.C
src/frontends/xforms/XPainter.h
src/frontends/xforms/XWorkArea.C
src/frontends/xforms/XWorkArea.h
src/frontends/xforms/checkedwidgets.C
src/frontends/xforms/checkedwidgets.h
src/frontends/xforms/fdesign_base.C
src/frontends/xforms/fdesign_base.h
src/frontends/xforms/forms/fdfix.sh
src/frontends/xforms/forms/fdfixc.sed
src/frontends/xforms/forms/fdfixh.sed
src/frontends/xforms/forms_gettext.C
src/frontends/xforms/forms_gettext.h
src/frontends/xforms/lyx_gui.C
src/frontends/xforms/xfont_loader.C
src/frontends/xforms/xfont_loader.h
src/frontends/xforms/xfont_metrics.C
src/frontends/xforms/xfont_metrics.h
src/frontends/xforms/xformsBC.C
src/frontends/xforms/xformsBC.h
src/frontends/xforms/xformsImage.C
src/frontends/xforms/xformsImage.h
src/frontends/xforms/xformsTimeout.C
src/frontends/xforms/xformsTimeout.h
src/frontends/xforms/xforms_helpers.C
src/frontends/xforms/xforms_helpers.h
src/frontends/xforms/xforms_resize.C
src/frontends/xforms/xforms_resize.h
src/frontends/xforms/xscreen.C
src/frontends/xforms/xscreen.h
src/insets/ChangeLog
src/insets/insetcite.C
src/insets/insetcite.h
src/lyxfunc.C

index e9fc946a5223fd53c66df4ac5d9755cad666d72f..5d5e026ccb9058bd44c1d3726f6082e850aff2cc 100644 (file)
@@ -1,3 +1,10 @@
+2004-05-19  Angus Leeming  <leeming@lyx.org>
+
+       * LaTeXFeatures.C:
+       * ToolbarBackend.C:
+       * bufferparams.C:
+       * lyxfunc.C: small changes due to the introduction of namespace
+       lyx::frontend and the moving of namespace biblio to lyx::biblio.
 
 2004-05-18  Alfredo Braunstein  <abraunst@lyx.org>
 
index 9cbbc3288c564c9e76c60aa34443f15740d92782..9ad269db104854bbf04b5efdb9f14c4a20695592 100644 (file)
@@ -41,6 +41,8 @@ using std::ostream;
 using std::ostringstream;
 using std::set;
 
+namespace biblio = lyx::biblio;
+
 
 LaTeXFeatures::LaTeXFeatures(Buffer const & b, BufferParams const & p, bool n)
        : buffer_(&b), params_(p), nice_(n)
index 41338d58c2bd537ced81e4cc76a078626f6d7e16..1a616774cfb41ba08d82e4391473b784ae411e79 100644 (file)
@@ -212,6 +212,8 @@ void ToolbarBackend::add(Toolbar & tb,
 
 string const ToolbarBackend::getIcon(FuncRequest const & f)
 {
+       using lyx::frontend::find_xpm;
+
        string fullname;
 
        if (f.action == LFUN_INSERT_MATH) {
index 402297bb5527d44460d8e823583390f98d5006d1..d3475dd639f347f07c9577e9ec6f9d8ff6cfade7 100644 (file)
@@ -55,6 +55,8 @@ using std::ostream;
 using std::ostringstream;
 using std::pair;
 
+namespace biblio = lyx::biblio;
+
 
 struct BufferParams::Impl
 {
index 89511471141b5fdb87b9843234109a33ca1524c7..a42cf57776d073f97e89de6e83d3f3709589660a 100644 (file)
@@ -37,6 +37,7 @@ class VSpace;
 struct Language;
 
 
+namespace lyx {
 namespace biblio {
 
 enum CiteEngine {
@@ -54,6 +55,7 @@ public:
 };
 
 } // namespace biblio
+} // namespace lyx
 
 
 /** Buffer parameters.
@@ -198,7 +200,7 @@ public:
        };
        AMS use_amsmath;
        ///
-       biblio::CiteEngine cite_engine;
+       lyx::biblio::CiteEngine cite_engine;
        ///
        bool use_bibtopic;
        /// revision tracking for this buffer ?
index 4b48e0820e305fbc039b05ed5ab6c6094f2c7d6a..edd400e859db8c55333cd395514807bf367e970e 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-19  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs.[Ch]:
+       * LyXView.[Ch]: small changes due to the introduction of namespace
+       lyx::frontend and the moving of namespace biblio to lyx::biblio.
+
 2004-04-28  Angus Leeming  <leeming@lyx.org>
 
        * LyXView.[Ch]:
index 494f91fa6c7dbfc6186ca8832c2d76897c345063..328d73e562b26082524dd374c337fb2fdc7607c6 100644 (file)
@@ -21,6 +21,7 @@
 
 
 using std::string;
+using lyx::frontend::Dialog;
 
 
 // Note that static boost signals break some compilers, so this wrapper
index 955076ea8c989e8c1553b3baacee9e34f6a7d997..71135cf480febd7ee615e59abb2bb9acf8f19da4 100644 (file)
 #include <boost/utility.hpp>
 #include <boost/signals/signal0.hpp>
 
-class Dialog;
 class InsetBase;
 class LyXView;
 
+namespace lyx {
+namespace frontend {
+class Dialog;
+} // namespace frontend
+} // namespace lyx
+
 /** Container of all dialogs.
  */
 class Dialogs : boost::noncopyable
@@ -98,9 +103,9 @@ private:
        ///
        bool isValidName(std::string const & name) const;
        ///
-       Dialog * find_or_build(std::string const & name);
+       lyx::frontend::Dialog * find_or_build(std::string const & name);
        ///
-       typedef boost::shared_ptr<Dialog> DialogPtr;
+       typedef boost::shared_ptr<lyx::frontend::Dialog> DialogPtr;
        ///
        DialogPtr build(std::string const & name);
 
index 3dbf17fbb666dcd02bb23351f2970a0c38eb9441..a8d33b65f7b7804647e8b217842f49ad0ffda909 100644 (file)
@@ -48,6 +48,7 @@ using lyx::support::OnlyFilename;
 using std::endl;
 using std::string;
 
+using lyx::frontend::ControlCommandBuffer;
 
 string current_layout;
 
index 14a0633c937d7a4eb15d3c2382f08ba576ced6a6..3f2acfe95291dbca68a52f3b98545aa28d117c78 100644 (file)
@@ -24,7 +24,6 @@ class Toolbars;
 class InsetBase;
 class Intl;
 class Menubar;
-class ControlCommandBuffer;
 
 class BufferView;
 class Dialogs;
@@ -33,6 +32,12 @@ class LyXFont;
 class Timeout;
 class FuncRequest;
 
+namespace lyx {
+namespace frontend {
+class ControlCommandBuffer;
+} // namespace frontend
+} // namespace lyx
+
 /**
  * LyXView - main LyX window
  *
@@ -170,7 +175,10 @@ protected:
        /// view's command buffer controller
        // this has to be declared _after_ lyxfunc_ as its initialization depends
        // on it!
-       boost::scoped_ptr<ControlCommandBuffer> const controlcommand_;
+       typedef boost::scoped_ptr<lyx::frontend::ControlCommandBuffer>
+       CommandBufferPtr;
+
+       CommandBufferPtr const controlcommand_;
 };
 
 #endif // LYXVIEW_H
index efeb81f0c10259dc6f25e4361ed47a5abdf7336b..cbfe78f976c89a8263423e8c3c325a199ffd7d50 100644 (file)
@@ -13,6 +13,8 @@
 #include "BCView.h"
 #include "ButtonController.h"
 
+namespace lyx {
+namespace frontend {
 
 CheckedWidget::~CheckedWidget()
 {}
@@ -50,3 +52,6 @@ bool BCView::checkWidgets() const
        // return valid status after checking ALL widgets
        return valid;
 }
+
+} // namespace frontend
+} // namespace lyx
index a0f0faae30c39f38248405fbe78acea5cb1eb7e1..6227459d1b0ddf1395b5e4fefe785caa02a79d40 100644 (file)
@@ -18,6 +18,8 @@
 #include <list>
 #include <string>
 
+namespace lyx {
+namespace frontend {
 
 class ButtonController;
 class ButtonPolicy;
@@ -134,6 +136,8 @@ private:
        Widgets read_only_;
 };
 
+} // namespace frontend
+} // namespace lyx
 
 #include "BCView.tmpl"
 
index 85d093319cbd599b29d69ea2618d5eb32b4c2fb2..69e6ffbe0850a90357f0f2d58789ad5a47802248 100644 (file)
@@ -19,6 +19,9 @@
 #include "ButtonPolicies.h"
 #include "debug.h"
 
+namespace lyx {
+namespace frontend {
+
 template <class Button, class Widget>
 GuiBC<Button, Widget>::GuiBC(ButtonController const & parent,
                             std::string const & cancel, std::string const & close)
@@ -73,3 +76,6 @@ void GuiBC<Button, Widget>::refreshReadOnly() const
                setWidgetEnabled(*iter, enable);
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index 63df789dff5d4d9cb0c2083e39a097e82cfdcf6d..312a20db5f2d53fbdc412b29eb4050adfd85bdcf 100644 (file)
@@ -13,6 +13,8 @@
 #include "ButtonController.h"
 #include "BCView.h"
 
+namespace lyx {
+namespace frontend {
 
 BCView & ButtonController::view() const
 {
@@ -112,3 +114,6 @@ bool ButtonController::readOnly(bool ro) const
        view().refresh();
        return ro;
 }
+
+} // namespace frontend
+} // namespace lyx
index f387a07e2d1105feb15df63d9fc7b59d474bbd87..2e48a815470407bfcc892649830bff03aaac547d 100644 (file)
 #ifndef BUTTONCONTROLLER_H
 #define BUTTONCONTROLLER_H
 
-
 #include "ButtonPolicies.h"
-
 #include <boost/scoped_ptr.hpp>
 
+namespace lyx {
+namespace frontend {
 
 class BCView;
 
-
 /** \c ButtonController controls the activation of the OK, Apply and
  *  Cancel buttons.
  *
@@ -87,4 +86,7 @@ private:
        boost::scoped_ptr<BCView> view_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // BUTTONCONTROLLER_H
index e077364a7edcbe08fc6b1ec60701005296dbda26..31eabc72910a066fc061433eebafc601cec6e99a 100644 (file)
@@ -17,6 +17,9 @@
 using std::endl;
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 namespace {
 
 string const printState(ButtonPolicy::State const & state)
@@ -625,3 +628,6 @@ void NoRepeatedApplyPolicy::input(SMInput input)
                          "NoRepeatedApplyPolicy");
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index 564f4d7de48390077c9aa82e1957c6910531c803..3300c9a208bc44e10974633185051e5b6cc329ea 100644 (file)
@@ -21,6 +21,9 @@
 
 #include "support/std_ostream.h"
 
+namespace lyx {
+namespace frontend {
+
 /** An abstract base class for button policies.
     A state machine implementation of the various button policies used by the
     dialogs. Only the policy is implemented here.  Separate ButtonController
@@ -465,4 +468,7 @@ public:
        }
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index edeb3ef7750abceb635949ed1366a55db36acea8..5b148a6f002afe74c8109e2d2f3800aa187da353 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-19  Angus Leeming  <leeming@lyx.org>
+
+       * *.[Ch]: wrap all code up inside namespace lyx::frontend.
+       Move namespace biblio to lyx::biblio.
+
 2004-05-14  Angus Leeming  <leeming@lyx.org>
 
        * biblio.[Ch] (asValidLatexCommand): new function which examines
index ce247a617fb69d3f99cb7d8e295959b6a32cb866..55411730097c3e9f134fe683dbbf503db126d7ce 100644 (file)
 
 #include <fstream>
 
-using lyx::support::FileSearch;
-using lyx::support::MakeDisplayPath;
-using lyx::support::system_lyxdir;
-using lyx::support::user_lyxdir;
-
 using std::ostream;
 using std::ostringstream;
 using std::string;
 
 
+namespace lyx {
+
+using support::FileSearch;
+using support::MakeDisplayPath;
+using support::system_lyxdir;
+using support::user_lyxdir;
+
+namespace frontend {
+
+
 ControlAboutlyx::ControlAboutlyx(Dialog & parent)
        : Dialog::Controller(parent)
 {}
@@ -92,3 +97,6 @@ string const ControlAboutlyx::getVersion() const
 
        return ss.str();
 }
+
+} // namespace frontend
+} // namespace lyx
index 31b90aab708e06faab8bbc20f78dd8d1ccc66b9f..7cfa322b3a8835881d668abf256862b1fbf98c9f 100644 (file)
@@ -16,6 +16,9 @@
 #include "Dialog.h"
 #include <iosfwd>
 
+namespace lyx {
+namespace frontend {
+
 /** \c ControlAboutlyx is a controller for the "About LyX" dialogs.
  */
 class ControlAboutlyx : public Dialog::Controller {
@@ -40,4 +43,7 @@ public:
        //@}
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLABOUTLYX_H
index 933b666bea82f8f561a4e3b00e4789df56182b68..0675c87b89405d1035ecd0cb1389dcc6627209bf 100644 (file)
 #include "support/filetools.h"
 #include "support/globbing.h"
 
-using lyx::support::FileFilterList;
-using lyx::support::OnlyFilename;
-
 using std::pair;
 using std::string;
 using std::vector;
 
 
+namespace lyx {
+
+using support::FileFilterList;
+using support::OnlyFilename;
+
+namespace frontend {
+
+
 ControlBibtex::ControlBibtex(Dialog & d)
        : ControlCommand(d, "bibtex")
 {}
@@ -95,3 +100,6 @@ bool ControlBibtex::usingBibtopic() const
 {
     return kernel().buffer().params().use_bibtopic;
 }
+
+} // namespace frontend
+} // namespace lyx
index 405445d3be34f26b3dd6bb0ccdeba55c723934ff..cdd91ef9cb53b5bd4f98cde20d98aa9a48f5bab6 100644 (file)
 #ifndef CONTROLBIBTEX_H
 #define CONTROLBIBTEX_H
 
-
 #include "ControlCommand.h"
 #include <vector>
 
-
 namespace lyx {
 namespace support {
 
 class FileFilterList;
 
 } // namespace support
-} // namespace lyx
 
 
+namespace frontend {
+
 /** A controller for Bibtex dialogs.
  */
 class ControlBibtex : public ControlCommand {
@@ -37,7 +36,7 @@ public:
        /// Browse for a file
        std::string const browse(std::string const & in_name,
                                 std::string const & title,
-                                lyx::support::FileFilterList const & filters) const;
+                                support::FileFilterList const & filters) const;
        /// get the list of bst files
        void getBibStyles(std::vector<std::string> & data) const;
        /// get the list of bib files
@@ -49,5 +48,7 @@ public:
        bool usingBibtopic() const;
 };
 
+} // namespace frontend
+} // namespace lyx
 
 #endif // CONTROLBIBTEX_H
index 9c9e7e0ea61c320177f495ddc0d219473f61f298..789224fba6b88eda076ef89a19d38d52c76ad7cd 100644 (file)
@@ -19,6 +19,8 @@
 using std::string;
 using std::vector;
 
+namespace lyx {
+namespace frontend {
 
 ControlBox::ControlBox(Dialog & parent)
        : Dialog::Controller(parent)
@@ -80,3 +82,6 @@ void box_gui_tokens_special_length(vector<string> & ids,
        gui_names.push_back(_("Total Height"));
        gui_names.push_back(_("Width"));
 }
+
+} // namespace frontend
+} // namespace lyx
index 3a3dc33dffa638b1a359a7484b4dbded0cfab13f..0651f50bd0bd7f8d0921d54876f16710c0dd5d07 100644 (file)
@@ -18,6 +18,9 @@
 
 class InsetBoxParams;
 
+namespace lyx {
+namespace frontend {
+
 class ControlBox : public Dialog::Controller {
 public:
        ///
@@ -46,4 +49,7 @@ void box_gui_tokens(std::vector<std::string> &, std::vector<std::string> &);
 void box_gui_tokens_special_length(std::vector<std::string> &,
        std::vector<std::string> &);
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLBOX_H
index 4185fd4de61ece2293f9005986fa7f569ac103ea..aa7f97c58a561c7f99b15364fdc9c6e1b08a89fd 100644 (file)
@@ -23,6 +23,8 @@
 using std::string;
 using std::vector;
 
+namespace lyx {
+namespace frontend {
 
 ControlBranch::ControlBranch(Dialog & parent)
        : Dialog::Controller(parent)
@@ -55,3 +57,6 @@ BranchList const & ControlBranch::branchlist() const
 {
        return kernel().buffer().params().branchlist();
 }
+
+} // namespace frontend
+} // namespace lyx
index ef364107ab8eeff6cd463206a6bffe2264ff6a5e..9f6c9aa336a7bb4c9c673bae636b404ca1a06a20 100644 (file)
@@ -19,6 +19,8 @@
 class BranchList;
 class InsetBranchParams;
 
+namespace lyx {
+namespace frontend {
 
 class ControlBranch : public Dialog::Controller {
 public:
@@ -43,4 +45,7 @@ private:
        boost::scoped_ptr<InsetBranchParams> params_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLBRANCH_H
index d445ad245cc6f2bf77e26df1177405ca2a058694..d25a3fa025e3de0848249bae5c84af3e70801753 100644 (file)
 #include "lyxfind.h"
 #include "support/lstrings.h"
 
-using lyx::support::rtrim;
-
 using std::string;
 
+namespace lyx {
+
+using support::rtrim;
+
+namespace frontend {
+
 
 ControlChanges::ControlChanges(Dialog & parent)
        : Dialog::Controller(parent)
@@ -33,7 +37,7 @@ ControlChanges::ControlChanges(Dialog & parent)
 
 bool ControlChanges::find()
 {
-       return lyx::find::findNextChange(kernel().bufferview());
+       return find::findNextChange(kernel().bufferview());
 }
 
 
@@ -71,12 +75,15 @@ string const ControlChanges::getChangeAuthor()
 void ControlChanges::accept()
 {
        kernel().dispatch(FuncRequest(LFUN_ACCEPT_CHANGE));
-       lyx::find::findNextChange(kernel().bufferview());
+       find::findNextChange(kernel().bufferview());
 }
 
 
 void ControlChanges::reject()
 {
        kernel().dispatch(FuncRequest(LFUN_REJECT_CHANGE));
-       lyx::find::findNextChange(kernel().bufferview());
+       find::findNextChange(kernel().bufferview());
 }
+
+} // namespace frontend
+} // namespace lyx
index d0c918011280261b6cd7f507c6a760d06b70f7fa..f13398d0be6e3fd47edf003682f726b3da683058 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "Dialog.h"
 
+namespace lyx {
+namespace frontend {
+
 /**
  * A controller for the merge changes dialog.
  */
@@ -46,4 +49,7 @@ public:
        void reject();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLCHANGES_H
index cfb3878a2e9a9c39ec02b9e3c7f1bf8fcdcafd8e..6b3e434d8abbafb49bd7afe869390fbc78ff4bb1 100644 (file)
@@ -24,6 +24,8 @@ using bv_funcs::font2string;
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlCharacter::ControlCharacter(Dialog & parent)
        : Dialog::Controller(parent),
@@ -42,7 +44,7 @@ bool ControlCharacter::initialiseParams(string const &)
            getSeries()   != LyXFont::IGNORE_SERIES ||
            getShape()    != LyXFont::IGNORE_SHAPE  ||
            getSize()     != LyXFont::IGNORE_SIZE ||
-           getBar()      != frnt::IGNORE ||
+           getBar()      != IGNORE ||
            getColor()    != LColor::ignore ||
            font_->language() != ignore_language)
                dialog().bc().valid();
@@ -124,51 +126,51 @@ void ControlCharacter::setSize(LyXFont::FONT_SIZE val)
 }
 
 
-frnt::FONT_STATE ControlCharacter::getBar() const
+FONT_STATE ControlCharacter::getBar() const
 {
        if (!font_.get())
-               return frnt::IGNORE;
+               return IGNORE;
 
        if (font_->emph() == LyXFont::TOGGLE)
-               return frnt::EMPH_TOGGLE;
+               return EMPH_TOGGLE;
 
        if (font_->underbar() == LyXFont::TOGGLE)
-               return frnt::UNDERBAR_TOGGLE;
+               return UNDERBAR_TOGGLE;
 
        if (font_->noun() == LyXFont::TOGGLE)
-               return frnt::NOUN_TOGGLE;
+               return NOUN_TOGGLE;
 
        if (font_->emph() == LyXFont::IGNORE &&
            font_->underbar() == LyXFont::IGNORE &&
            font_->noun() == LyXFont::IGNORE)
-               return frnt::IGNORE;
+               return IGNORE;
 
-       return frnt::INHERIT;
+       return INHERIT;
 }
 
 
-void ControlCharacter::setBar(frnt::FONT_STATE val)
+void ControlCharacter::setBar(FONT_STATE val)
 {
        switch (val) {
-       case frnt::IGNORE:
+       case IGNORE:
                font_->setEmph(LyXFont::IGNORE);
                font_->setUnderbar(LyXFont::IGNORE);
                font_->setNoun(LyXFont::IGNORE);
                break;
 
-       case frnt::EMPH_TOGGLE:
+       case EMPH_TOGGLE:
                font_->setEmph(LyXFont::TOGGLE);
                break;
 
-       case frnt::UNDERBAR_TOGGLE:
+       case UNDERBAR_TOGGLE:
                font_->setUnderbar(LyXFont::TOGGLE);
                break;
 
-       case frnt::NOUN_TOGGLE:
+       case NOUN_TOGGLE:
                font_->setNoun(LyXFont::TOGGLE);
                break;
 
-       case frnt::INHERIT:
+       case INHERIT:
                font_->setEmph(LyXFont::INHERIT);
                font_->setUnderbar(LyXFont::INHERIT);
                font_->setNoun(LyXFont::INHERIT);
@@ -239,3 +241,6 @@ void ControlCharacter::setToggleAll(bool t)
 {
        toggleall_ = t;
 }
+
+} // namespace frontend
+} // namespace lyx
index fe45b6aee54a992d79fc2c405518ab8a2b1c66b2..9740cbf8f068fb6a1f558448213e79c65ea426c1 100644 (file)
@@ -19,6 +19,8 @@
 
 class LColor_color;
 
+namespace lyx {
+namespace frontend {
 
 class ControlCharacter : public Dialog::Controller {
 public:
@@ -42,7 +44,7 @@ public:
        ///
        void setSize(LyXFont::FONT_SIZE);
        ///
-       void setBar(frnt::FONT_STATE);
+       void setBar(FONT_STATE);
        ///
        void setColor(LColor_color);
        ///
@@ -59,7 +61,7 @@ public:
        ///
        LyXFont::FONT_SIZE getSize() const;
        ///
-       frnt::FONT_STATE getBar() const;
+       FONT_STATE getBar() const;
        ///
        LColor_color getColor() const;
        ///
@@ -73,4 +75,7 @@ private:
        bool toggleall_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLCHARACTER_H
index 2770d992fecb2fee74b5bb98379102973eb0d24e..b7f755dbe29b04e1e7f5aa8b4f1cbc66a4f2a9cf 100644 (file)
@@ -20,6 +20,8 @@ using std::string;
 using std::vector;
 using std::pair;
 
+namespace lyx {
+namespace frontend {
 
 vector<biblio::CiteStyle> ControlCitation::citeStyles_;
 
@@ -94,3 +96,6 @@ vector<string> const ControlCitation::getCiteStrings(string const & key) const
 
        return styles;
 }
+
+} // namespace frontend
+} // namespace lyx
index 260707fb0842f2f132c8cdca023d0ef117cf460d..5dc10ad44ec3db340f3e9a6e11c61536ae3bb515 100644 (file)
@@ -16,6 +16,9 @@
 #include "ControlCommand.h"
 #include "biblio.h"
 
+namespace lyx {
+namespace frontend {
+
 /** A controller for Citation dialogs.
  */
 class ControlCitation : public ControlCommand {
@@ -54,5 +57,7 @@ private:
        static std::vector<biblio::CiteStyle> citeStyles_;
 };
 
+} // namespace frontend
+} // namespace lyx
 
 #endif // CONTROLCITATION_H
index 7812507f462e0abd9df36fc05b8ff2896de4144a..9086ac4cabf229f44edf0e17147b9303f610438c 100644 (file)
@@ -18,6 +18,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlCommand::ControlCommand(Dialog & dialog, string const & lfun_name)
        : Dialog::Controller(dialog),
@@ -49,3 +51,6 @@ void ControlCommand::dispatchParams()
                                                              params_);
        kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
 }
+
+} // namespace frontend
+} // namespace lyx
index 0174bf858292a9840f58b1f7523c043d086c2d11..b7f99d15a2d58fd305b8dc631fb24a93addf5e44 100644 (file)
@@ -19,6 +19,8 @@
 #include "Dialog.h"
 #include "insets/insetcommandparams.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlCommand : public Dialog::Controller {
 public:
@@ -47,5 +49,7 @@ private:
        std::string const lfun_name_;
 };
 
+} // namespace frontend
+} // namespace lyx
 
 #endif // CONTROLCOMMAND_H
index 03055ddc65d9fce01dd109f339f7f9c38e0373ab..68cdd703c15393c3bce60378173c77aa4e4670b9 100644 (file)
 #include "support/lyxalgo.h"
 #include "support/lstrings.h"
 
-using lyx::support::prefixIs;
-
 using std::back_inserter;
 using std::transform;
 using std::string;
 using std::vector;
 
+namespace lyx {
+
+using support::prefixIs;
+
+namespace frontend {
 
 namespace {
 
@@ -51,7 +54,7 @@ ControlCommandBuffer::ControlCommandBuffer(LyXView & lv)
        : lv_(lv), history_pos_(history_.end())
 {
        transform(lyxaction.func_begin(), lyxaction.func_end(),
-               back_inserter(commands_), lyx::firster());
+               back_inserter(commands_), firster());
 }
 
 
@@ -86,7 +89,7 @@ ControlCommandBuffer::completions(string const & prefix, string & new_prefix)
 {
        vector<string> comp;
 
-       lyx::copy_if(commands_.begin(), commands_.end(),
+       copy_if(commands_.begin(), commands_.end(),
                back_inserter(comp), prefix_p(prefix));
 
        if (comp.empty()) {
@@ -106,7 +109,7 @@ ControlCommandBuffer::completions(string const & prefix, string & new_prefix)
                test += tmp[test.length()];
        while (test.length() < tmp.length()) {
                vector<string> vtmp;
-               lyx::copy_if(comp.begin(), comp.end(),
+               copy_if(comp.begin(), comp.end(),
                        back_inserter(vtmp), prefix_p(test));
                if (vtmp.size() != comp.size()) {
                        test.erase(test.length() - 1);
@@ -129,3 +132,6 @@ void ControlCommandBuffer::dispatch(string const & str)
        history_pos_ = history_.end();
        lv_.getLyXFunc().dispatch(lyxaction.lookupFunc(str), true);
 }
+
+} // namespace frontend
+} // namespace lyx
index 124cc668a09e2d293cb6ecb1c7d047811ee2d434..0beb3a10e87940e197a1940082d3e1c021cc1301 100644 (file)
@@ -20,6 +20,9 @@
 
 class LyXView;
 
+namespace lyx {
+namespace frontend {
+
 /**
  * ControlCommandBuffer
  *
@@ -59,4 +62,7 @@ private:
        std::vector<std::string>::const_iterator history_pos_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLCOMMANDBUFFER_H
index 5dc34b009578a9156c9ecd3848eec6593cf93671..f614db1e3342c83f5fceb6a607788b6e080038e8 100644 (file)
@@ -26,6 +26,8 @@
 using std::ostringstream;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlDocument::ControlDocument(Dialog & parent)
        : Dialog::Controller(parent)
@@ -83,9 +85,9 @@ void ControlDocument::dispatchParams()
        setLanguage();
 
        // Set the document class.
-       lyx::textclass_type const old_class =
+       textclass_type const old_class =
                kernel().buffer().params().textclass;
-       lyx::textclass_type const new_class = bp_->textclass;
+       textclass_type const new_class = bp_->textclass;
 
        if (new_class != old_class) {
                string const name = textclasslist[new_class].name();
@@ -130,7 +132,7 @@ void ControlDocument::setLanguage() const
 }
 
 
-bool ControlDocument::loadTextclass(lyx::textclass_type tc) const
+bool ControlDocument::loadTextclass(textclass_type tc) const
 {
        string const name = textclasslist[tc].name();
        kernel().dispatch(FuncRequest(LFUN_TEXTCLASS_LOAD, name));
@@ -145,3 +147,6 @@ void ControlDocument::saveAsDefault() const
 {
        dispatch_bufferparams(kernel(), params(), LFUN_SAVE_AS_DEFAULT);
 }
+
+} // namespace frontend
+} // namespace lyx
index f761a787ffcb64e39b354a52463be60fa944cc7a..7197e55ec682ca837e325df4245deb991417e7ed 100644 (file)
@@ -19,6 +19,8 @@
 class BufferParams;
 class LyXTextClass;
 
+namespace lyx {
+namespace frontend {
 
 /** A controller for Document dialogs.
  */
@@ -45,10 +47,13 @@ public:
        ///
        void saveAsDefault() const;
        ///
-       bool loadTextclass(lyx::textclass_type tc) const;
+       bool loadTextclass(textclass_type tc) const;
 private:
        ///
        boost::scoped_ptr<BufferParams> bp_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLDOCUMENT_H
index 9f1209b9f5e1366be8e74daaee85de8c05cbab4c..3e366eaaa4e387aa3fc82106e588b72d2ef102dc 100644 (file)
@@ -17,6 +17,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlERT::ControlERT(Dialog & parent)
        : Dialog::Controller(parent), status_(InsetERT::Collapsed)
@@ -41,3 +43,6 @@ void ControlERT::dispatchParams()
        string const lfun = InsetERTMailer::params2string(status_);
        kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
 }
+
+} // namespace frontend
+} // namespace lyx
index 44885238aa27a3175c2db274cb2e99531b1732d8..a68078b33ea2ced394442edbef2c06f1fac5c153 100644 (file)
@@ -17,6 +17,8 @@
 #include "Dialog.h"
 #include "insets/insetert.h" // InsetERT::ERTStatus
 
+namespace lyx {
+namespace frontend {
 
 class ControlERT : public Dialog::Controller {
 public:
@@ -39,4 +41,7 @@ private:
        InsetCollapsable::CollapseStatus status_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 73b8855e91fe49c380e2e5c189a4b0b41f32b5e3..a7d8c9be06cf44ab5ff26d9f05caa57a6cc35ed8 100644 (file)
@@ -21,6 +21,8 @@
 using std::endl;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlErrorList::ControlErrorList(Dialog & d)
        : Dialog::Controller(d)
@@ -66,9 +68,9 @@ void ControlErrorList::goTo(int item)
                return;
        }
 
-       lyx::pos_type const end = std::min(err.pos_end, pit->size());
-       lyx::pos_type const start = std::min(err.pos_start, end);
-       lyx::pos_type const range = end - start;
+       pos_type const end = std::min(err.pos_end, pit->size());
+       pos_type const start = std::min(err.pos_start, end);
+       pos_type const range = end - start;
 
        // Now make the selection.
 #ifdef WITH_WARNINGS
@@ -80,3 +82,6 @@ void ControlErrorList::goTo(int item)
        kernel().bufferview()->putSelectionAt(pos, range, false);
 #endif
 }
+
+} // namespace frontend
+} // namespace lyx
index 9dfc6159488e5ae932ff04d179a302ad40557722..17d3ec1a41d7e9528f4176ac774baa19903ca6e1 100644 (file)
 #include "errorlist.h"
 #include "Dialog.h"
 
-
+namespace lyx {
+namespace frontend {
 
 /** A controller for the ErrorList dialog.
  */
-
-
 class ControlErrorList : public Dialog::Controller {
 public:
        ///
@@ -47,4 +46,7 @@ private:
        std::string name_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLERRORLIST_H
index 8e0797deeace05484392a2eee003ff6679380240..f4c75bd1870e0869a2505adbbb19773a4919b71d 100644 (file)
 #include "support/globbing.h"
 #include "support/tostr.h"
 
-namespace external = lyx::external;
-
-using lyx::support::FileFilterList;
-using lyx::support::MakeAbsPath;
-using lyx::support::readBB_from_PSFile;
-
 using std::advance;
 using std::vector;
 using std::string;
 
+namespace lyx {
+
+using support::FileFilterList;
+using support::MakeAbsPath;
+using support::readBB_from_PSFile;
+
+namespace frontend {
+
 
 ControlExternal::ControlExternal(Dialog & parent)
        : Dialog::Controller(parent),
@@ -177,9 +179,9 @@ string const ControlExternal::readBB(string const & file)
        int width = 0;
        int height = 0;
 
-       lyx::graphics::Cache & gc = lyx::graphics::Cache::get();
+       graphics::Cache & gc = graphics::Cache::get();
        if (gc.inCache(abs_file)) {
-               lyx::graphics::Image const * image = gc.item(abs_file)->image();
+               graphics::Image const * image = gc.item(abs_file)->image();
 
                if (image) {
                        width  = image->getWidth();
@@ -190,27 +192,32 @@ string const ControlExternal::readBB(string const & file)
        return ("0 0 " + tostr(width) + ' ' + tostr(height));
 }
 
+} // namespace frontend
+
+
+namespace external {
 
 namespace {
 
-external::RotationDataType origins_array[] = {
-       external::RotationData::DEFAULT,
-       external::RotationData::TOPLEFT,
-       external::RotationData::BOTTOMLEFT,
-       external::RotationData::BASELINELEFT,
-       external::RotationData::CENTER,
-       external::RotationData::TOPCENTER,
-       external::RotationData::BOTTOMCENTER,
-       external::RotationData::BASELINECENTER,
-       external::RotationData::TOPRIGHT,
-       external::RotationData::BOTTOMRIGHT,
-       external::RotationData::BASELINERIGHT
+RotationDataType origins_array[] = {
+       RotationData::DEFAULT,
+       RotationData::TOPLEFT,
+       RotationData::BOTTOMLEFT,
+       RotationData::BASELINELEFT,
+       RotationData::CENTER,
+       RotationData::TOPCENTER,
+       RotationData::BOTTOMCENTER,
+       RotationData::BASELINECENTER,
+       RotationData::TOPRIGHT,
+       RotationData::BOTTOMRIGHT,
+       RotationData::BASELINERIGHT
 };
 
-lyx::size_type const origins_array_size =
+
+size_type const origins_array_size =
 sizeof(origins_array) / sizeof(origins_array[0]);
 
-vector<external::RotationDataType> const
+vector<RotationDataType> const
 origins(origins_array, origins_array + origins_array_size);
 
 // These are the strings, corresponding to the above, that the GUI should
@@ -224,8 +231,6 @@ char const * const origin_gui_strs[] = {
 
 } // namespace anon
 
-namespace lyx {
-namespace external {
 
 vector<RotationDataType> const & all_origins()
 {
index 604bc98e937512db0ab07d8389949b1f28eba825..da404970d3cc2d44b888f91ff830b7e674abbede 100644 (file)
 class InsetExternalParams;
 
 namespace lyx {
+
 namespace external {
+
 class Template;
 class RotationDataType;
+
 } // namespace external
-} // namespace lyx
 
 
+namespace frontend {
+
 class ControlExternal : public Dialog::Controller {
 public:
        ///
@@ -59,7 +63,7 @@ public:
        ///
        int getTemplateNumber(std::string const &) const;
        ///
-       lyx::external::Template getTemplate(int) const;
+       external::Template getTemplate(int) const;
        ///
        std::string const browse(std::string const & input_file,
                                 std::string const & tempalate_name) const;
@@ -75,12 +79,13 @@ private:
        bool bb_changed_;
 };
 
+} // namespace frontend
+
 
-namespace lyx {
 namespace external {
 
 std::vector<RotationDataType> const & all_origins();
-std::string const origin_gui_str(lyx::size_type i);
+std::string const origin_gui_str(size_type i);
 
 } // namespace external
 } // namespace lyx
index 0d54cc6eefa13f36e0a502a019be0666ba47c122..52140728268616641aa3b86af4f16a713acf31db 100644 (file)
@@ -17,6 +17,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlFloat::ControlFloat(Dialog & parent)
        : Dialog::Controller(parent)
@@ -43,3 +45,6 @@ void ControlFloat::dispatchParams()
        string const lfun = InsetFloatMailer::params2string(params());
        kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
 }
+
+} // namespace frontend
+} // namespace lyx
index f0bb07aaa33a13125befda65fe37320b7ea954d0..af4797414ac9998c616bbea42117524c7d7cdc90 100644 (file)
@@ -16,6 +16,9 @@
 
 class InsetFloatParams;
 
+namespace lyx {
+namespace frontend {
+
 class ControlFloat : public Dialog::Controller {
 public:
        ///
@@ -37,4 +40,7 @@ private:
        boost::scoped_ptr<InsetFloatParams> params_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index c546da8e15c0217ae25b564af471faccd2a9781d..d7ca70aacfb960394d76ad0766e1b0c691c8a611 100644 (file)
 #include "support/tostr.h"
 #include "support/types.h"
 
-using lyx::support::AddName;
-using lyx::support::FileFilterList;
-using lyx::support::FileInfo;
-using lyx::support::IsFileReadable;
-using lyx::support::MakeAbsPath;
-using lyx::support::readBB_from_PSFile;
-using lyx::support::system_lyxdir;
-using lyx::support::user_lyxdir;
-
 using std::make_pair;
 using std::string;
 using std::pair;
 using std::vector;
 
+namespace lyx {
+
+using support::AddName;
+using support::FileFilterList;
+using support::FileInfo;
+using support::IsFileReadable;
+using support::MakeAbsPath;
+using support::readBB_from_PSFile;
+using support::system_lyxdir;
+using support::user_lyxdir;
+
+namespace frontend {
+
 
 ControlGraphics::ControlGraphics(Dialog & parent)
        : Dialog::Controller(parent)
@@ -111,9 +115,9 @@ string const ControlGraphics::readBB(string const & file)
        int width = 0;
        int height = 0;
 
-       lyx::graphics::Cache & gc = lyx::graphics::Cache::get();
+       graphics::Cache & gc = graphics::Cache::get();
        if (gc.inCache(abs_file)) {
-               lyx::graphics::Image const * image = gc.item(abs_file)->image();
+               graphics::Image const * image = gc.item(abs_file)->image();
 
                if (image) {
                        width  = image->getWidth();
@@ -143,7 +147,6 @@ void ControlGraphics::editGraphics()
        kernel().dispatch(FuncRequest(LFUN_GRAPHICS_EDIT, lfun));
 }
 
-namespace frnt {
 
 namespace {
 
@@ -186,7 +189,7 @@ vector<RotationOriginPair> getRotationOriginData()
                return data;
 
        data.resize(rorigin_size);
-       for (lyx::size_type i = 0; i < rorigin_size; ++i) {
+       for (size_type i = 0; i < rorigin_size; ++i) {
                data[i] = make_pair(_(rorigin_gui_strs[i]),
                                    rorigin_lyx_strs[i]);
        }
@@ -194,4 +197,5 @@ vector<RotationOriginPair> getRotationOriginData()
        return data;
 }
 
-} // namespace frnt
+} // namespace frontend
+} // namespace lyx
index 3fec003e1945963361fae0cbaa6cf9e39f61f49a..39e408ab0d8685d9d967b9acdb17a4efa24eefc6 100644 (file)
@@ -23,9 +23,11 @@ class InsetGraphics;
 class InsetGraphicsParams;
 class LyXView;
 
+namespace lyx {
+namespace frontend {
+
 /** A controller for Graphics dialogs.
  */
-
 class ControlGraphics : public Dialog::Controller {
 public:
        ///
@@ -59,7 +61,6 @@ private:
        boost::scoped_ptr<InsetGraphicsParams> params_;
 };
 
-namespace frnt {
 
 /// get the units for the bounding box
 std::vector<std::string> const getBBUnits();
@@ -69,6 +70,7 @@ typedef std::pair<std::string, std::string> RotationOriginPair;
 ///
 std::vector<RotationOriginPair> getRotationOriginData();
 
-} // namespace frnt
+} // namespace frontend
+} // namespace lyx
 
 #endif // CONTROLGRAPHICS_H
index 513339d96e8c2265ed2f946862a53f3ce8337778..da2ec7a7fdeefe39fea27ab475de1d5fa91c4476 100644 (file)
 
 #include <utility>
 
-using lyx::support::FileFilterList;
-using lyx::support::IsFileReadable;
-using lyx::support::MakeAbsPath;
-using lyx::support::OnlyPath;
-
 using std::pair;
 using std::string;
 
+namespace lyx {
+
+using support::FileFilterList;
+using support::IsFileReadable;
+using support::MakeAbsPath;
+using support::OnlyPath;
+
+namespace frontend {
 
 ControlInclude::ControlInclude(Dialog & parent)
        : Dialog::Controller(parent)
@@ -110,3 +113,6 @@ bool ControlInclude::fileExists(string const & file)
 
        return false;
 }
+
+} // namespace frontend
+} // namespace lyx
index eeb62c3f942f37c0b7a9721d257828d0852eebd6..41c23cd7733923d31aa2323ec02150c8787004d5 100644 (file)
@@ -18,6 +18,8 @@
 #include "Dialog.h"
 #include "insets/insetcommandparams.h"
 
+namespace lyx {
+namespace frontend {
 
 /** A controller for the Include file dialog.
  */
@@ -62,4 +64,7 @@ private:
        InsetCommandParams params_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLINCLUDE_H
index f83803a29b0acdb035949d2b297d644c60b13af6..dad828aaba69ab3502ee89751e13443e9b8239ec 100644 (file)
@@ -24,6 +24,8 @@ using std::istringstream;
 using std::ostream;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlLog::ControlLog(Dialog & parent)
        : Dialog::Controller(parent),
@@ -115,3 +117,6 @@ void ControlLog::getContents(std::ostream & ss) const
                break;
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index 699cab0c256f0ac1f27f80707a9b1df09a58e5ce..4ee3a03c9bdbe42e7aadae482f8632851d202932 100644 (file)
@@ -15,6 +15,9 @@
 
 #include "Dialog.h"
 
+namespace lyx {
+namespace frontend {
+
 /**
  * A controller for a read-only text browser.
  */
@@ -51,4 +54,7 @@ private:
        std::string logfile_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLLOG_H
index fa848a34f8ef95987df5d0eb63481a5f71f2ed04..ffdf67d49a52248f9b71d83b8125adae0be5dfeb 100644 (file)
 #include "support/lstrings.h"
 #include "support/filetools.h"
 
-using lyx::support::compare;
-using lyx::support::LibFileSearch;
-using lyx::support::subst;
-
 using std::string;
 
+namespace lyx {
+
+using support::compare;
+using support::LibFileSearch;
+using support::subst;
+
+namespace frontend {
 
 ControlMath::ControlMath(Dialog & dialog)
        : Dialog::Controller(dialog)
@@ -344,7 +347,7 @@ string const find_xpm(string const & name)
 {
        XPMmap const * const begin = sorted_xpm_map;
        XPMmap const * const end = begin + nr_sorted_xpm_map;
-       BOOST_ASSERT(lyx::sorted(begin, end));
+       BOOST_ASSERT(sorted(begin, end));
 
        XPMmap const * const it =
                std::find_if(begin, end, CompareKey(name));
@@ -372,3 +375,6 @@ string const find_xpm(string const & name)
 
        return LibFileSearch("images/math/", xpm_name, "xpm");
 }
+
+} // namespace frontend
+} // namespace lyx
index 129cf8cd234b5433540d9bdbf8050a4dadbb0a4a..0f220775ae9b2f33555a4c80146f1f3262c46c03 100644 (file)
@@ -18,6 +18,8 @@
 #include "Dialog.h"
 #include "lfuns.h" // for kb_action
 
+namespace lyx {
+namespace frontend {
 
 class ControlMath : public Dialog::Controller {
 public:
@@ -87,4 +89,7 @@ extern int const nr_latex_ams_ops;
  */
 std::string const find_xpm(std::string const & name);
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // NOT CONTROLMATH
index b7f66a038b593d5fb9891195d1c2788ed1700470..8b7e48ef2e9d6654975a2aee5e6e85f48d7a9030 100644 (file)
@@ -18,6 +18,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlNote::ControlNote(Dialog & parent)
        : Dialog::Controller(parent)
@@ -44,3 +46,6 @@ void ControlNote::dispatchParams()
        string const lfun = InsetNoteMailer::params2string(params());
        kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
 }
+
+} // namespace frontend
+} // namespace lyx
index ad504e9e183c0f0d55ad2aa7990026d2cc5141e8..a2fc7592e00b63ce25a0f83fed5d57d12e2c7736 100644 (file)
@@ -18,6 +18,9 @@
 
 class InsetNoteParams;
 
+namespace lyx {
+namespace frontend {
+
 class ControlNote : public Dialog::Controller {
 public:
        ///
@@ -40,4 +43,7 @@ private:
        boost::scoped_ptr<InsetNoteParams> params_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLNOTE_H
index 0af8e5b9b98cbc9bee26c5f1729eec278fffca59..4d597ddcc43bbe7c3df592e6839a636f5e19789c 100644 (file)
@@ -24,6 +24,8 @@ using std::istringstream;
 using std::ostringstream;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlParagraph::ControlParagraph(Dialog & parent)
        : Dialog::Controller(parent), ininset_(false)
@@ -157,3 +159,6 @@ LyXAlignment ControlParagraph::alignDefault() const
 {
        return aligndefault_;
 }
+
+} // namespace frontend
+} // namespace lyx
index 7375545538ad062bc8ec6901bcb77025f44ffe36..6daf2caf21bff03fac710a5985d52af5435f8a0f 100644 (file)
@@ -17,6 +17,9 @@
 
 class ParagraphParameters;
 
+namespace lyx {
+namespace frontend {
+
 class ControlParagraph : public Dialog::Controller {
 public:
        ///
@@ -51,4 +54,7 @@ private:
        LyXAlignment aligndefault_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLPARAGRAPH_H
index c63377d994f15b5312f7308f37b3999c4b1b2267..6f779099fc4475b4ee7bb2bf692febf78280daa3 100644 (file)
@@ -17,6 +17,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlPreamble::ControlPreamble(Dialog & parent)
        : Dialog::Controller(parent)
@@ -57,3 +59,6 @@ void ControlPreamble::params(string const & newparams)
 {
        params_ = newparams;
 }
+
+} // namespace frontend
+} // namespace lyx
index 931da035da53fd37c3ae8d9d5fa8edeb5129e75c..7a70ddec19b173187c90b9bad41f6276d49c4405 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "Dialog.h"
 
+namespace lyx {
+namespace frontend {
+
 /** A controller for Preamble dialogs.
  */
 class ControlPreamble : public Dialog::Controller {
@@ -38,4 +41,7 @@ private:
        std::string params_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLPREAMBLE_H
index 12f6b7e07fcbef013ab929bea86810baa8aa01b9..7da7e88683efcf3c8736f5b9ff32502d22c3d6c6 100644 (file)
 
 #include "support/std_sstream.h"
 
-using lyx::support::AddName;
-using lyx::support::FileFilterList;
-using lyx::support::system_lyxdir;
-using lyx::support::user_lyxdir;
-
 using std::ostringstream;
 using std::pair;
 using std::string;
@@ -39,6 +34,16 @@ using std::vector;
 
 extern BufferList bufferlist;
 
+namespace lyx {
+
+using support::AddName;
+using support::FileFilterList;
+using support::system_lyxdir;
+using support::user_lyxdir;
+
+namespace frontend {
+
+
 ControlPrefs::ControlPrefs(Dialog & parent)
        : Dialog::Controller(parent),
          redraw_gui_(false),
@@ -171,3 +176,6 @@ string const ControlPrefs::browsedir(string const & path,
 {
        return browseDir(path, title);
 }
+
+} // namespace frontend
+} // namespace lyx
index d6e0393457bd171900406c435597738b8e86cae6..8093de5634eae358e16e6cac11bacdd5c484d315 100644 (file)
@@ -22,6 +22,8 @@
 
 class LColor_color;
 
+namespace lyx {
+namespace frontend {
 
 class ControlPrefs : public Dialog::Controller {
 public:
@@ -84,4 +86,7 @@ private:
        bool update_screen_font_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLPREFS_H
index 747e55b2bc1d9116ecd28857d30488b2bbfbfed3..38844fb6d23c694b321e6a66561c52dfa2ce6db8 100644 (file)
 #include "support/filetools.h"
 #include "support/globbing.h"
 
-using lyx::support::ChangeExtension;
-using lyx::support::FileFilterList;
-
 using std::string;
 
+namespace lyx {
+
+using support::ChangeExtension;
+using support::FileFilterList;
+
+namespace frontend {
+
+
 ControlPrint::ControlPrint(Dialog & parent)
        : Dialog::Controller(parent),
          params_(0)
@@ -136,3 +141,6 @@ void ControlPrint::dispatchParams()
        string const data = target + " " + target_name + " " + command;
        kernel().dispatch(FuncRequest(LFUN_PRINT, data));
 }
+
+} // namespace frontend
+} // namespace lyx
index d847bb9edf995d8c1ee8a185a9aa61792dc210ab..224a57f13c31cf837256432f4fb0c2426fef7008 100644 (file)
@@ -18,6 +18,9 @@
 
 class PrinterParams;
 
+namespace lyx {
+namespace frontend {
+
 /** A controller for Print dialogs.
  */
 class ControlPrint : public Dialog::Controller {
@@ -42,4 +45,7 @@ private:
        boost::scoped_ptr<PrinterParams> params_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLPRINT_H
index a66dc273f8d69fd078bf374bb22ac345d202e0be..61692c0f710e4a450363c2ab8388529b6468e32b 100644 (file)
 
 #include "support/filetools.h" // MakeAbsPath, MakeDisplayPath
 
-using lyx::support::MakeAbsPath;
-using lyx::support::MakeDisplayPath;
-
 using std::vector;
 using std::string;
 
 
 extern BufferList bufferlist;
 
+namespace lyx {
+
+using support::MakeAbsPath;
+using support::MakeDisplayPath;
+
+namespace frontend {
 
 ControlRef::ControlRef(Dialog & d)
        : ControlCommand(d, "ref")
@@ -82,3 +85,6 @@ string const ControlRef::getBufferName(int num) const
 {
        return bufferlist.getFileNames()[num];
 }
+
+} // namespace frontend
+} // namespace lyx
index d9181bc456d5990eae23174a01565a3708528b73..eeefb38c4856eee59189516083473d9c4abdd577 100644 (file)
@@ -16,6 +16,8 @@
 #include "ControlCommand.h"
 #include <vector>
 
+namespace lyx {
+namespace frontend {
 
 /** A controller for the Ref Dialog.
  */
@@ -41,4 +43,7 @@ private:
        virtual bool disconnectOnApply() const { return true; }
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLREF_H
index 0002aaa0cd8e47dcab310f86646400a065076e76..b0e46a52dcc0680f0ef0d5baa5c7f834a7bdb4c2 100644 (file)
@@ -17,6 +17,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlSearch::ControlSearch(Dialog & parent)
        : Dialog::Controller(parent)
@@ -26,8 +28,8 @@ ControlSearch::ControlSearch(Dialog & parent)
 void ControlSearch::find(string const & search, bool casesensitive,
                         bool matchword, bool forward)
 {
-       string const data = lyx::find::find2string(search, casesensitive,
-                                                  matchword, forward);
+       string const data = find::find2string(search, casesensitive,
+                                             matchword, forward);
        kernel().dispatch(FuncRequest(LFUN_WORD_FIND, data));
 }
 
@@ -37,7 +39,10 @@ void ControlSearch::replace(string const & search, string const & replace,
                            bool forward, bool all)
 {
        string const data =
-               lyx::find::replace2string(search, replace, casesensitive,
-                                         matchword, all, forward);
+               find::replace2string(search, replace, casesensitive,
+                                    matchword, all, forward);
        kernel().dispatch(FuncRequest(LFUN_WORD_REPLACE, data));
 }
+
+} // namespace frontend
+} // namespace lyx
index 09c2be55454d10fab413bc6c1b2cee4e1d35d698..b5707c54dd00e5b60b5f6a185a4a0bc9aa3cfd8f 100644 (file)
@@ -14,6 +14,8 @@
 
 #include "Dialog.h"
 
+namespace lyx {
+namespace frontend {
 
 /** A controller for Search dialogs.
  */
@@ -36,4 +38,7 @@ public:
                     bool forward, bool all);
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLSEARCH_H
index 4daa3abde5a27f872e40378d5380708de557d912..fb35d3102ae9fb732c177ab40788196a6658d594 100644 (file)
 #include "support/filetools.h"
 #include "support/lstrings.h"
 
-using lyx::support::AddName;
-using lyx::support::trim;
-
 using std::vector;
 using std::string;
 
+namespace lyx {
+
+using support::AddName;
+using support::trim;
+
+namespace frontend {
+
 
 ControlSendto::ControlSendto(Dialog & parent)
        : Dialog::Controller(parent)
@@ -110,3 +114,6 @@ void ControlSendto::setCommand(string const & cmd)
 {
        command_ = trim(cmd);
 }
+
+} // namespace frontend
+} // namespace lyx
index f8e8c048081b2d1800a047ffc3281d98220f9853..d10a440f19e6801cb769f0fa0f1f787cb2efc69f 100644 (file)
@@ -17,6 +17,9 @@
 
 class Format;
 
+namespace lyx {
+namespace frontend {
+
 /** A controller for the Custom Export dialogs.
  */
 class ControlSendto : public Dialog::Controller {
@@ -49,4 +52,7 @@ private:
        std::string command_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLSENDTO_H
index 8144f1a0c7090924a859c2c32053a53516280707..6ffe52a18e805e2fce0a864e756a1829b106601f 100644 (file)
 #include "ControlShowFile.h"
 #include "support/filetools.h"
 
+using std::string;
 
-using lyx::support::GetFileContents;
-using lyx::support::OnlyFilename;
+namespace lyx {
 
-using std::string;
+using support::GetFileContents;
+using support::OnlyFilename;
+
+namespace frontend {
 
 
 ControlShowFile::ControlShowFile(Dialog & parent)
@@ -48,3 +51,6 @@ string ControlShowFile::getFileName()
 {
        return OnlyFilename(filename_);
 }
+
+} // namespace frontend
+} // namespace lyx
index 6f2f6483445cb77a052a4bd52311204b3ba4c53f..b02b08fa42f03d09334ea19e2f9d735b2b9bb03c 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "Dialog.h"
 
+namespace lyx {
+namespace frontend {
+
 /** A controller for the ShowFile dialog. */
 
 class ControlShowFile : public Dialog::Controller {
@@ -38,4 +41,7 @@ private:
        std::string filename_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLSHOWFILE_H
index a069f6e3295cd711a76ad84ed919e462bc90de7e..8e99872dbb23df82fd7e9cb5fc566aeb86cef92b 100644 (file)
 
 #include "frontends/Alert.h"
 
-using lyx::support::bformat;
-
 using std::advance;
 using std::distance;
 using std::endl;
 using std::string;
 
+namespace lyx {
+
+using support::bformat;
+
+namespace frontend {
+
 
 ControlSpellchecker::ControlSpellchecker(Dialog & parent)
        : Dialog::Controller(parent),
@@ -259,7 +263,7 @@ void ControlSpellchecker::replace(string const & replacement)
        lyxerr << "ControlSpellchecker::replace("
               << replacement << ")" << std::endl;
        BufferView & bufferview = *kernel().bufferview();
-       lyx::cap::replaceWord(bufferview.cursor(), replacement);
+       cap::replaceWord(bufferview.cursor(), replacement);
        kernel().buffer().markDirty();
        bufferview.update();
        // fix up the count
@@ -299,3 +303,6 @@ void ControlSpellchecker::ignoreAll()
        speller_->accept(word_);
        check();
 }
+
+} // namespace frontend
+} // namespace lyx
index 3dcd2c92520da383e6a6a1a640b8f1a94aca17ce..e04435bd75d43c389b3e324428b4b06b47f87fc7 100644 (file)
 #include "WordLangTuple.h"
 #include <boost/scoped_ptr.hpp>
 
-
 class SpellBase;
 
+namespace lyx {
+namespace frontend {
+
 /** A controller for Spellchecker dialogs.
  */
 class ControlSpellchecker : public Dialog::Controller {
@@ -88,4 +90,7 @@ private:
        boost::scoped_ptr<SpellBase> speller_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLSPELLCHECKER_H
index 63cbcfac21b069cb614f2890d4f8be345697590e..be184729544a090e4503f0eb2d9aab588a2184d9 100644 (file)
@@ -19,6 +19,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlTabular::ControlTabular(Dialog & parent)
        : Dialog::Controller(parent), active_cell_(-1)
@@ -218,3 +220,6 @@ void ControlTabular::longTabular(bool yes)
        else
                set(LyXTabular::UNSET_LONGTABULAR);
 }
+
+} // namespace frontend
+} // namespace lyx
index 0448ecd392e5b31d43402b4a475dc0254fbc2553..51533acccad68562d1c569e169a8eb4e78cc7521 100644 (file)
@@ -19,6 +19,8 @@
 #include "Dialog.h"
 #include "tabular.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlTabular : public Dialog::Controller {
 public:
@@ -74,4 +76,7 @@ private:
        boost::scoped_ptr<LyXTabular> params_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLTABULAR_H
index 2361ca8199cd6ddb7aee410993c286e43baf2964..c51a9abd17359761c46dc87736029cebb62dd380 100644 (file)
@@ -18,6 +18,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlTabularCreate::ControlTabularCreate(Dialog & parent)
        : Dialog::Controller(parent)
@@ -44,3 +46,6 @@ void ControlTabularCreate::dispatchParams()
        string data = tostr(params().first) + ' ' + tostr(params().second);
        kernel().dispatch(FuncRequest(LFUN_TABULAR_INSERT, data));
 }
+
+} // namespace frontend
+} // namespace lyx
index 00e602a763ec5c05b7d5defdaf0c427929e70c91..62dede1ebae55f90cc510d08caf0a391cdb663ef 100644 (file)
@@ -15,6 +15,9 @@
 #include "Dialog.h"
 #include <utility>
 
+namespace lyx {
+namespace frontend {
+
 /** A controller for the TabularCreate Dialog.
  */
 class ControlTabularCreate : public Dialog::Controller {
@@ -40,4 +43,7 @@ private:
        rowsCols params_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLTABULARCREATE_H
index c9d91c280e0d828851ecb65714d5bd97441a75c7..68120c25d2ecbc44a2a90eb5bbd17edaa4a08e33 100644 (file)
@@ -16,6 +16,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 void getTexFileList(ControlTexinfo::texFileSuffix type,
                    std::vector<string> & list)
@@ -59,3 +61,6 @@ string const ControlTexinfo::getClassOptions(string const & filename) const
 {
        return getListOfOptions(filename, "cls");
 }
+
+} // namespace frontend
+} // namespace lyx
index 2cd12e5c4198ece14979a2e1325b86a884008eb4..2172dcbfdcf0fef7ed85d4ae4a3fe4d97b2541df 100644 (file)
@@ -16,6 +16,9 @@
 #include "Dialog.h"
 #include "tex_helpers.h"
 
+namespace lyx {
+namespace frontend {
+
 /** A controller for Texinfo dialogs. */
 
 class ControlTexinfo : public Dialog::Controller {
@@ -50,4 +53,7 @@ private:
 void getTexFileList(ControlTexinfo::texFileSuffix type,
                    std::vector<std::string> & contents);
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLTEXINFO_H
index fe60194256d4354549f426d52290cf30dbfdcb6b..f99770f071409a4eb84bfbb4a39ca6020c8c1a0c 100644 (file)
@@ -17,6 +17,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlThesaurus::ControlThesaurus(Dialog & parent)
        : Dialog::Controller(parent)
@@ -43,11 +45,11 @@ void ControlThesaurus::replace(string const & newstr)
         * deletion/change !
         */
        string const data =
-               lyx::find::replace2string(oldstr_, newstr,
-                                         true,  // case sensitive
-                                         true,  // match word
-                                         false, // all words
-                                         true); // forward
+               find::replace2string(oldstr_, newstr,
+                                    true,  // case sensitive
+                                    true,  // match word
+                                    false, // all words
+                                    true); // forward
        kernel().dispatch(FuncRequest(LFUN_WORD_REPLACE, data));
 }
 
@@ -58,3 +60,6 @@ Thesaurus::Meanings const & ControlThesaurus::getMeanings(string const & str)
                meanings_ = thesaurus.lookup(str);
        return meanings_;
 }
+
+} // namespace frontend
+} // namespace lyx
index 83023bed0b6e5878ba69df057fcb86275b839b1a..75a8b4907ed44da465690c2816fa066287ea3d36 100644 (file)
@@ -16,6 +16,9 @@
 #include "Dialog.h"
 #include "Thesaurus.h"
 
+namespace lyx {
+namespace frontend {
+
 /** A controller for Thesaurus dialogs.
  */
 class ControlThesaurus : public Dialog::Controller {
@@ -54,4 +57,7 @@ private:
        virtual void apply() {}
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLTHESAURUS_H
index 797000262daa7cd1d7da11b22d60835bdb914071..8802de0df36f38d0eb0c81a98e515c1533cabe12 100644 (file)
@@ -18,13 +18,15 @@ using std::string;
 
 class Buffer;
 
+namespace lyx {
+namespace frontend {
 
 ControlToc::ControlToc(Dialog & d)
        : ControlCommand(d, "toc")
 {}
 
 
-void ControlToc::goTo(lyx::toc::TocItem const & item)
+void ControlToc::goTo(toc::TocItem const & item)
 {
        item.goTo(kernel().lyxview());
 }
@@ -32,24 +34,27 @@ void ControlToc::goTo(lyx::toc::TocItem const & item)
 
 vector<string> const ControlToc::getTypes() const
 {
-       return lyx::toc::getTypes(kernel().buffer());
+       return toc::getTypes(kernel().buffer());
 }
 
 
-lyx::toc::Toc const ControlToc::getContents(string const & type) const
+toc::Toc const ControlToc::getContents(string const & type) const
 {
-       lyx::toc::Toc empty_list;
+       toc::Toc empty_list;
 
        // This shouldn't be possible...
        if (!kernel().isBufferAvailable()) {
                return empty_list;
        }
 
-       lyx::toc::TocList tmp = lyx::toc::getTocList(kernel().buffer());
-       lyx::toc::TocList::iterator it = tmp.find(type);
+       toc::TocList tmp = toc::getTocList(kernel().buffer());
+       toc::TocList::iterator it = tmp.find(type);
        if (it == tmp.end()) {
                return empty_list;
        }
 
        return it->second;
 }
+
+} // namespace frontend
+} // namespace lyx
index 03c39ecb00ddc5c77ab75cb2f57a6eaa273dc35b..3285e38e26055bc487cf54ed29d850378ff964d9 100644 (file)
@@ -17,6 +17,9 @@
 #include "toc.h"
 #include <vector>
 
+namespace lyx {
+namespace frontend {
+
 /** A controller for TOC dialogs.
  */
 class ControlToc : public ControlCommand {
@@ -25,13 +28,16 @@ public:
        ControlToc(Dialog &);
 
        /// Goto this paragraph id
-       void goTo(lyx::toc::TocItem const &);
+       void goTo(toc::TocItem const &);
 
        /// Return the list of types available
        std::vector<std::string> const getTypes() const;
 
        /// Given a type, returns the contents
-       lyx::toc::Toc const getContents(std::string const & type) const;
+       toc::Toc const getContents(std::string const & type) const;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLTOC_H
index eab3a8ebd8faa55b52c96dae2474fc91331ffd2a..d1b8b869922526191fa21023e43c102541ca6483 100644 (file)
@@ -21,6 +21,8 @@
 using std::istringstream;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlVSpace::ControlVSpace(Dialog & parent)
        : Dialog::Controller(parent)
@@ -61,3 +63,6 @@ VSpace const & ControlVSpace::params() const
 {
        return params_;
 }
+
+} // namespace frontend
+} // namespace lyx
index 108afae5b31365f96daacbd3712eafcf0ca81f3e..a16ae52753f41cd4826a10f9cb5433dbde3d172e 100644 (file)
@@ -16,6 +16,8 @@
 #include "Dialog.h"
 #include "vspace.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlVSpace : public Dialog::Controller {
 public:
@@ -41,4 +43,7 @@ private:
        VSpace params_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLPARAGRAPH_H
index d506f71814ae802ebcceb2950901b3b4c6efe5e2..f572e764914a08343e826723916a145302328dfb 100644 (file)
@@ -17,6 +17,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ControlWrap::ControlWrap(Dialog & parent)
        : Dialog::Controller(parent)
@@ -43,3 +45,6 @@ void ControlWrap::dispatchParams()
        string const lfun = InsetWrapMailer::params2string(params());
        kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
 }
+
+} // namespace frontend
+} // namespace lyx
index 63608d49008acba996011afef7f0c624e07a9432..8fc8c3fc559dcae547cc746eb20d2df7b61c9519 100644 (file)
@@ -16,6 +16,9 @@
 
 class InsetWrapParams;
 
+namespace lyx {
+namespace frontend {
+
 class ControlWrap : public Dialog::Controller  {
 public:
        ///
@@ -37,4 +40,7 @@ private:
        boost::scoped_ptr<InsetWrapParams> params_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index dfdb58a2f81d811c1066d761aa7da7a651c1fd39..977379089a5faca6b6123ddde786c8b73f4ec857 100644 (file)
@@ -18,6 +18,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 Dialog::Dialog(LyXView & lv, string const & name)
        : is_closing_(false), kernel_(lv), name_(name),
@@ -203,3 +205,6 @@ string const & Dialog::View::getTitle() const
 
 void Dialog::View::partialUpdate(int)
 {}
+
+} // namespace frontend
+} // namespace lyx
index e4adb0f9720c9edb1e67711c41103067ba80939b..d1926dfcf24bbfed8b5d340a7bce13f8e3570a29 100644 (file)
 #ifndef DIALOG_H
 #define DIALOG_H
 
-
 #include "Kernel.h"
 
 #include <boost/utility.hpp>
 #include <boost/scoped_ptr.hpp>
 
-
 class LyXView;
-class ButtonController;
 
+namespace lyx {
+namespace frontend {
+
+class ButtonController;
 
 /** \c Dialog collects the different parts of a Model-Controller-View
  *  split of a generic dialog together.
@@ -251,5 +252,7 @@ private:
        std::string title_;
 };
 
+} // namespace frontend
+} // namespace lyx
 
 #endif // DIALOG_H
index 46520bb3c1a55dce3c3ec06f63198a5e0425e017..6d42465e1e96a09ee8da0ab3f819c7e51d911ea1 100644 (file)
@@ -22,6 +22,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 Kernel::Kernel(LyXView & lyxview)
        : lyxview_(lyxview)
@@ -110,3 +112,6 @@ Buffer const & Kernel::buffer() const
        BOOST_ASSERT(lyxview_.buffer());
        return *lyxview_.buffer();
 }
+
+} // namespace frontend
+} // namespace lyx
index 4655552da7ec467239d7d9b66ddc8e8dbd59d005..7919a2fc203a15e9fb1a005533d6e5aca49655f4 100644 (file)
 
 #include <string>
 
-
 class Buffer;
 class BufferView;
 class FuncRequest;
 class LyXView;
 
+namespace lyx {
+namespace frontend {
 
 /** \c Kernel is a wrapper making the LyX kernel available to the dialog.
  * (Ie, it provides an interface to the Model part of the Model-Controller-
@@ -102,5 +103,7 @@ private:
        LyXView & lyxview_;
 };
 
+} // namespace frontend
+} // namespace lyx
 
 #endif // KERNEL_H
index 7e92ed61c909e825a618288796fbff6f8271dc58..b7776a5452df2da9dd39ade3ab64c7963415bbd2 100644 (file)
 
 #include <algorithm>
 
-using lyx::support::ascii_lowercase;
-using lyx::support::bformat;
-using lyx::support::compare_ascii_no_case;
-using lyx::support::contains;
-using lyx::support::getVectorFromString;
-using lyx::support::ltrim;
-using lyx::support::prefixIs;
-using lyx::support::rtrim;
-using lyx::support::split;
-using lyx::support::subst;
-using lyx::support::token;
-using lyx::support::trim;
-
 using std::string;
 using std::ostringstream;
 using std::vector;
 
 
+namespace lyx {
+
+using support::ascii_lowercase;
+using support::bformat;
+using support::compare_ascii_no_case;
+using support::contains;
+using support::getVectorFromString;
+using support::ltrim;
+using support::prefixIs;
+using support::rtrim;
+using support::split;
+using support::subst;
+using support::token;
+using support::trim;
+
 namespace biblio {
 
 namespace {
@@ -822,3 +824,4 @@ getAuthorYearStrings(string const & key,
 }
 
 } // namespace biblio
+} // namespace lyx
index cc39875b4df9834de5d0f4ee44aa5860b09bed20..72f487ef912f8232e8626569a51dd6666e8eac4d 100644 (file)
@@ -19,6 +19,7 @@
 class Buffer;
 
 /** Functions of use to citation and bibtex GUI controllers and views */
+namespace lyx {
 namespace biblio {
 
 class CiteEngine_enum;
@@ -156,6 +157,8 @@ std::vector<std::string> const
 getAuthorYearStrings(std::string const & key,
                     InfoMap const & map,
                     std::vector<CiteStyle> const & styles);
+
 } // namespace biblio
+} // namespace lyx
 
 #endif // BIBLIOHELPERS_H
index cc3640f8e34d5afe0c6d1171c105b3e2014d6869..d13387cf66046e49c36cadd522cd41b2f35142ad 100644 (file)
@@ -17,7 +17,8 @@
 
 using std::vector;
 
-namespace frnt {
+namespace lyx {
+namespace frontend {
 
 vector<FamilyPair> const getFamilyData()
 {
@@ -258,4 +259,5 @@ vector<ColorPair> const getColorData()
        return color;
 }
 
-} // namespace frnt
+} // namespace frontend
+} // namespace lyx
index 0977b1ddc09b97c4b0344bf6e74cafaf02354b2c..9e4f2cc79e3f08a4aa2267515d5ce1e230c380ba 100644 (file)
@@ -23,7 +23,8 @@ class LColor_color;
 
 
 /** Functions of use to the character GUI controller and view */
-namespace frnt {
+namespace lyx {
+namespace frontend {
 
 ///
 enum FONT_STATE {
@@ -65,6 +66,7 @@ std::vector<BarPair>      const getBarData();
 ///
 std::vector<ColorPair>    const getColorData();
 
-} // namespace frnt
+} // namespace frontend
+} // namespace lyx
 
 #endif // CHARACTERHELPERS
index 76b9b9225330c840599ffb6cac175dd24bf5958f..71fd439aaf5c63f292538ccf673ba1f8ed654b43 100644 (file)
@@ -22,21 +22,23 @@ using std::string;
 using std::vector;
 
 
+namespace lyx {
+namespace frontend {
+
 namespace {
 
 struct Sorter
-       : public std::binary_function<frnt::LanguagePair,
-                                     frnt::LanguagePair, bool>
+       : public std::binary_function<LanguagePair,
+                                     LanguagePair, bool>
 {
-       bool operator()(frnt::LanguagePair const & lhs,
-                       frnt::LanguagePair const & rhs) const {
+       bool operator()(LanguagePair const & lhs,
+                       LanguagePair const & rhs) const {
                return lhs.first < rhs.first;
        }
 };
 
 } // namespace anon
 
-namespace frnt {
 
 vector<LanguagePair> const getLanguageData(bool character_dlg)
 {
@@ -69,4 +71,5 @@ vector<LanguagePair> const getLanguageData(bool character_dlg)
        return langs;
 }
 
-} // namespace frnt
+} // namespace frontend
+} // namespace lyx
index de12944b9b90faef0bfdbc85a69f1a1047d91932..c57f3ebaf2e568c22d4b1650b44cf94837116ab4 100644 (file)
@@ -18,7 +18,8 @@
 #include <utility>
 #include <vector>
 
-namespace frnt {
+namespace lyx {
+namespace frontend {
 
 ///
 typedef std::pair<std::string, std::string> LanguagePair;
@@ -28,6 +29,7 @@ typedef std::pair<std::string, std::string> LanguagePair;
  */
 std::vector<LanguagePair> const getLanguageData(bool character_dlg);
 
-} // namespace frnt
+} // namespace frontend
+} // namespace lyx
 
 #endif // FRNT_LANG_H
index 9c82f5763d7421264155507db99f3e8d430f4adb..a817db0a1d9e1542b0da89d5746278893c1d0d56 100644 (file)
 #include "support/filetools.h" // OnlyPath, OnlyFilename
 #include "support/globbing.h"
 
-using lyx::support::FileFilterList;
-using lyx::support::MakeAbsPath;
-using lyx::support::MakeRelPath;
-using lyx::support::OnlyFilename;
-using lyx::support::OnlyPath;
-using lyx::support::prefixIs;
-
 using std::pair;
 using std::vector;
 using std::string;
 
+// sorry this is just a temporary hack we should include vspace.h! (Jug)
+extern const char * stringFromUnit(int);
+
+namespace lyx {
+
+using support::FileFilterList;
+using support::MakeAbsPath;
+using support::MakeRelPath;
+using support::OnlyFilename;
+using support::OnlyPath;
+using support::prefixIs;
+
+namespace frontend {
+
 
 string const browseFile(string const & filename,
                        string const & title,
@@ -129,9 +136,6 @@ string const browseDir(string const & pathname,
 }
 
 
-// sorry this is just a temporary hack we should include vspace.h! (Jug)
-extern const char * stringFromUnit(int);
-
 vector<string> const getLatexUnits()
 {
        vector<string> units;
@@ -141,3 +145,6 @@ vector<string> const getLatexUnits()
 
        return units;
 }
+
+} // namespace frontend
+} // namespace lyx
index 5673c8f27c2205bb7904f3ed976c72373ccdce77..aa9313f04c1d47da19c26a226291e36bac2b023e 100644 (file)
 
 
 namespace lyx {
+
 namespace support {
 class FileFilterList;
 } // namespace support
-} // namespace lyx
+
+
+namespace frontend {
 
 /** Launch a file dialog and return the chosen file.
     filename: a suggested filename.
@@ -33,7 +36,7 @@ class FileFilterList;
 std::string const
 browseFile(std::string const & filename,
           std::string const & title,
-          lyx::support::FileFilterList const & filters,
+          support::FileFilterList const & filters,
           bool save = false,
           std::pair<std::string,std::string> const & dir1 =
           std::make_pair(std::string(), std::string()),
@@ -51,7 +54,7 @@ std::string const
 browseRelFile(std::string const & filename,
              std::string const & refpath,
              std::string const & title,
-             lyx::support::FileFilterList const & filters,
+             support::FileFilterList const & filters,
              bool save = false,
              std::pair<std::string,std::string> const & dir1 =
              std::make_pair(std::string(), std::string()),
@@ -100,4 +103,7 @@ getSecond(std::vector<Pair> const & pr)
        return tmp;
 }
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // NOT HELPERFUNCS_H
index 587b7b93d68594219cb9fe6e4a379c18ab4833c8..383464b96be295b4c956f901cee0c55eb76c7f2e 100644 (file)
 #include <boost/cregex.hpp>
 #include <fstream>
 
-using lyx::support::contains;
-using lyx::support::GetFileContents;
-using lyx::support::getVectorFromString;
-using lyx::support::LibFileSearch;
-using lyx::support::OnlyFilename;
-using lyx::support::Path;
-using lyx::support::Path;
-using lyx::support::split;
-using lyx::support::Systemcall;
-using lyx::support::token;
-using lyx::support::user_lyxdir;
-
 using std::string;
 using std::endl;
 
+namespace lyx {
+
+using support::contains;
+using support::GetFileContents;
+using support::getVectorFromString;
+using support::LibFileSearch;
+using support::OnlyFilename;
+using support::Path;
+using support::Path;
+using support::split;
+using support::Systemcall;
+using support::token;
+using support::user_lyxdir;
+
+namespace frontend {
 
 // build filelists of all availabe bst/cls/sty-files. done through
 // kpsewhich and an external script, saved in *Files.lst
@@ -80,7 +83,7 @@ void getTexFileList(string const & filename, std::vector<string> & list)
                *it = regex.Merge((*it), "/");
        }
 
-       lyx::eliminate_duplicates(list);
+       eliminate_duplicates(list);
 }
 
 
@@ -128,3 +131,6 @@ string const getTexFileFromList(string const & file,
 
        return classfile;
 }
+
+} // namespace frontend
+} // namespace lyx
index d604135d87b18f2d805b4f5693fe31bdecaca73a..18655617831efd90c1a9df131ae57f897f9704fc 100644 (file)
@@ -15,6 +15,8 @@
 #include <string>
 #include <vector>
 
+namespace lyx {
+namespace frontend {
 
 // build filelists of all availabe bst/cls/sty-files. done through
 // kpsewhich and an external script, saved in *Files.lst
@@ -34,4 +36,7 @@ std::string const getListOfOptions(std::string const & classname, std::string co
 /// get a class with full path from the list
 std::string const getTexFileFromList(std::string const & classname, std::string const & type);
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // TEX_HELPERS_H
index 865f34b24a9a8e1f5917181e130371ab8b3605ef..c805285101617a8e58adb295d7047986862d15ee 100644 (file)
@@ -1,3 +1,7 @@
+2004-05-19  Angus Leeming  <leeming@lyx.org>
+
+       * Most files: wrap code up inside namespace lyx::frontend.
+
 2004-05-04  Angus Leeming  <leeming@lyx.org>
 
        * Dialogs.C: Remove "error" dialog identifier.
index 9831a4c23584dd91b3e3435ba5ad60629374b26a..dc3a89c1e57eb5a161ed76e202f0f963e0cfac30 100644 (file)
 
 using std::string;
 
+using namespace lyx::frontend;
 
 namespace {
 
index 7ebad4eada988259eab6d6a2395dce348d22618a..a878ffcbd207e22a5d46b5c3d783fe968382adfe 100644 (file)
@@ -22,6 +22,8 @@
 using std::ostringstream;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -173,3 +175,6 @@ void GAboutlyx::doBuild()
        setCancel(btn);
        //btn->signal_clicked().connect(SigC::slot(*this, &GViewBase::onCancel));
 }
+
+} // namespace frontend
+} // namespace lyx
index adb852aa8254c8602c9628f2f9f3e39bbb894d44..98fe06c24d488831bf03395164a1fda4c011fe34 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "GViewBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlAboutlyx;
 
 class GAboutlyx : public GViewCB<ControlAboutlyx, GViewGladeB>
@@ -26,4 +29,7 @@ private:
        virtual void doBuild();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 5680177e76aeecb7805d9d6de762715f76ff6715..81444536415749ee826ef2fef1a862d664b6d2af 100644 (file)
@@ -15,6 +15,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 GBC::GBC(ButtonController const & parent,
         string const & cancel, string const & close)
@@ -39,3 +41,6 @@ void GBC::setButtonLabel(Gtk::Button * btn, string const & label) const
 {
        btn->set_label(Glib::locale_to_utf8(label));
 }
+
+} // namespace frontend
+} // namespace lyx
index cd89ef723107e44d607be37a83c4644df2949414..8525d207984451de8f7bcd2c9b4667c79c6f50ca 100644 (file)
@@ -18,6 +18,9 @@
 #include "BCView.h"
 #include "gettext.h"
 
+namespace lyx {
+namespace frontend {
+
 class GBC : public GuiBC<Gtk::Button, Gtk::Widget>
 {
 public:
@@ -35,4 +38,7 @@ private:
        void setButtonLabel(Gtk::Button *, std::string const & label) const;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 6ddd51920778d88c236d90d9d4b12d209924e45d..5057eaf65c4a1387cc931a123abf2580731c4069 100644 (file)
@@ -24,6 +24,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 namespace
 {
 
@@ -224,3 +227,6 @@ void GMathDelim::onRadioClicked()
 {
        bc().valid();
 }
+
+} // namespace frontend
+} // namespace lyx
index 1f0a127db3fbb18258c93ca53892be7df26a0f6d..addf53c7c8e8b825487851ffbe8d8f4ac78d2120 100644 (file)
@@ -16,6 +16,9 @@
 #include "support/lstrings.h"
 #include "GXpmBtnTbl.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlMath;
 
 class GMathDelim : public GViewCB<ControlMath, GViewGladeB>
@@ -42,4 +45,7 @@ private:
        int rightSel_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index eb16e49d08d534c922563efc58e2c7ed8486c10f..e6fb1132c36caf0ed50ff78243764c58d98b54e8 100644 (file)
@@ -45,6 +45,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 namespace {
 
 char const * infoUp[][5] =
@@ -163,3 +166,6 @@ void GMathPanel::onFunctionSelected()
        controller().dispatchInsert(
                Glib::locale_from_utf8(sel));
 }
+
+} // namespace frontend
+} // namespace lyx
index a1b78abd11dc78a1b46a51851918b602fc5f7018..30b99f9a39ad19eea4b4a26f0bd6946012721711 100644 (file)
@@ -16,6 +16,9 @@
 #include "support/lstrings.h"
 #include "GXpmBtnTbl.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlMath;
 
 class GMathPanel : public GViewCB<ControlMath, GViewGladeB>
@@ -43,4 +46,7 @@ private:
        GXpmBtnTbl tableDown_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 80d211577ea3740ffce0699e2469e0305f5e54cf..1c1e767aa36a4e2f428b39e1fba4b88b2a301537 100644 (file)
@@ -18,6 +18,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 namespace
 {
 
@@ -229,3 +232,6 @@ void GMenubar::onCommandActivate(MenuItem const * item,
 {
        view_->getLyXFunc().dispatch(item->func(), true);
 }
+
+} // namespace frontend
+} // namespace lyx
index f6db2ceb47fd7154637aafdaefbbf58199c44327..b23d89fa664a26cb179de8f2ef54a9a02a50f9bd 100644 (file)
@@ -18,6 +18,9 @@
 
 class LyXView;
 
+namespace lyx {
+namespace frontend {
+
 class GMenubar : public Menubar, public SigC::Object {
 public:
        GMenubar(LyXView *, MenuBackend const &);
@@ -33,4 +36,7 @@ private:
        std::vector<Glib::ustring> mainMenuNames_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 070a46777abdec2573355f18836fa96989d67765..c917958f5dde47649f68242b39d548042d66fa14 100644 (file)
@@ -23,6 +23,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 GMiniBuffer::GMiniBuffer(GView * view, ControlCommandBuffer & control) :
        controller_(control), view_(view)
@@ -286,3 +288,6 @@ void GMiniBuffer::setInput(Glib::ustring const & input)
        entry_.set_text(input);
        entry_.set_position(-1);
 }
+
+} // namespace frontend
+} // namespace lyx
index 6c97551ea32d9b7018b78990efd561169a8a16de..41e146ebbc5ccced08aec57e962f19b661fb4248 100644 (file)
@@ -15,6 +15,9 @@
 
 #include "frontends/Timeout.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlCommandBuffer;
 
 class GMiniBuffer : public SigC::Object
@@ -67,4 +70,7 @@ private:
        Glib::RefPtr<Gtk::TreeSelection> listSel_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index c6bd1a3455124f25bdc7e3c390705f4b4e43bb74..3631ba4d6f86275f74a9d8c3379ac1acdc6c07e1 100644 (file)
 
 using std::string;
 
+namespace font_metrics {
+
+int width(wchar_t const *s, size_t n, LyXFont const & f);
+
+} // namespace font_metrics
+
+
+namespace lyx {
+namespace frontend {
 
 GPainter::GPainter(GWorkArea & xwa)
        : Painter(), owner_(xwa)
@@ -165,10 +174,10 @@ void GPainter::arc(int x, int y, unsigned int w, unsigned int h,
 
 
 void GPainter::image(int x, int y, int w, int h,
-       lyx::graphics::Image const & i)
+       graphics::Image const & i)
 {
-       lyx::graphics::xformsImage const & image =
-               static_cast<lyx::graphics::xformsImage const &>(i);
+       graphics::xformsImage const & image =
+               static_cast<graphics::xformsImage const &>(i);
        Pixmap pixmap = GDK_PIXMAP_XID(owner_.getPixmap()->gobj());
        GC gc = GDK_GC_XGC(owner_.getGC()->gobj());
        XCopyArea(owner_.getDisplay(), image.getPixmap(), pixmap,
@@ -199,14 +208,6 @@ inline XftFont * getXftFont(LyXFont const & f)
 }
 
 
-namespace font_metrics
-{
-
-int width(wchar_t const *s, size_t n, LyXFont const & f);
-
-}
-
-
 void GPainter::text(int x, int y, wchar_t const * s, int ls, LyXFont const & f)
 {
        XftFont * font = getXftFont(f);
@@ -224,7 +225,7 @@ void GPainter::text(int x, int y, wchar_t const * s, int ls, LyXFont const & f)
                wchar_t c;
                int tmpx = x;
                for(int i = 0; i < ls; ++i) {
-                       c = lyx::support::uppercase(s[i]);
+                       c = support::uppercase(s[i]);
                        if(c != s[i]) {
                                XftDrawString32(draw, xftClr, fontS, tmpx, y,
                                                wcsToXftChar32StrFast(&c), 1);
@@ -254,3 +255,6 @@ void GPainter::text(int x, int y, char const * s, size_t ls, LyXFont const & f)
                len = mbstowcs(wcs.get(), s, ls + 1);
        text(x, y, wcs.get(), len, f);
 }
+
+} // namespace frontend
+} // namespace lyx
index 3e754ea5697bd59a53df752d8f533d5342394779..775d9e73a83a7ce4fbba1336b3ec34c0c7b85f3f 100644 (file)
 #include <map>
 
 class LyXFont;
+
+namespace lyx {
+namespace frontend {
+
 class GWorkArea;
 
 /**
@@ -95,7 +99,7 @@ public:
        /// draw an image from the image cache
        virtual void image(int x, int y,
                int w, int h,
-               lyx::graphics::Image const & image);
+               graphics::Image const & image);
 
        /// draw a string at position x, y (y is the baseline)
        virtual void text(int x, int y,
@@ -125,4 +129,7 @@ private:
        GWorkArea & owner_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // XPAINTER_H
index d43be55f7323d87231415439c02d5ce7f186d424..d4d5c0eff0f761d9e5115c69e4f5f664aa6e5a98 100644 (file)
@@ -19,6 +19,8 @@
 #include "PrinterParams.h"
 #include "support/lstrings.h"
 
+namespace lyx {
+namespace frontend {
 
 GPrint::GPrint(Dialog & parent, string title)
        : GViewCB<ControlPrint, GViewGladeB>(parent, title, false)
@@ -163,3 +165,6 @@ void GPrint::doBuild()
        fromTo_->signal_toggled().connect(SigC::slot(*this, &GPrint::updateUI));
        number_->signal_changed().connect(SigC::slot(*this, &GPrint::updateUI));
 }
+
+} // namespace frontend
+} // namespace lyx
index af758a5b61c2e9983237e852e0b7e70cc1436274..26df42f3c4878fce807418ec43b6f60d1a864f2a 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "GViewBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlPrint;
 
 class GPrint : public GViewCB<ControlPrint, GViewGladeB>
@@ -44,4 +47,7 @@ private:
        Gtk::Entry * toEntry_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 50b94c707606e530ce22418f086373f268d61afd..5948231f8485c08bf9509772d7b1e6b6b332c522 100644 (file)
@@ -32,6 +32,8 @@
 
 #include <algorithm>
 
+namespace lyx {
+namespace frontend {
 
 GScreen::GScreen(GWorkArea & o)
        : LyXScreen(), owner_(o)
@@ -143,3 +145,6 @@ void GScreen::expose(int x, int y, int w, int h)
                                          y + owner_.ypos(),
                                          w, h);
 }
+
+} // namespace frontend
+} // namespace lyx
index 510d707c2029a7c3690c33852f3f8d7da827cd3b..c3610a71b91d73631531a98208187a987efdf744 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "screen.h"
 
+namespace lyx {
+namespace frontend {
+
 class GWorkArea;
 
 /** The class GScreen is used for the main Textbody.
@@ -60,4 +63,7 @@ private:
        int cursorH_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 98ecf8a1ccdb5672c95bfe3e0cd39f910e7bab89..f7bf7e7ce906fd6cda9fcebe02e987f3e4b12d00 100644 (file)
@@ -20,6 +20,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 GTableCreate::GTableCreate(Dialog & parent)
        : GViewCB<ControlTabularCreate, GViewGladeB>(parent, _("Insert Table"))
 {
@@ -48,3 +51,6 @@ void GTableCreate::apply()
        int columns = columns_->get_value_as_int();
        controller().params() = std::make_pair(columns, rows);
 }
+
+} // namespace frontend
+} // namespace lyx
index 745c0598eb1fb56ccedc86365b40b68c9cddaeaf..a01e9dc730d07dbe160df8eda2126e4990558e48 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "GViewBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlTableCreate;
 
 class GTableCreate : public GViewCB<ControlTabularCreate, GViewGladeB>
@@ -28,4 +31,7 @@ private:
        Gtk::SpinButton *columns_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 6ffb00ba74ee2f7ffedd6e5c75bc515e517b2c43..642008d313f0d6da8be244d984a60a361631b155 100644 (file)
@@ -20,6 +20,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 GText::GText(Dialog & parent, string const & title, string const & label)
        : GViewCB<ControlCommand, GViewGladeB>(parent, title),
@@ -35,7 +37,7 @@ void GText::apply()
 
 void GText::update()
 {
-       string const contents = lyx::support::trim(
+       string const contents = support::trim(
                controller().params().getContents());
        entry_->set_text(Glib::locale_to_utf8(contents));
 }
@@ -69,3 +71,6 @@ void GText::onEntryChanged()
 {
        bc().valid(!entry_->get_text().empty());
 }
+
+} // namespace frontend
+} // namespace lyx
index bbbc88436ea68b0ea7335af187ed3b2b639410fe..96511d04c8fa82abec7a21d55d229e78a25df50c 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "GViewBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlCommand;
 
 class GText : public GViewCB<ControlCommand, GViewGladeB>
@@ -29,4 +32,7 @@ private:
        Gtk::Entry * entry_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 4fa8e8d94092aabb2c748792ae03ed847d8e0f03..943cf6ba87b67ef60cafef4147daf878d7cae1e3 100644 (file)
 
 
 Timeout::Timeout(unsigned int msec, Type t)
-       : pimpl_(new GTimeout(*this)), type(t), timeout_ms(msec)
+       : pimpl_(new lyx::frontend::GTimeout(*this)),
+         type(t), timeout_ms(msec)
 {}
 
+namespace lyx {
+namespace frontend {
 
 GTimeout::GTimeout(Timeout & owner)
        : Timeout::Impl(owner)
@@ -67,3 +70,6 @@ bool GTimeout::timeoutEvent()
        emit();
        return false; // discontinue emitting timeouts.
 }
+
+} // namespace frontend
+} // namespace lyx
index 10d1a10fc5eae3c2d17871050ff2cdb726d6a0b0..1eca87f1ac7ba5be6247d2312c247b3e4da9a555 100644 (file)
@@ -17,6 +17,9 @@
 
 #include <sigc++/sigc++.h>
 
+namespace lyx {
+namespace frontend {
+
 /**
  * This class executes the callback when the timeout expires
  * using Gtk mechanisms
@@ -44,4 +47,7 @@ private:
        bool running_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index fcd968df896543fe0f4ccb981960990d007a75d0..f01cf0b231213eeaf9c8e355eaedaa36b1826d4f 100644 (file)
@@ -23,6 +23,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -163,13 +165,19 @@ void GLayoutBox::selected()
               << layoutGuiName << std::endl;
 }
 
+} // namespace frontend
+} // namespace lyx
+
 
 Toolbars::ToolbarPtr make_toolbar(ToolbarBackend::Toolbar const & tbb,
                                  LyXView & owner)
 {
+       using lyx::frontend::GToolbar;
        return Toolbars::ToolbarPtr(new GToolbar(tbb, owner));
 }
 
+namespace lyx {
+namespace frontend {
 
 GToolbar::GToolbar(ToolbarBackend::Toolbar const & tbb, LyXView & owner)
        : owner_(dynamic_cast<GView &>(owner))
@@ -292,3 +300,6 @@ void GToolbar::update()
                                set_relief(Gtk::RELIEF_NONE);
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index fd9a9351ee28f796903b4d46dd319fcaab4b8230..4fa9aca1737574c6722f0f0c58c12baa5663df35 100644 (file)
 #include <boost/scoped_ptr.hpp>
 
 
-class GView;
+namespace lyx {
+namespace frontend {
 
+class GView;
 
 class GLayoutBox: public LayoutBox, public SigC::Object {
 public:
@@ -63,4 +65,7 @@ private:
        boost::scoped_ptr<GLayoutBox> layout_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // NOT GTOOLBAR_H
index 1822b6e158f6a592cd2f5152f1c6ba4f654e36b5..f25ca575db81de291e2d9bf846e800bb1e9e26a5 100644 (file)
@@ -20,6 +20,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 GUrl::GUrl(Dialog & parent)
        : GViewCB<ControlCommand, GViewGladeB>(parent, _("URL"))
 {
@@ -86,3 +89,6 @@ void GUrl::apply()
        else
                controller().params().setCmdName("url");
 }
+
+} // namespace frontend
+} // namespace lyx
index f6b493b5c2ab22f0e12736106773781f9f9dda17..ba547fc3717386d7c62744f5e0d9c3a1b5650123 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "GViewBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlCommand;
 
 class GUrl : public GViewCB<ControlCommand, GViewGladeB>
@@ -30,4 +33,7 @@ private:
        Gtk::CheckButton * htmlType_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index abcddc99e37f05ee2726b038f08c193748770c6f..d37a335cf508c2e7007677504f963051647f52df 100644 (file)
@@ -30,6 +30,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -94,7 +96,7 @@ GView::GView()
        // Make sure the buttons are disabled if needed.
        updateToolbars();
        string const iconName =
-               lyx::support::LibFileSearch("images", "lyx", "xpm");
+               support::LibFileSearch("images", "lyx", "xpm");
        if (!iconName.empty())
                set_icon_from_file(iconName);
 }
@@ -173,3 +175,6 @@ void GView::clearMessage()
 {
        message(getLyXFunc().viewStatusMessage());
 }
+
+} // namespace frontend
+} // namespace lyx
index d04a0ab3297ce502ecb494f80d7f4ff2326e72d6..5d7967202b81c020671622fb980ac5f878724e6b 100644 (file)
@@ -16,6 +16,9 @@
 #include "bufferview_funcs.h"
 #include <map>
 
+namespace lyx {
+namespace frontend {
+
 class GMiniBuffer;
 
 class GView : public LyXView, public Gtk::Window
@@ -66,4 +69,7 @@ private:
        Gtk::Widget * workArea_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index c6782bfd289d20efa47ac24dc4c4c50d3e383c66..34d8887d9da261836db1e13041bf659e7592494b 100644 (file)
@@ -16,6 +16,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 GViewBase::GViewBase(Dialog & parent, string const & t, bool allowResize) :
        Dialog::View(parent, t), allowResize_(allowResize)
@@ -38,7 +40,7 @@ void GViewBase::build()
 {
        doBuild();
        string const iconName =
-               lyx::support::LibFileSearch("images", "lyx", "xpm");
+               support::LibFileSearch("images", "lyx", "xpm");
        if (!iconName.empty())
                window()->set_icon_from_file(iconName);
        window()->signal_delete_event().connect(
@@ -150,3 +152,6 @@ const Gtk::Window * GViewGladeB::window() const
        xml_->get_widget("dialog", win);
        return win;
 }
+
+} // namespace frontend
+} // namespace lyx
index 1276c9cf606cb810a67af95bade84efbba52c4b8..e6113c1d82d522afced203852d6d061b4db90847 100644 (file)
@@ -19,6 +19,9 @@
 #include "ButtonPolicies.h"
 #include "GBC.h"
 
+namespace lyx {
+namespace frontend {
+
 class GViewBase : public Dialog::View, public SigC::Object
 {
 public:
@@ -124,4 +127,7 @@ Controller const & GViewCB<Controller, Base>::controller() const
        return static_cast<Controller const &>(getController());
 }
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 4af3c5964657cb1b4121adcd75a5e8ae5e61f61e..ffae993a425a0e1e7a21488474c0b8719c8eb1b5 100644 (file)
@@ -23,6 +23,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 ColorCache colorCache;
 
@@ -468,3 +470,6 @@ void GWorkArea::putClipboard(string const & str) const
                Gtk::Clipboard::get(GDK_SELECTION_PRIMARY);
        clipboard->set_text(Glib::locale_to_utf8(str));
 }
+
+} // namespace frontend
+} // namespace lyx
index 14fe4e8211383c7334eae6a04701dd326bbe3c77..8264a8bb700a787235d5e52effbbbdec454bda2b 100644 (file)
@@ -23,6 +23,9 @@
 class LColor_color;
 class LyXView;
 
+namespace lyx {
+namespace frontend {
+
 class ColorCache
 {
        typedef std::map<LColor_color, Gdk::Color *> Map;
@@ -110,4 +113,7 @@ private:
        std::string inputCache_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index bcf1362a1ff86830c8b0fa61569982b7b5c147fc..8bcd1f8fdac7d11718e05c7d72f2bbe5b4a7f849 100644 (file)
@@ -22,6 +22,9 @@ namespace LyXScreenFactory {
 
 LyXScreen * create(WorkArea & owner)
 {
+       using lyx::frontend::GScreen;
+       using lyx::frontend::GWorkArea;
+
        return new GScreen(static_cast<GWorkArea &>(owner));
 }
 
index e1c74cf8274d46730ff05eb88daaec1fc37cde07..3b54e273b0043425093e3fcb375191fd59b4bec3 100644 (file)
@@ -21,7 +21,7 @@ namespace WorkAreaFactory {
 
 WorkArea * create(LyXView & owner, int w, int h)
 {
-       return new GWorkArea(owner, w, h);
+       return new lyx::frontend::GWorkArea(owner, w, h);
 }
 
 
index e2008f6cd1e8920442364763342d0cb356914516..f943a6452a13a54043ab621f3ef1dd5694d3537c 100644 (file)
@@ -19,6 +19,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 string const findGladeFile(string const & name)
 {
        // First, search in the installation directories.
@@ -44,3 +47,6 @@ string const findGladeFile(string const & name)
 
        return filename;
 }
+
+} // namespace frontend
+} // namespace lyx
index 873e269f673f49e07adf4ed5d4883177fc4dd21e..f86b921e09ccb6fdc58118660e06f83f82ef5f77 100644 (file)
 
 #include <string>
 
+namespace lyx {
+namespace frontend {
+
 /** name is the name of the glade file, without path or extension.
  *  Eg, "aboutlyx", "tableCreate".
  */
 std::string const findGladeFile(std::string const & name);
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // NOT GHELPERS_H
index 53bad5f3274eeb807563d749a1e7533515cf6856..4a27d6e22d83bd0cedb4e0364019828d69bb61ab 100644 (file)
@@ -60,6 +60,10 @@ namespace os = lyx::support::os;
 using std::ostringstream;
 using std::string;
 
+using lyx::frontend::colorCache;
+using lyx::frontend::GView;
+using lyx::frontend::XformsColor;
+
 
 extern BufferList bufferlist;
 
index b112b29158f20292c1328d5b093cc3613393bc30..0167d56ae8090663f4c490ae5fc93959eb959d3d 100644 (file)
@@ -1,3 +1,7 @@
+2004-05-19  Angus Leeming  <leeming@lyx.org>
+
+       * Most files: wrap code up inside namespace lyx::frontend.
+
 2004-05-14  Angus Leeming  <leeming@lyx.org>
 
        * QCitation.C: small changes due to the changes in biblio.h.
index 43f3cb4176cd217e56ffc7388cdb6b68bf864679..cb6e246dc5f9316895fa1fab17a0ac1fb0d03b97 100644 (file)
@@ -95,6 +95,7 @@
 
 using std::string;
 
+using namespace lyx::frontend;
 
 namespace {
 
index 63d932538883de4971c3d576bb19e4e70d80db17..258f0f6ce217d751aa99da4632c70fded41d292e 100644 (file)
@@ -33,6 +33,8 @@ using std::istringstream;
 using std::ostringstream;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlAboutlyx, QView<QAboutDialog> > base_class;
 
@@ -113,3 +115,6 @@ void QAbout::build_dialog()
        bcview().setCancel(dialog_->closePB);
        bc().refresh();
 }
+
+} // namespace frontend
+} // namespace lyx
index e4a9a10526b0f9d6d5ee292a17eafd2b880df230..94b22d1d56a4e01b95abff58f23ae390233b84a7 100644 (file)
 #ifndef FORMABOUT_H
 #define FORMABOUT_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class QAboutDialog;
 class ControlAboutlyx;
@@ -33,4 +34,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMABOUT_H
index e4f6392776f85533e2bafc2f3dd234163ea62cec..625970cd91a355c1024b781aac93145b1ee285f2 100644 (file)
 
 #include <config.h>
 
-
 #include "QAboutDialog.h"
 
+namespace lyx {
+namespace frontend {
 
 QAboutDialog::QAboutDialog(QWidget * parent, const char * name,
                           bool modal, WFlags fl)
@@ -23,3 +24,6 @@ QAboutDialog::QAboutDialog(QWidget * parent, const char * name,
 
 QAboutDialog::~QAboutDialog()
 {}
+
+} // namespace frontend
+} // namespace lyx
index 589b7ed71511477adee4dc165b4b3043b4943ea3..a5d2177d02f6a5db340ac2d55d722c7effc2a78d 100644 (file)
 #ifndef QABOUTDIALOG_H
 #define QABOUTDIALOG_H
 
-
 #include "ui/QAboutDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QAboutDialog : public QAboutDialogBase {
        Q_OBJECT
 public:
@@ -23,4 +25,7 @@ public:
        ~QAboutDialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QABOUTDIALOG_H
index 5257319126eaa254e0e04c4e958755c5381b96be..5f18836adf24ad3dbbdb9ccf5d9af5117f085edc 100644 (file)
@@ -10,8 +10,6 @@
 
 #include <config.h>
 
-
-
 #include "debug.h"
 #include "ControlCommand.h"
 #include "qt_helpers.h"
@@ -23,6 +21,9 @@
 #include "QBibitem.h"
 #include "Qt2BC.h"
 
+namespace lyx {
+namespace frontend {
+
 typedef QController<ControlCommand, QView<QBibitemDialog> > base_class;
 
 
@@ -61,3 +62,6 @@ bool QBibitem::isValid()
 {
        return !dialog_->keyED->text().isEmpty();
 }
+
+} // namespace frontend
+} // namespace lyx
index 81125c64bbf26854338a5410580c3a4572d9a209..c01d17989bd9bb6491dcf8f3bc73702a05a356bf 100644 (file)
 #ifndef QBIBITEM_H
 #define QBIBITEM_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlCommand;
 class QBibitemDialog;
 
@@ -36,4 +38,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QBIBITEM_H
index 768aa424a2865989d6ddab03a2ef8d1014e58a80..0871160d3a9d27c90e68b2cf2afb38ebba3ea2ce 100644 (file)
@@ -15,6 +15,8 @@
 #include "QBibitemDialog.h"
 #include "QBibitem.h"
 
+namespace lyx {
+namespace frontend {
 
 QBibitemDialog::QBibitemDialog(QBibitem * form)
        : QBibitemDialogBase(0, 0, false, 0),
@@ -38,3 +40,6 @@ void QBibitemDialog::closeEvent(QCloseEvent *e)
        form_->slotWMHide();
        e->accept();
 }
+
+} // namespace frontend
+} // namespace lyx
index 81f9bdd0299f86fde10b548a7e6876b400955d46..276e45fe56fc71aa1138da8cf316a1d71aae3282 100644 (file)
 #ifndef QBIBITEMDIALOG_H
 #define QBIBITEMDIALOG_H
 
-
 #include "ui/QBibitemDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QBibitem;
 
 class QBibitemDialog : public QBibitemDialogBase {
@@ -29,4 +31,7 @@ private:
        QBibitem * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QBIBITEMDIALOG_H
index 93660b23d44a3a256b78a0d0941475b302731b5b..bd7ac30f9d8295152bcb3804477b2fbc041fb567 100644 (file)
@@ -39,6 +39,8 @@ using lyx::support::trim;
 using std::vector;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlBibtex, QView<QBibtexDialog> > base_class;
 
@@ -196,3 +198,6 @@ bool QBibtex::isValid()
 {
        return dialog_->databaseLB->count() != 0;
 }
+
+} // namespace frontend
+} // namespace lyx
index 598f533b94e2c18cea4df1bedf51fd895f48a1b9..8c9bd50f2af7e199a2c8b54b0bbde8b048eb8680 100644 (file)
 #ifndef QBIBTEX_H
 #define QBIBTEX_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlBibtex;
 class QBibtexDialog;
 
@@ -36,4 +38,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QBIBTEX_H
index ea3d26fd995b290c012800d1b7c2ad4f4258035c..867487f4081cd16c1985f60a9c17659cab0c8ba6 100644 (file)
@@ -28,6 +28,8 @@ using lyx::support::ChangeExtension;
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 QBibtexDialog::QBibtexDialog(QBibtex * form)
        : QBibtexDialogBase(0, 0, false, 0),
@@ -164,3 +166,6 @@ void QBibtexDialog::closeEvent(QCloseEvent *e)
        form_->slotWMHide();
        e->accept();
 }
+
+} // namespace frontend
+} // namespace lyx
index f731b95f385e212470dbab5b7d6b4aa274f7e279..fa6adc7f1d22c15941a18ff51812b5d83e7fb990 100644 (file)
 #ifndef QBIBTEXDIALOG_H
 #define QBIBTEXDIALOG_H
 
-
 #include "ui/QBibtexDialogBase.h"
 
-class QBibtex;
 class QBibtexAddDialogBase;
 
+namespace lyx {
+namespace frontend {
+
+class QBibtex;
+
 class QBibtexDialog : public QBibtexDialogBase {
        Q_OBJECT
 
@@ -43,4 +46,7 @@ private:
        QBibtex * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QBIBTEXDIALOG_H
index 30fa298be7ce4de81f9a53791e838ab37453d1d4..1915423576b8a79c0a80240a50e1c06ecf10389b 100644 (file)
@@ -39,6 +39,8 @@ using lyx::support::isStrDbl;
 using lyx::support::subst;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlBox, QView<QBoxDialog> > base_class;
 
@@ -270,3 +272,6 @@ void QBox::setInnerType(bool frameless, int i)
                dialog_->innerBoxCO->setCurrentItem(i);
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index 1107064d9e31e808606da03734eb438b7506a826..c5e2d60c73dd07cfcc6158467f6e9ecd47d8e4e2 100644 (file)
 #ifndef QBOX_H
 #define QBOX_H
 
-
 #include "QDialogView.h"
 #include <vector>
 
+namespace lyx {
+namespace frontend {
 
 class ControlBox;
 class QBoxDialog;
@@ -51,4 +52,7 @@ private:
        std::vector<std::string> gui_names_spec_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QBOX_H
index dba8102ba62232806950bc53e687b8a6206e48bd..69ccfc9b4a9fe265390771b0a9009f72e58b1c9d 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <config.h>
 
-
 #include "QBox.h"
 #include "QBoxDialog.h"
 #include "qt_helpers.h"
@@ -20,6 +19,8 @@
 #include <qpushbutton.h>
 #include <qlineedit.h>
 
+namespace lyx {
+namespace frontend {
 
 QBoxDialog::QBoxDialog(QBox * form)
        : QBoxDialogBase(0, 0, false, 0),
@@ -88,3 +89,6 @@ void QBoxDialog::restoreClicked()
                        heightUnitsLC->setCurrentItem(j);
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index ca2b2e9af04304e4d6e47316658615335587cc0b..bc8fa86467540bd8f4da7b17916e87b262d2f8b8 100644 (file)
 #ifndef QBOXDIALOG_H
 #define QBOXDIALOG_H
 
-
 #include "ui/QBoxDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QBox;
 
 class QBoxDialog : public QBoxDialogBase {
@@ -32,4 +34,7 @@ private:
        QBox * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QBOXDIALOG_H
index 28fd7446b304a6c1bae486373668c706a093675d..8459aa75fb61acc03d052511b20d9604543e74d0 100644 (file)
@@ -27,6 +27,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlBranch, QView<QBranchDialog> > base_class;
 
@@ -74,3 +76,6 @@ void QBranch::apply()
        string const type = fromqstr(dialog_->branchCO->currentText());
        controller().params().branch = type;
 }
+
+} // namespace frontend
+} // namespace lyx
index 8f9711f15aae6f23e181f5622ee5fc601ad0869d..1b936a0ea211df9a9519ce65a10fb18c344ef2b9 100644 (file)
@@ -14,6 +14,8 @@
 
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlBranch;
 class QBranchDialog;
@@ -36,4 +38,7 @@ private:
        virtual void update_contents();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QBRANCH_H
index b44b237c1f3f2fa400d4be6ca3b23b107a11f914..66ccf2d6e6c560a3c44d77119254e7faaa7516c0 100644 (file)
 
 #include <config.h>
 
-
 #include "QBranch.h"
 #include "QBranchDialog.h"
 
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
 
 QBranchDialog::QBranchDialog(QBranch * form)
        : QBranchDialogBase(0, 0, false, 0),
@@ -39,3 +40,6 @@ void QBranchDialog::change_adaptor()
 {
        form_->changed();
 }
+
+} // namespace frontend
+} // namespace lyx
index bbcea67b4a815588e00bee28de6393bac73669dd..27c3b9b4b2daf2e7ecabdc68f2b8e4efbf03c38f 100644 (file)
@@ -14,6 +14,8 @@
 
 #include "ui/QBranchDialogBase.h"
 
+namespace lyx {
+namespace frontend {
 
 class QBranch;
 
@@ -29,4 +31,7 @@ private:
        QBranch * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QBRANCHDIALOG_H
index 2c6b71470d93dffb9663b80250f5cd4834ee3045..1fcaf873cf7a4a84f3c1c3a9ba56e29157d2fe28 100644 (file)
@@ -24,6 +24,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlChanges, QView<QChangesDialog> > base_class;
 
@@ -71,3 +73,6 @@ void QChanges::reject()
 {
        controller().reject();
 }
+
+} // namespace frontend
+} // namespace lyx
index ef2d4725e50051fbcf49ee368183dfb883f00ca2..0876a4dab0b39448cb55e8ddb12021e9e200b8a0 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlChanges;
 class QChangesDialog;
 
@@ -40,4 +43,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QCHANGES_H
index d6927ef5f1363178346a643fc2bf3dfb0596a9aa..b2be2b6855da67ba8bf8eab53e03a6f760ec877c 100644 (file)
 
 #include <config.h>
 
-
 #include <qpushbutton.h>
 
 #include "QChangesDialog.h"
 #include "QChanges.h"
 
+namespace lyx {
+namespace frontend {
 
 QChangesDialog::QChangesDialog(QChanges * form)
        : QChangesDialogBase(0, 0, false, 0),
@@ -49,3 +50,6 @@ void QChangesDialog::closeEvent(QCloseEvent *e)
        form_->slotWMHide();
        e->accept();
 }
+
+} // namespace frontend
+} // namespace lyx
index 13aa211f4a38b38cbfed3e1d0324f8609817d3cb..09389bc56e9fe35dbf82dbd59c8c42842eeab260 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "ui/QChangesDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QChanges;
 
 class QChangesDialog : public QChangesDialogBase {
@@ -34,4 +37,7 @@ private:
        QChanges * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QCHANGESDIALOG_H
index 1977c71d1a71bcca8a9e96ee7b1cb1ac38923d50..a640c7282ab9a3885156006305d7c44536fe2b73 100644 (file)
 
 #include "LColor.h"
 
-using frnt::BarPair;
-using frnt::ColorPair;
-using frnt::FamilyPair;
-using frnt::getBarData;
-using frnt::getColorData;
-using frnt::getFamilyData;
-using frnt::getLanguageData;
-using frnt::getSeriesData;
-using frnt::getShapeData;
-using frnt::getSizeData;
-using frnt::LanguagePair;
-using frnt::SeriesPair;
-using frnt::ShapePair;
-using frnt::SizePair;
-
 using std::vector;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlCharacter, QView<QCharacterDialog> > base_class;
 
@@ -161,3 +148,6 @@ void QCharacter::apply()
 
        ctrl.setToggleAll(dialog_->toggleallCB->isChecked());
 }
+
+} // namespace frontend
+} // namespace lyx
index a484e397d273e58066cca387e9b0ea1fd6d1cb51..48939df88bca4a39d6a251882e5374ed1a8417da 100644 (file)
 #ifndef QCHARACTER_H
 #define QCHARACTER_H
 
-
 #include "QDialogView.h"
 #include "controllers/character.h"
 #include "controllers/frnt_lang.h"
 
 #include <vector>
 
+namespace lyx {
+namespace frontend {
 
 class ControlCharacter;
 class QCharacterDialog;
@@ -40,13 +41,16 @@ private:
        /// build the dialog
        virtual void build_dialog();
 
-       std::vector<frnt::FamilyPair> family;
-       std::vector<frnt::SeriesPair> series;
-       std::vector<frnt::ShapePair>  shape;
-       std::vector<frnt::SizePair>   size;
-       std::vector<frnt::BarPair>    bar;
-       std::vector<frnt::ColorPair>  color;
-       std::vector<frnt::LanguagePair> language;
+       std::vector<FamilyPair> family;
+       std::vector<SeriesPair> series;
+       std::vector<ShapePair>  shape;
+       std::vector<SizePair>   size;
+       std::vector<BarPair>    bar;
+       std::vector<ColorPair>  color;
+       std::vector<LanguagePair> language;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QCHARACTER_H
index bfcb49809f3a8c96a07de121b64640a7fcae3dfa..9f563dff2785518a64c62f8e2ced3ba44543e609 100644 (file)
@@ -17,6 +17,8 @@
 #include <qcombobox.h>
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
 
 QCharacterDialog::QCharacterDialog(QCharacter * form)
        : QCharacterDialogBase(0, 0, false, 0),
@@ -58,3 +60,6 @@ void QCharacterDialog::closeEvent(QCloseEvent * e)
        form_->slotWMHide();
        e->accept();
 }
+
+} // namespace frontend
+} // namespace lyx
index 5a94677615a9eb64a7a951f2f720193cb695554a..1f05a3ef142607d8292019e9c404d88a98d33ea0 100644 (file)
 #ifndef QCHARACTERDIALOG_H
 #define QCHARACTERDIALOG_H
 
-
 #include "QCharacter.h"
 #include "ui/QCharacterDialogBase.h"
 
-
 class LyXFont;
 
+namespace lyx {
+namespace frontend {
+
 class QCharacterDialog : public QCharacterDialogBase {
        Q_OBJECT
 public:
@@ -32,4 +33,7 @@ protected slots:
        void change_adaptor();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QCHARACTERDIALOG_H
index 0cb80c675eb8b6d23745611c6c6685fbfeaf8ae3..6d75f68483eb46270baa97147bc5ad13d79317c0 100644 (file)
 #include "qt_helpers.h"
 #include "support/lstrings.h"
 
-using lyx::support::getStringFromVector;
-using lyx::support::getVectorFromString;
-using lyx::support::trim;
-
 using std::find;
 using std::string;
 using std::vector;
 
+namespace lyx {
+
+using support::getStringFromVector;
+using support::getVectorFromString;
+using support::trim;
+
+namespace frontend {
 
 typedef QController<ControlCitation, QView<QCitationDialog> > base_class;
 
@@ -224,3 +227,6 @@ void QCitation::updateBrowser(QListBox * browser,
                        browser->insertItem(toqstr(key));
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index 446e7b2e65b5a5a6a98c76208aa24c14a4e06182..23d22f2213e8f2fca4007b29c78530dfe1b1dbcc 100644 (file)
 #ifndef QCITATION_H
 #define QCITATION_H
 
-
 #include "QDialogView.h"
 #include <vector>
 
-
 class QListBox;
+
+namespace lyx {
+namespace frontend {
+
 class ControlCitation;
 class QCitationDialog;
 
@@ -58,4 +60,7 @@ private:
        int style_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QCITATION_H
index 020a50e85d7c70a898d90f5391fb4b1d3fe8e64e..863ab10af50dc71c08e1d69b5a6e303d804a6b68 100644 (file)
@@ -29,6 +29,8 @@
 using std::vector;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 QCitationDialog::QCitationDialog(QCitation * form)
        : QCitationDialogBase(0, 0, false, 0),
@@ -282,3 +284,6 @@ void QCitationDialog::find(biblio::Direction dir)
        add_->availableLB->setSelected(found, true);
        add_->availableLB->ensureCurrentVisible();
 }
+
+} // namespace frontend
+} // namespace lyx
index 7f987b0af49db4b7f9344a0e4ff2e9e5a53c02a8..01a40537b90f62e78d92f9ad4eeba5dfb54d54e2 100644 (file)
 #ifndef QCITATIONDIALOG_H
 #define QCITATIONDIALOG_H
 
-
 #include "ui/QCitationDialogBase.h"
 #include "controllers/biblio.h"
 
-class QCitation;
 class QCitationFindDialogBase;
 
+namespace lyx {
+namespace frontend {
+
+class QCitation;
+
 class QCitationDialog : public QCitationDialogBase {
        Q_OBJECT
 
@@ -52,4 +55,7 @@ private:
        QCitation * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QCITATIOINDIALOG_H
index 5a88cde8cfd2ba3661beb6612579a79da82c811f..40f74087174cee1db82239d26c492e8cc476f1f5 100644 (file)
@@ -28,6 +28,8 @@ using lyx::support::LibFileSearch;
 using std::vector;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -215,3 +217,6 @@ void XMiniBuffer::suffix_timeout()
 }
 
 #endif
+
+} // namespace frontend
+} // namespace lyx
index 1809b836a1142e8b7b8aadb179e0960e0cdf15d9..00841f213a939d1096dc032b254b44196ef0e9e8 100644 (file)
 
 #include <qwidget.h>
 
-class QtView;
-class QCommandEdit;
 class QListBoxItem;
+
+namespace lyx {
+namespace frontend {
+
+class QCommandEdit;
+class QtView;
 class ControlCommandBuffer;
 
 class QCommandBuffer : public QWidget {
@@ -50,4 +54,7 @@ private:
        QCommandEdit * edit_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QCOMMANDBUFFER_H
index c6117b2b691a3bd595be81c5146b93403ca47494..13e74b8e563ee3d570c340ba0b29344dc739a608 100644 (file)
@@ -12,6 +12,9 @@
 
 #include "QCommandEdit.h"
 
+namespace lyx {
+namespace frontend {
+
 QCommandEdit::QCommandEdit(QWidget * parent)
        : QLineEdit(parent)
 {
@@ -54,3 +57,6 @@ bool QCommandEdit::event(QEvent * e)
        emit tabPressed();
        return true;
 }
+
+} // namespace frontend
+} // namespace lyx
index a994d0a1775b146aa45500a1ce0aecdad28aa476..4cc8d0a16bdf046b156d8d75d30a3283c4433028 100644 (file)
@@ -14,6 +14,9 @@
 
 #include <qlineedit.h>
 
+namespace lyx {
+namespace frontend {
+
 class QCommandEdit : public QLineEdit {
        Q_OBJECT
 public:
@@ -37,4 +40,7 @@ protected:
        virtual void keyPressEvent(QKeyEvent * e);
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QCOMMANDEDIT_H
index fea71f48185aed44a97a64c7d992469d91d052fb..c1a4c5b386535acdaf998a6a815c896b09acc14a 100644 (file)
@@ -25,6 +25,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 namespace {
 
 char const * delim[] = {
@@ -133,3 +136,6 @@ void QDelimiterDialog::rdelim_clicked(const string & str)
                set_label(leftPI, left_);
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index 6cd3b0f977c134aa1ef8482b720df4dd722d55de..53b2324e243a653e1b05d605f8f686188c29f771 100644 (file)
 #include "ui/QDelimiterDialogBase.h"
 #include <string>
 
-
-class QMathDelimiter;
 class IconPalette;
 class QLabel;
 
+namespace lyx {
+namespace frontend {
+
+class QMathDelimiter;
+
 class QDelimiterDialog : public QDelimiterDialogBase {
        Q_OBJECT
 public:
@@ -43,4 +46,7 @@ private:
        QMathDelimiter * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QDELIMITERDIALOG_H
index b6fef5e481d58d1c1585406149f148311db20a78..997a6d8306c429a1d55b147990c24ce1187a7b49 100644 (file)
 
 #include <config.h>
 
-
-
 #include "Qt2BC.h"
 #include "ButtonController.h"
 #include "qt_helpers.h"
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 QDialogView::QDialogView(Dialog & parent, std::string const & t)
        : Dialog::View(parent,t), updating_(false)
@@ -110,3 +110,6 @@ void QDialogView::slotRestore()
 {
        dialog().RestoreButton();
 }
+
+} // namespace frontend
+} // namespace lyx
index 8229f06c4097e621aada56f32d1066783b469990..8edd08c2705ec2de705b5d14b604300b99e38adb 100644 (file)
@@ -19,6 +19,9 @@
 #include <qdialog.h>
 #include <qobject.h>
 
+namespace lyx {
+namespace frontend {
+
 class Qt2BC;
 
 /** This class is an Qt2 GUI base class.
@@ -175,5 +178,7 @@ Controller const & QController<Controller, Base>::controller() const
        return static_cast<Controller const &>(this->getController());
 }
 
+} // namespace frontend
+} // namespace lyx
 
 #endif // QDIALOGVIEW_H
index 5d2cf566342321cc29728683d2abf087a3d16b3b..86d9d8c76f47caa922a82d231c38c0ebfa8a389a 100644 (file)
@@ -47,6 +47,8 @@ using std::distance;
 using std::vector;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlDocument, QView<QDocumentDialog> > base_class;
 
@@ -64,7 +66,7 @@ char const * encodings[] = { "LaTeX default", "latin1", "latin2",
 
 QDocument::QDocument(Dialog & parent)
        : base_class(parent, _("LyX: Document Settings")),
-               lang_(getSecond(frnt::getLanguageData(false)))
+               lang_(getSecond(getLanguageData(false)))
 {}
 
 
@@ -78,9 +80,9 @@ void QDocument::build_dialog()
        dialog_->biblioModule->citeStyleCO->setCurrentItem(0);
 
        // language & quotes
-       vector<frnt::LanguagePair> const langs = frnt::getLanguageData(false);
-       vector<frnt::LanguagePair>::const_iterator lit  = langs.begin();
-       vector<frnt::LanguagePair>::const_iterator lend = langs.end();
+       vector<LanguagePair> const langs = getLanguageData(false);
+       vector<LanguagePair>::const_iterator lit  = langs.begin();
+       vector<LanguagePair>::const_iterator lend = langs.end();
        for (; lit != lend; ++lit) {
                dialog_->langModule->languageCO->insertItem(
                        toqstr(lit->first));
@@ -673,3 +675,6 @@ void QDocument::useClassDefaults()
        params.useClassDefaults();
        update_contents();
 }
+
+} // namespace frontend
+} // namespace lyx
index 52fef8f633cadfd9384e3c7cdc8346dc61b91790..22d6d88e53404e5040a7ca808bcbf7c41090385f 100644 (file)
@@ -9,7 +9,6 @@
  * Full author contact details are available in file CREDITS.
  */
 
-
 #ifndef QDOCUMENT_H
 #define QDOCUMENT_H
 
 #include <string>
 #include <vector>
 
+class LengthCombo;
+class  QLineEdit;
+
+namespace lyx {
+namespace frontend {
 
 class ControlDocument;
 class QDocumentDialog;
-class LengthCombo;
-class  QLineEdit;
 
 class QDocument
        : public QController<ControlDocument, QView<QDocumentDialog> >
@@ -54,4 +56,7 @@ private:
        BranchList branchlist_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QDOCUMENT_H
index 17b4cb0082be6235764995dcc64a9388c1803f52..a5d7bd9a319366a41ae68b55a22dd8f53ac21786 100644 (file)
@@ -43,6 +43,8 @@ using lyx::support::token;
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 QDocumentDialog::QDocumentDialog(QDocument * form)
        : QDocumentDialogBase(0, 0, false, 0), form_(form)
@@ -541,3 +543,6 @@ void QDocumentDialog::toggleBranchColor()
                }
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index f1ced29df910cb5a549aaea802cb557abad53038..bea8ef735bcc1e1dbf13ea08b3be8732b8a4306f 100644 (file)
@@ -12,7 +12,6 @@
 #ifndef QDOCUMENTDIALOG_H
 #define QDOCUMENTDIALOG_H
 
-
 #include "ui/QDocumentDialogBase.h"
 
 #include "BulletsModule.h"
 #include "ui/PreambleModuleBase.h"
 #include "ui/BranchesModuleBase.h"
 
+class FloatPlacement;
+
+namespace lyx {
+namespace frontend {
 
 class QDocument;
-class FloatPlacement;
 
 class QDocumentDialog : public QDocumentDialogBase {
        Q_OBJECT
@@ -88,4 +90,7 @@ private:
        QDocument * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // DOCUMENTDIALOG_H
index 4ad8d7bc0d3972c79d6877fabd08f6a91eaddf1a..c50558d8c8ef0d95316e3bd7eb07f2aa83f71c6f 100644 (file)
@@ -20,6 +20,9 @@
 #include "QERT.h"
 #include "Qt2BC.h"
 
+namespace lyx {
+namespace frontend {
+
 typedef QController<ControlERT, QView<QERTDialog> > base_class;
 
 
@@ -61,3 +64,6 @@ void QERT::update_contents()
 
        rb->setChecked(true);
 }
+
+} // namespace frontend
+} // namespace lyx
index a26c1dc2dbfb3931c30d072ee1e2ab2192b7f08c..21c1a992da69226430ab1bb8733a8aa3a77a9a12 100644 (file)
 #ifndef QERT_H
 #define QERT_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlERT;
 class QERTDialog;
@@ -35,4 +36,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QERT_H
index e3a628822cf7384e4715e7f7107720e00c67e068..cea0345bed3652b693776f53456689e5c9f6f810 100644 (file)
 
 #include <config.h>
 
-
 #include "QERT.h"
 #include "QERTDialog.h"
 
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
 
 QERTDialog::QERTDialog(QERT * form)
        : QERTDialogBase(0, 0, false, 0),
@@ -39,3 +40,6 @@ void QERTDialog::change_adaptor()
 {
        form_->changed();
 }
+
+} // namespace frontend
+} // namespace lyx
index a1863e6c8111a4243425b0344c2a595497249669..06acb15a203cee9a6ce9c387e1e7c60361f22665 100644 (file)
@@ -14,6 +14,8 @@
 
 #include "ui/QERTDialogBase.h"
 
+namespace lyx {
+namespace frontend {
 
 class QERT;
 
@@ -29,4 +31,7 @@ private:
        QERT * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QERTDIALOG_H
index 1f43fc2d29b359b9b34795d91953638726473641..7e2dc17726b71400bf7378580e3c601c9234198d 100644 (file)
@@ -22,6 +22,9 @@
 #include <qtextbrowser.h>
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
+
 typedef QController<ControlErrorList, QView<QErrorListDialog> > base_class;
 
 QErrorList::QErrorList(Dialog & parent)
@@ -57,3 +60,6 @@ void QErrorList::update_contents()
 
        dialog_->errorsLB->setSelected(0, true);
 }
+
+} // namespace frontend
+} // namespace lyx
index e820a84ec9276820364d2ed9ff659334908cc9c8..c41f55871cb7c562c8892deec2a696f9ea7d4800 100644 (file)
 #ifndef QERRORLIST_H
 #define QERRORLIST_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlErrorList;
 class QErrorListDialog;
 
@@ -36,4 +38,7 @@ private:
        virtual void update_contents();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QERRORLIST_H
index 72f1efefd88e95f3ac38efb200acef48276a6ff9..0c6bc656598a703d9e9ebf7de8b1cee59e8d0b4e 100644 (file)
 
 #include <config.h>
 
-
 #include "QErrorList.h"
 #include "QErrorListDialog.h"
 
 #include <qlistbox.h>
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
 
 QErrorListDialog::QErrorListDialog(QErrorList * form)
        : QErrorListDialogBase(0, 0, false, 0),
@@ -44,3 +45,6 @@ void QErrorListDialog::closeEvent(QCloseEvent * e)
        form_->slotWMHide();
        e->accept();
 }
+
+} // namespace frontend
+} // namespace lyx
index b09752a07b8a49b3358072111541710dfd562d2e..a747c4fb3e628435f4b7d7fc5d38e70a9f714cee 100644 (file)
 #ifndef QERRORLISTDIALOG_H
 #define QERRORLISTDIALOG_H
 
-
 #include "ui/QErrorListDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QErrorList;
 
 class QErrorListDialog : public QErrorListDialogBase {
@@ -30,4 +32,7 @@ private:
        QErrorList * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QTOCERRORLIST_H
index 59187b0e47fda87898925ba41f3f0acc4f813074..8c082dca7c2eed1701368f49d5978b0c1f381d90 100644 (file)
@@ -50,6 +50,8 @@ using std::string;
 using std::vector;
 using std::find;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -96,7 +98,7 @@ void setDisplay(QCheckBox & displayCB, QComboBox & showCO, QLineEdit & scaleED,
        }
 
        showCO.setCurrentItem(item);
-       bool const no_display = display == lyx::external::NoDisplay;
+       bool const no_display = display == external::NoDisplay;
        showCO.setEnabled(!no_display && !read_only);
        displayCB.setChecked(!no_display);
        scaleED.setEnabled(!no_display && !read_only);
@@ -233,7 +235,7 @@ void setCrop(QCheckBox & clipCB,
             external::ClipData const & data)
 {
        clipCB.setChecked(data.clip);
-       lyx::graphics::BoundingBox const & bbox = data.bbox;
+       graphics::BoundingBox const & bbox = data.bbox;
        xlED.setText(toqstr(tostr(bbox.xl)));
        ybED.setText(toqstr(tostr(bbox.yb)));
        xrED.setText(toqstr(tostr(bbox.xr)));
@@ -499,3 +501,6 @@ void QExternal::getBB()
 
        controller().bbChanged(false);
 }
+
+} // namespace frontend
+} // namespace lyx
index fc52d621cd1b108632ca0f45ec327b173683207c..ae083266fef2d94ec28c82d9fa7b570d8addea8c 100644 (file)
 #ifndef QEXTERNAL_H
 #define QEXTERNAL_H
 
-
 #include "QDialogView.h"
 #include <map>
 
+namespace lyx {
+namespace frontend {
 
 class ControlExternal;
 class QExternalDialog;
@@ -47,4 +48,7 @@ private:
        MapType extra_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QEXTERNAL_H
index c579a014ffb01c16108a5736b284befbca377c40..39b14dde780176664c05aad0ce723a61ffbf1d28 100644 (file)
@@ -39,6 +39,8 @@ using lyx::support::isStrDbl;
 using lyx::support::strToDbl;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -204,3 +206,6 @@ void QExternalDialog::widthUnitChanged()
        heightUnitCO->setEnabled(useHeight);
        form_->changed();
 }
+
+} // namespace frontend
+} // namespace lyx
index 1ac74c111c0aaca21f842ebd5e69029a0f68c91d..34e79dabe16c92825e67a75511d718f95934a3ee 100644 (file)
 #ifndef QEXTERNALDIALOG_H
 #define QEXTERNALDIALOG_H
 
-
 #include "ui/QExternalDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QExternal;
 
 class QExternalDialog : public QExternalDialogBase {
@@ -42,4 +44,7 @@ private:
        QExternal * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QEXTERNALDIALOG_H
index 30e46211d4da5d2b16f33b5626a7efee19bbc2ed..4c0d1c95c18091b36db0a4ed1d26775b039c3a45 100644 (file)
@@ -21,6 +21,9 @@
 
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
+
 typedef QController<ControlFloat, QView<QFloatDialog> > base_class;
 
 
@@ -55,3 +58,6 @@ void QFloat::apply()
 
        params.placement = dialog_->floatFP->get(params.wide, params.sideways);
 }
+
+} // namespace frontend
+} // namespace lyx
index 6e637a519cbc655ee3da944f91904764911c66d1..d170634dbfce90bd39578f92803892791945e077 100644 (file)
 #ifndef QFLOAT_H
 #define QFLOAT_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 
 class ControlFloat;
 class QFloatDialog;
@@ -35,4 +37,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QFLOAT_H
index 76811dcbba694568e278c8dee7690dcf90facf6f..de55390115b698283728d6ed5e17752e5d538ffd 100644 (file)
@@ -10,9 +10,6 @@
 
 #include <config.h>
 
-
-
-
 #include "floatplacement.h"
 
 #include <qpushbutton.h>
@@ -20,6 +17,8 @@
 #include "QFloatDialog.h"
 #include "QFloat.h"
 
+namespace lyx {
+namespace frontend {
 
 QFloatDialog::QFloatDialog(QFloat * form)
        : QFloatDialogBase(0, 0, false, 0),
@@ -56,3 +55,6 @@ void QFloatDialog::closeEvent(QCloseEvent * e)
        form_->slotWMHide();
        e->accept();
 }
+
+} // namespace frontend
+} // namespace lyx
index 274c89dd83253c81441843044905398bf4d41e37..e7b18637bc134b7ab182713df96ca8ba2b10836b 100644 (file)
 #ifndef QFLOATDIALOG_H
 #define QFLOATDIALOG_H
 
-
 #include "ui/QFloatDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QFloat;
 
 class QFloatDialog : public QFloatDialogBase {
@@ -32,4 +34,7 @@ private:
        QFloat * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QFLOATDIALOG_H
index 6ece7d2ddc1607ba98ec7136d3caf2a017c41c22..b9734654d48a38bb228e72dfb831d76e6043ce8b 100644 (file)
@@ -49,6 +49,8 @@ using std::floor;
 using std::vector;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlGraphics, QView<QGraphicsDialog> > base_class;
 
@@ -128,7 +130,7 @@ int getUnitNo(char const * const c[], string const & s) {
 void QGraphics::update_contents()
 {
        // clear and fill in the comboboxes
-       vector<string> const bb_units = frnt::getBBUnits();
+       vector<string> const bb_units = lyx::frontend::getBBUnits();
        dialog_->lbXunit->clear();
        dialog_->lbYunit->clear();
        dialog_->rtXunit->clear();
@@ -280,7 +282,7 @@ void QGraphics::update_contents()
 
        dialog_->origin->clear();
 
-       using namespace frnt;
+       using namespace lyx::frontend;
        vector<RotationOriginPair> origindata = getRotationOriginData();
        vector<string> const origin_lang = getFirst(origindata);
        QGraphics::origin_ltx = getSecond(origindata);
@@ -291,7 +293,7 @@ void QGraphics::update_contents()
 
        if (!igp.rotateOrigin.empty())
                dialog_->origin->setCurrentItem(
-                       ::getItemNo(origin_ltx, igp.rotateOrigin));
+                       getItemNo(origin_ltx, igp.rotateOrigin));
        else
                dialog_->origin->setCurrentItem(0);
 
@@ -425,3 +427,6 @@ void QGraphics::slotEdit()
 {
        controller().editGraphics();
 }
+
+} // namespace frontend
+} // namespace lyx
index 7783cbf4fd44f89643ada87f2884851833f7697f..298a32cfc53733fd35eb200bd614881cbedded6f 100644 (file)
 #ifndef QGRAPHICS_H
 #define QGRAPHICS_H
 
-
 #include "QDialogView.h"
 #include <vector>
 
+namespace lyx {
+namespace frontend {
 
 class ControlGraphics;
 class QGraphicsDialog;
@@ -49,4 +50,7 @@ private:
 
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QGRAPHICS_H
index 8ba4dc7fbaea772976ea88b5dd39cb87eef7646a..2d234e5798873a4f681aa0d94410ccd92665a21a 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <config.h>
 
-
 #include "ControlGraphics.h"
 #include "debug.h"
 #include "qt_helpers.h"
@@ -26,6 +25,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 QGraphicsDialog::QGraphicsDialog(QGraphics * form)
        : QGraphicsDialogBase(0, 0, false, 0),
@@ -101,3 +102,6 @@ void QGraphicsDialog::edit_clicked()
 {
        form_->controller().editGraphics();
 }
+
+} // namespace frontend
+} // namespace lyx
index c2916b1410de2417fbe3fb3fc22c14519295ab14..fbae6bb39b493ddc3a3435d77727c27cfd72a21c 100644 (file)
 #ifndef QGRAPHICSDIALOG_H
 #define QGRAPHICSDIALOG_H
 
-
 #include "ui/QGraphicsDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QGraphics;
 
 class QGraphicsDialog : public QGraphicsDialogBase {
@@ -37,4 +39,7 @@ private:
        QGraphics * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QGRAPHICSDIALOG_H
index d5f9959b80856f9eb5d887954b68e1835768eb54..d8beb5f6aec62a6c32e65701315c396b1cf356b8 100644 (file)
@@ -25,6 +25,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlInclude, QView<QIncludeDialog> > base_class;
 
@@ -138,3 +140,6 @@ bool QInclude::isValid()
 {
        return !dialog_->filenameED->text().isEmpty();
 }
+
+} // namespace frontend
+} // namespace lyx
index ea007a71803c6cedb10d50ee1b9acbd8bb655164..99a36da499491553361b8d05051305123e752f1f 100644 (file)
 #ifndef QINCLUDE_H
 #define QINCLUDE_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlInclude;
 class QIncludeDialog;
@@ -44,4 +45,7 @@ private:
        void browse();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QINCLUDE_H
index 16addf6b200ae43f770ba82c7a64b25150e7db8b..8c3883e859f8fb761c30cfb2f23cba794e9fbc01 100644 (file)
@@ -10,8 +10,6 @@
 
 #include <config.h>
 
-
-
 #include <qpushbutton.h>
 #include <qcheckbox.h>
 #include <qlineedit.h>
@@ -19,7 +17,8 @@
 #include "QIncludeDialog.h"
 #include "QInclude.h"
 
-
+namespace lyx {
+namespace frontend {
 
 QIncludeDialog::QIncludeDialog(QInclude * form)
        : QIncludeDialogBase(0, 0, false, 0),
@@ -87,3 +86,6 @@ void QIncludeDialog::browseClicked()
 {
        form_->browse();
 }
+
+} // namespace frontend
+} // namespace lyx
index 6374b89d04a7338ae41c58299f59ed8e973a339a..1490840876bd0a1bfb84e2efe8c34cccae51097d 100644 (file)
 #ifndef QINCLUDEDIALOG_H
 #define QINCLUDEDIALOG_H
 
-
 #include "ui/QIncludeDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QInclude;
 
 class QIncludeDialog : public QIncludeDialogBase {
@@ -36,4 +38,7 @@ private:
        QInclude * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QINCLUDEDIALOG_H
index 60b7627f83298288623fd94893526ead49b20129..a3cf1e6be5e8e77a910f5eb5c1ea38010d7db3a4 100644 (file)
@@ -24,6 +24,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 typedef QController<ControlCommand, QView<QIndexDialog> > base_class;
 
 
@@ -64,3 +67,6 @@ bool QIndex::isValid()
 {
        return !dialog_->keywordED->text().isEmpty();
 }
+
+} // namespace frontend
+} // namespace lyx
index a22020aeb04191a942b702b69e4a436dd7b05f11..020dbc097fbcfb8f6eb0d18918c8cd061ed81db1 100644 (file)
 #ifndef QINDEX_H
 #define QINDEX_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlCommand;
 class QIndexDialog;
 
@@ -41,4 +43,7 @@ private:
        QString const label_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QINDEX_H
index 372c9f1a60e40b5183f75d0cda5e77e6dbe9151c..4df39df93c8ed04538eb3687098170064fbc8296 100644 (file)
@@ -19,6 +19,8 @@
 #include <qlineedit.h>
 #include <qwhatsthis.h>
 
+namespace lyx {
+namespace frontend {
 
 QIndexDialog::QIndexDialog(QIndex * form)
        : QIndexDialogBase(0, 0, false, 0),
@@ -70,3 +72,6 @@ void QIndexDialog::closeEvent(QCloseEvent * e)
        form_->slotWMHide();
        e->accept();
 }
+
+} // namespace frontend
+} // namespace lyx
index b348fa8efc4fb0665633966b766e8af8f6e8d981..8a65af8ffcaa0073038b2cd1135144afd1be4be9 100644 (file)
 #ifndef QINDEXDIALOG_H
 #define QINDEXDIALOG_H
 
-
 #include "ui/QIndexDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QIndex;
 
 class QIndexDialog : public QIndexDialogBase {
@@ -32,4 +34,7 @@ private:
        QIndex * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QINDEXDIALOG_H
index 9fafbc54033823a5fae6b45cfd15d65735fd2363..27d1de10700bd4725711038f9f1e720046b5f706 100644 (file)
@@ -23,6 +23,8 @@
 using std::pair;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 QLMenubar::QLMenubar(LyXView * view, MenuBackend const & mbe)
        : owner_(static_cast<QtView*>(view)), menubackend_(mbe)
@@ -73,3 +75,6 @@ MenuBackend const & QLMenubar::backend()
 {
        return menubackend_;
 }
+
+} // namespace frontend
+} // namespace lyx
index ae14ae2148425631718b6dca37e2f1f561bd94cc..98dcf812b45465459a0b691ccb0a438591d84ca6 100644 (file)
@@ -10,7 +10,6 @@
  * Full author contact details are available in file CREDITS.
  */
 
-
 #ifndef QLMENUBAR_H
 #define QLMENUBAR_H
 
 #include <map>
 
 class LyXView;
-class QtView;
 class MenuBackend;
+
+namespace lyx {
+namespace frontend {
+
 class QLPopupMenu;
+class QtView;
 
 class QLMenubar : public Menubar {
 public:
@@ -51,4 +54,7 @@ private:
        NameMap name_map_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QLMENUBAR_H
index 490435026c17c43a20384c98c44f24b0d10272f0..76bf2a7a7d507d260753c440fd5e855881a150f8 100644 (file)
 #include "QLPopupMenu.h"
 #include "qt_helpers.h"
 
-using lyx::support::subst;
-
 using std::distance;
 using std::make_pair;
 using std::string;
 using std::pair;
 
+namespace lyx {
+
+using support::subst;
+
+namespace frontend {
 
 namespace {
 
@@ -118,3 +121,6 @@ void QLPopupMenu::showing()
        owner_->backend().expand(frommenu, tomenu, owner_->view());
        populate(&tomenu);
 }
+
+} // namespace frontend
+} // namespace lyx
index e86c03113f42fbdd8fb6e253291421ce43e8dd48..7afc37f89e93178e05d490bc4fb02fa3984cc91b 100644 (file)
@@ -12,7 +12,6 @@
 #ifndef QLPOPUPMENU_H
 #define QLPOPUPMENU_H
 
-
 #include <qpopupmenu.h>
 
 #include "funcrequest.h"
@@ -24,6 +23,10 @@ class MenuBackend;
 class MenuItem;
 class Menu;
 class QMenuData;
+
+namespace lyx {
+namespace frontend {
+
 class QLMenubar;
 class QLPopupMenu;
 
@@ -59,4 +62,7 @@ private:
        Funcs funcs_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QLPOPUPMENU_H
index 8679e77b4b9975371857481df4eb11bcd9f1f2ce..7a311726665c57130c3e8055bb8b82b75b0c7a16 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <config.h>
 
-
 #include "qt_helpers.h"
 
 #include "QPrint.h"
@@ -23,6 +22,8 @@
 #include <qpushbutton.h>
 #include <qradiobutton.h>
 
+namespace lyx {
+namespace frontend {
 
 QLPrintDialog::QLPrintDialog(QPrint * f)
        : QPrintDialogBase(0, 0, false, 0),
@@ -81,3 +82,6 @@ void QLPrintDialog::pagerangeChanged()
 {
        form_->changed();
 }
+
+} // namespace frontend
+} // namespace lyx
index af460dcbdaf363fc8755458ccb9a2fc254408159..ab1110bddf0a40177febb388a5d9e4e411a5e674 100644 (file)
 #ifndef QLPRINTDIALOG_H
 #define QLPRINTDIALOG_H
 
-
 #include "ui/QPrintDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QPrint;
 
 class QLPrintDialog : public QPrintDialogBase {
@@ -33,4 +35,7 @@ private:
        QPrint * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QLPRINTDIALOG_H
index 2c79d50266061af6e45c71663daa278e0e559b56..72d4c2c16b8bb9960298edce0eb56f715879c2af 100644 (file)
@@ -32,6 +32,8 @@
 using std::endl;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -162,13 +164,18 @@ void QLayoutBox::selected(const QString & str)
        lyxerr << "ERROR (QLayoutBox::selected): layout not found!" << endl;
 }
 
+} // namespace frontend
+} // namespace lyx
 
 Toolbars::ToolbarPtr make_toolbar(ToolbarBackend::Toolbar const & tbb,
                                  LyXView & owner)
 {
+       using lyx::frontend::QLToolbar;
        return Toolbars::ToolbarPtr(new QLToolbar(tbb, owner));
 }
 
+namespace lyx {
+namespace frontend {
 
 QLToolbar::QLToolbar(ToolbarBackend::Toolbar const & tbb, LyXView & owner)
        : owner_(dynamic_cast<QtView &>(owner)),
@@ -258,3 +265,6 @@ void QLToolbar::clicked()
        else
                lyxerr << "non existent tool button selected !" << endl;
 }
+
+} // namespace frontend
+} // namespace lyx
index 572f216ae13138abe9ff38517f6b7e2a63475c93..37b6e0ed1531a3d4559d65622409a31b00d8456c 100644 (file)
 
 #include <qobject.h>
 
-
 class QComboBox;
 class QToolBar;
 class QToolButton;
 
-class QtView;
+namespace lyx {
+namespace frontend {
+
 class QLayoutBox;
+class QtView;
 class QLToolbar;
 
 
@@ -78,4 +80,7 @@ private:
        boost::scoped_ptr<QLayoutBox> layout_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // NOT QLTOOLBAR_H
index 64dabd1f6682c11017bb827e7f8cb6c1858473ec..cc3dedfda8eac8252217bd39e0eaf0e5b70aca75 100644 (file)
@@ -22,6 +22,8 @@
 #include <qtextview.h>
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlLog, QView<QLogDialog> > base_class;
 
@@ -45,3 +47,6 @@ void QLog::update_contents()
 
        dialog_->logTV->setText(toqstr(ss.str()));
 }
+
+} // namespace frontend
+} // namespace lyx
index 59af95e0e5b568fc0d83f9392cdfeabd4121b98a..0853789a41806f069a580eb7c2b94fd624f6e2c1 100644 (file)
 #ifndef QLOG_H
 #define QLOG_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlLog;
 class QLogDialog;
@@ -37,4 +38,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QLOG_H
index c0ad20f6944c8a05b60b40a8f0241c20597cf504..516b52c247610380cb4aa9d9c5af049fcefdaa55 100644 (file)
 
 #include <config.h>
 
-
-
 #include <qpushbutton.h>
 
 #include "QLogDialog.h"
 #include "QLog.h"
 
-
+namespace lyx {
+namespace frontend {
 
 QLogDialog::QLogDialog(QLog * form)
        : QLogDialogBase(0, 0, false, 0),
@@ -39,3 +38,6 @@ void QLogDialog::updateClicked()
 {
        form_->update_contents();
 }
+
+} // namespace frontend
+} // namespace lyx
index 3a55e6015fd70252961d473a19501f26cb128c07..6c859e126d31a567f126ade40feb3155347dca0c 100644 (file)
 #ifndef QLOGDIALOG_H
 #define QLOGDIALOG_H
 
-
 #include "ui/QLogDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QLog;
 
 class QLogDialog : public QLogDialogBase {
@@ -29,4 +31,7 @@ private:
        QLog * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QLOGDIALOG_H
index 1060a2980571b4f7cb994eb64cf826d0ff8e760b..98543a7278729b14e3aab5186799b3cf6cba29f8 100644 (file)
 
 #include <config.h>
 
-
 #include "gettext.h"
 #include "QMathDialog.h"
 #include "QMathMatrixDialog.h"
 #include "QDelimiterDialog.h"
 #include "QMath.h"
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlMath, QView<QMathDialog> > math_base;
 
@@ -58,3 +59,6 @@ void QMathDelimiter::build_dialog()
 {
        dialog_.reset(new QDelimiterDialog(this));
 }
+
+} // namespace frontend
+} // namespace lyx
index d98d0352ad4f3bedd45bbc996a862e9c92abd024..8dbcef822ed812f702a35fbc057af151b18147fa 100644 (file)
 #ifndef QMATH_H
 #define QMATH_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlMath;
 class QMathDialog;
 class QMathMatrixDialog;
@@ -61,4 +63,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QMATH_H
index 933b9057a8940d8da5a0892a20d6233bc6828dd9..9613605ccfab3decab19851b8ad3f3649d87cc62 100644 (file)
@@ -28,6 +28,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 class QScrollViewSingle : public QScrollView {
 public:
@@ -309,3 +311,6 @@ void QMathDialog::insertFont(int id)
        }
        form_->controller().dispatchInsert(str);
 }
+
+} // namespace frontend
+} // namespace lyx
index 3a1c70ea66d3674886a976879616c29372f6c5e4..41874330bf6f1fe3bf3f1aac3e6450938b73b4ad 100644 (file)
 #include "ui/QMathDialogBase.h"
 #include <string>
 
+class IconPalette;
+
+namespace lyx {
+namespace frontend {
 
 class QMath;
-class IconPalette;
 
 class QMathDialog : public QMathDialogBase
 {
@@ -54,4 +57,7 @@ private:
        QMath * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QMATHDIALOG_H
index 4ede05e30d7cdf9b4a867f0933ff193363f60678..765d2816e7abf18fdfb1b2896fe7e828403b8e43 100644 (file)
 using std::ostringstream;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
-static char h_align_str[80] = "c";
-static char v_align_c[] = "tcb";
+namespace {
+
+char h_align_str[80] = "c";
+char v_align_c[] = "tcb";
+
+} // namespace anon
 
 
 QMathMatrixDialog::QMathMatrixDialog(QMathMatrix * form)
@@ -94,3 +100,6 @@ void QMathMatrixDialog::slotClose()
 {
        close();
 }
+
+} // namespace frontend
+} // namespace lyx
index 0f5815081180fc7e44175d0f1ec9f064e5b9b813..c36a8749ef48a9cbab09a559dd7e6c8b9748b79f 100644 (file)
 #ifndef QMATHMATRIXDIALOG_H
 #define QMATHMATRIXDIALOG_H
 
-
 #include "ui/QMathMatrixDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QMathMatrix;
 
 class QMathMatrixDialog : public QMathMatrixDialogBase {
@@ -34,4 +36,7 @@ private:
        QMathMatrix * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QMATHMATRIXDIALOG_H
index a6cfd48e69479b09d475a8e26308fc298da6494e..9bca052eb5d593a0b26c6eb16b3582d705238027 100644 (file)
@@ -23,6 +23,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlNote, QView<QNoteDialog> > base_class;
 
@@ -74,3 +76,6 @@ void QNote::apply()
 
        controller().params().type = type;
 }
+
+} // namespace frontend
+} // namespace lyx
index 3165115f293c9ebe947ae35c04e84dc6cf7187b3..e7f188b18357c0c5fb063c5d9ecd94552f9bd6b6 100644 (file)
@@ -14,6 +14,8 @@
 
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlNote;
 class QNoteDialog;
@@ -36,4 +38,7 @@ private:
        virtual void update_contents();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QNOTE_H
index a1e2bd4e2b6a90c0feacde970aa042100209e9c5..6130cd2e03e4beccf534fe04d7934e3b8f46f579 100644 (file)
 
 #include <config.h>
 
-
 #include "QNote.h"
 #include "QNoteDialog.h"
 
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
 
 QNoteDialog::QNoteDialog(QNote * form)
        : QNoteDialogBase(0, 0, false, 0),
@@ -39,3 +40,6 @@ void QNoteDialog::change_adaptor()
 {
        form_->changed();
 }
+
+} // namespace frontend
+} // namespace lyx
index 1f487b2de1942be3c75553456589820e0a5f45fb..d12eb460026a685cc98e7082985599f97a9f59c2 100644 (file)
@@ -14,6 +14,8 @@
 
 #include "ui/QNoteDialogBase.h"
 
+namespace lyx {
+namespace frontend {
 
 class QNote;
 
@@ -29,4 +31,7 @@ private:
        QNote * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QNOTEDIALOG_H
index 5ef2a5059c7665f7dd0dee4237d5553e5a8a6167..98ed3a7fb66e8e48653a71d9b87d586ca5a5b9ae 100644 (file)
@@ -31,6 +31,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlParagraph, QView<QParagraphDialog> > base_class;
 
@@ -177,3 +179,6 @@ void QParagraph::update_contents()
                dialog_->linespacingValue->setEnabled(false);
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index 3f314297fe83c2239803e483eccc3a57516ea1be..d036659fb60054c23db1ca021a88066464c1f317 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlParagraph;
 class QParagraphDialog;
@@ -36,4 +38,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QPARAGRAPH_H
index 542138521fe766db9acad1123eb3cd959c2297be..89d884bb002b5ed85673dbbb4b23ca49c37d5cb6 100644 (file)
@@ -22,6 +22,8 @@
 
 #include "qt_helpers.h"
 
+namespace lyx {
+namespace frontend {
 
 QParagraphDialog::QParagraphDialog(QParagraph * form)
        : QParagraphDialogBase(0, 0, false, 0),
@@ -69,3 +71,6 @@ void QParagraphDialog::enableLinespacingValue(int)
        bool const enable = linespacing->currentItem() == 4;
        linespacingValue->setEnabled(enable);
 }
+
+} // namespace frontend
+} // namespace lyx
index b85b1b78929c5b6f953622eb5ea90953e3e5e8e1..97af55d10e2d4d9bfd1f02b968b8d9a0f0a29d0c 100644 (file)
 #ifndef QPARAGRAPHDIALOG_H
 #define QPARAGRAPHDIALOG_H
 
-
 #include "ui/QParagraphDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QParagraph;
 
 class QParagraphDialog : public QParagraphDialogBase {
@@ -31,4 +33,7 @@ protected slots:
        void enableLinespacingValue(int);
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QPARAGRAPHDIALOG_H
index f1c7b80320f0d04b71215d0edfbdaac10609dbe0..f803549bb2ea724491783fde73c08c6500940f3e 100644 (file)
@@ -64,6 +64,8 @@ using std::ostringstream;
 using std::pair;
 using std::vector;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlPrefs, QView<QPrefsDialog> > base_class;
 
@@ -98,11 +100,13 @@ void QPrefs::build_dialog()
 
        langmod->defaultLanguageCO->clear();
        // store the lang identifiers for later
-       vector<frnt::LanguagePair> const langs = frnt::getLanguageData(false);
+       using lyx::frontend::LanguagePair;
+       vector<LanguagePair> const langs =
+               lyx::frontend::getLanguageData(false);
        lang_ = getSecond(langs);
 
-       vector<frnt::LanguagePair>::const_iterator lit  = langs.begin();
-       vector<frnt::LanguagePair>::const_iterator lend = langs.end();
+       vector<LanguagePair>::const_iterator lit  = langs.begin();
+       vector<LanguagePair>::const_iterator lend = langs.end();
        for (; lit != lend; ++lit) {
                langmod->defaultLanguageCO->insertItem(toqstr(lit->first));
        }
@@ -615,3 +619,6 @@ void QPrefs::update_contents()
 
        dialog_->updateConverters();
 }
+
+} // namespace frontend
+} // namespace lyx
index 368dde630b47d530df3624b731da409d9c8e1d17..ae188acaeba42805d4fcfdbf14b28218c3c562c0 100644 (file)
 #include "QDialogView.h"
 #include <vector>
 
+class Formats;
+
+namespace lyx {
+namespace frontend {
+
 class QPrefsDialog;
 class Controllers;
-class Formats;
 
 class QPrefs
        : public QController<ControlPrefs, QView<QPrefsDialog> >
@@ -45,4 +49,7 @@ private:
        std::vector<std::string> lang_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QPREFS_H
index ab0aca780307ebbcacfd7b2efcb019a3d2824412..cd8389e8c7bb3bfb4bad634d8d55e1b12fc5c5aa 100644 (file)
@@ -14,7 +14,6 @@
 #include "ControlPrefs.h"
 #include "QPrefs.h"
 
-
 #include "QPrefsDialog.h"
 
 #include "ui/QPrefAsciiModule.h"
@@ -49,6 +48,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 QPrefsDialog::QPrefsDialog(QPrefs * form)
        : QPrefsDialogBase(0, 0, false, 0), form_(form)
@@ -547,3 +548,6 @@ void QPrefsDialog::select_typewriter(const QString& name)
 {
        screenfontsModule->screenTypewriterFE->set(QFont(name), name);
 }
+
+} // namespace frontend
+} // namespace lyx
index 2f1afcc6d6aba63e003312ef6724947c4d29dd99..bfee6679628f56ca7062adb099d790dd828b755a 100644 (file)
 #ifndef QPREFSDIALOG_H
 #define QPREFSDIALOG_H
 
-
 #include "ui/QPrefsDialogBase.h"
 
 #include <vector>
 
 class LColor_color;
-class QPrefs;
 class QPrefAsciiModule;
 class QPrefDateModule;
 class QPrefKeyboardModule;
@@ -35,6 +33,11 @@ class QPrefPrinterModule;
 class QPrefUIModule;
 class QPrefIdentityModule;
 
+namespace lyx {
+namespace frontend {
+
+class QPrefs;
+
 class QPrefsDialog : public QPrefsDialogBase {
        Q_OBJECT
 public:
@@ -104,4 +107,7 @@ private:
        QPrefs * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // PREFSDIALOG_H
index 730bd8d7c3e88950cba437c7f98ba81e16359ec0..3642a58308cb45e23fd5a93adbcd24585f535637 100644 (file)
@@ -26,6 +26,8 @@
 #include <qspinbox.h>
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlPrint, QView<QLPrintDialog> > base_class;
 
@@ -104,3 +106,6 @@ void QPrint::apply()
 
        controller().params() = pp;
 }
+
+} // namespace frontend
+} // namespace lyx
index f3b390ee7b8da3746a179fe5821efc86e251d5f8..6c537214665acc258e5e3994f72082bd86f56f8e 100644 (file)
@@ -15,6 +15,9 @@
 
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlPrint;
 class QLPrintDialog;
 
@@ -36,4 +39,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QPRINT_H
index 583c58f9df00f08ccbc5a829d5ca864206de4ca9..ea575b42f00ba749523a44a9cc04010da9be5559 100644 (file)
@@ -31,6 +31,8 @@
 using std::vector;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlRef, QView<QRefDialog> > base_class;
 
@@ -218,3 +220,6 @@ void QRef::updateRefs()
        dialog_->gotoPB->setEnabled(!refs_.empty());
        redoRefs();
 }
+
+} // namespace frontend
+} // namespace lyx
index 6b20057324491f3cfac79b28d1d6e951df7d38d8..f23d0aa3c1d72488e55cdc5c4a71f4e9f0a45c36 100644 (file)
@@ -16,6 +16,8 @@
 
 #include <vector>
 
+namespace lyx {
+namespace frontend {
 
 class ControlRef;
 class QRefDialog;
@@ -70,4 +72,7 @@ private:
        std::vector<std::string> refs_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QREF_H
index 1bae4f09762401ff163a8ef5184751c6dbe7efe0..10fae38502e0b4bdeec046b487725c1a4e7ea56b 100644 (file)
@@ -11,8 +11,6 @@
 
 #include <config.h>
 
-
-
 #include "QRef.h"
 #include "QRefDialog.h"
 
@@ -21,6 +19,8 @@
 #include <qcombobox.h>
 #include <qlistbox.h>
 
+namespace lyx {
+namespace frontend {
 
 QRefDialog::QRefDialog(QRef * form)
        : QRefDialogBase(0, 0, false, 0),
@@ -95,3 +95,6 @@ void QRefDialog::closeEvent(QCloseEvent * e)
        form_->slotWMHide();
        e->accept();
 }
+
+} // namespace frontend
+} // namespace lyx
index 2e0b2faae4391e633db5f5dab920385f4390d3ed..4fbd5ad70ea338725f4ffab9ec3071a9f49ce17f 100644 (file)
 #ifndef QREFDIALOG_H
 #define QREFDIALOG_H
 
-
 #include "ui/QRefDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QRef;
 
 class QRefDialog : public QRefDialogBase {
@@ -39,4 +41,7 @@ private:
        QRef * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QREFDIALOG_H
index 53761d03660eb122c073fae61fdb0d06ceb9333b..39e9885630784b9337ef29fbb7af0700ccfcc086 100644 (file)
@@ -22,6 +22,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlSearch, QView<QSearchDialog> > base_class;
 
@@ -59,3 +61,6 @@ void QSearch::replace(string const & findstr, string const & replacestr,
        controller().replace(findstr, replacestr, casesens, words,
                             !backwards, all);
 }
+
+} // namespace frontend
+} // namespace lyx
index 55dc44b3627bf6074906b9df9e92f463facc894b..de4a3c0356ebebfb26179105fc3f5fa228321ad0 100644 (file)
 
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlSearch;
 class QSearchDialog;
 
-
 ///
 class QSearch
        : public QController<ControlSearch, QView<QSearchDialog> >
@@ -43,4 +45,7 @@ private:
                     bool casesens, bool words, bool backwards, bool all);
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QSEARCH_H
index 113202d11af8e58678181d9bae539e19cb6a1564..adc8b2406994bd0842b042b2e9500dbc1f08236e 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <config.h>
 
-
 #include "ControlSearch.h"
 #include "QSearchDialog.h"
 #include "QSearch.h"
@@ -23,6 +22,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 namespace {
 
 void uniqueInsert(QComboBox * box, QString const & text)
@@ -110,3 +112,6 @@ void QSearchDialog::replaceallClicked()
        uniqueInsert(findCO, findCO->currentText());
        uniqueInsert(replaceCO, replaceCO->currentText());
 }
+
+} // namespace frontend
+} // namespace lyx
index bd47dedebb4b3c83cab26810b7c60be9c3739883..c6cccffe533686aa5a07cd614037bbecc18d5035 100644 (file)
 #ifndef QSEARCHDIALOG_H
 #define QSEARCHDIALOG_H
 
-
 #include "ui/QSearchDialogBase.h"
 #include <string>
 
-class QSearch;
 class QCloseEvent;
 class QComboBox;
 
+namespace lyx {
+namespace frontend {
+
+class QSearch;
+
 class QSearchDialog : public QSearchDialogBase {
        Q_OBJECT
 public:
@@ -41,4 +44,7 @@ private:
        QSearch * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QSEARCHDIALOG_H
index 5bfb010f1cce510a620a89d76bd8635f5d6d24a9..5092142abbf114aa19c0d4b063ec6c547e2676f1 100644 (file)
@@ -25,6 +25,9 @@
 using std::vector;
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 typedef QController<ControlSendto, QView<QSendtoDialog> > base_class;
 
 
@@ -97,3 +100,6 @@ bool QSendto::isValid()
        else return dialog_->formatLB->count() != 0 &&
                !dialog_->commandCO->currentText().isEmpty();
 }
+
+} // namespace frontend
+} // namespace lyx
index 7234756736cef385cd0deda24e220428cffb0bc5..734b76c0b02c3810370177d7d46396b296db9934 100644 (file)
 
 #include <vector>
 
+class Format;
+
+namespace lyx {
+namespace frontend {
+
 class ControlSendto;
 class QSendtoDialog;
-class Format;
 
 /** This class provides a Qt implementation of the Custom Export Dialog.
  */
@@ -43,4 +47,7 @@ private:
        std::vector<Format const *> all_formats_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QSENDTO_H
index 43c23f367a321bf548c1c98eabccfe29a964e12e..32bb4c1a3048de3a1421e47da8a6af8d90f96608 100644 (file)
 
 #include <config.h>
 
-
-
-
 #include <qpushbutton.h>
 
 #include "QSendtoDialog.h"
 #include "QSendto.h"
 
+namespace lyx {
+namespace frontend {
 
 QSendtoDialog::QSendtoDialog(QSendto * form)
        : QSendtoDialogBase(0, 0, false, 0),
@@ -43,3 +42,6 @@ void QSendtoDialog::closeEvent(QCloseEvent * e)
        form_->slotWMHide();
        e->accept();
 }
+
+} // namespace frontend
+} // namespace lyx
index 40915ea1bd53784ad6fa7fbe53944f9d0e4ac627..2b4af2119e075e8e59aa3d74ef46c339c14a2e79 100644 (file)
 #ifndef QSENDTODIALOG_H
 #define QSENDTODIALOG_H
 
-
 #include "ui/QSendtoDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QSendto;
 
 class QSendtoDialog : public QSendtoDialogBase {
@@ -31,4 +33,7 @@ private:
        QSendto * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QSENDTODIALOG_H
index e96ace94f79419c0ad1f5b2996977ca2ff43084c..06d5004bff3fcdc061919b6fad4ef015b7a3e43b 100644 (file)
@@ -23,6 +23,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 typedef QController<ControlShowFile, QView<QShowFileDialog> > base_class;
 
 
@@ -51,3 +54,6 @@ void QShowFile::update_contents()
 
        dialog_->text->setText(toqstr(contents));
 }
+
+} // namespace frontend
+} // namespace lyx
index 1a89d677a0c8d6ad63e6bbf0a49f28311aff93ec..8421e09b735c74a50ef0fca992ce9fa474c3f03e 100644 (file)
 #ifndef QSHOWFILE_H
 #define QSHOWFILE_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlShowFile;
 class QShowFileDialog;
@@ -36,4 +37,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QSHOWFILE_H
index c3552a9ba15f03a111fede588b1a290086168ee3..0514530669c18da0fd1b02a5c1eda77746cb6116 100644 (file)
 
 #include <config.h>
 
-
 #include "QShowFile.h"
 #include "QShowFileDialog.h"
 
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
 
 QShowFileDialog::QShowFileDialog(QShowFile * form)
        : QShowFileDialogBase(0, 0, false, 0),
@@ -31,3 +32,6 @@ void QShowFileDialog::closeEvent(QCloseEvent * e)
        form_->slotWMHide();
        e->accept();
 }
+
+} // namespace frontend
+} // namespace lyx
index 5625db618a0835785c592865e812e75c195406b8..95ad9f6c687db7e6f9c2aaef29bfe218edbc05bd 100644 (file)
 #ifndef QSHOWFILEDIALOG_H
 #define QSHOWFILEDIALOG_H
 
-
 #include "ui/QShowFileDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QShowFile;
 
 class QShowFileDialog : public QShowFileDialogBase {
@@ -27,4 +29,7 @@ private:
        QShowFile * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QSHOWFILEDIALOG_H
index ad09f5e84862727c74af4771d1612c353112098d..572cf7953aba4baffae7f765d590aba58ab3b090 100644 (file)
@@ -27,6 +27,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 typedef QController<ControlSpellchecker, QView<QSpellcheckerDialog> > base_class;
 
 
@@ -104,3 +107,6 @@ void QSpellchecker::partialUpdate(int s)
 
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index 2c961f1bdcd979500bc590d245c98dd162303f4e..542c8d62b27af433080ec1d05fe97d83039ca6c4 100644 (file)
@@ -15,6 +15,9 @@
 
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlSpellchecker;
 class QSpellcheckerDialog;
 
@@ -43,4 +46,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QSPELLCHECKER_H
index 11fb8215250b4700b977260076b54e3666a39524..35fa29bdddefa8e73abb5355781875df929c13cf 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <config.h>
 
-
 #include "QSpellcheckerDialog.h"
 #include "QSpellchecker.h"
 
@@ -18,6 +17,8 @@
 #include <qlistbox.h>
 #include <qcombobox.h>
 
+namespace lyx {
+namespace frontend {
 
 QSpellcheckerDialog::QSpellcheckerDialog(QSpellchecker * form)
        : QSpellcheckerDialogBase(0, 0, false, 0),
@@ -91,3 +92,6 @@ void QSpellcheckerDialog::reject()
        form_->slotWMHide();
        QSpellcheckerDialogBase::reject();
 }
+
+} // namespace frontend
+} // namespace lyx
index 8de2c2ac73e4e3dee7c5aaffa736326535a51f6d..aa37391e1b26c5adc2ec3c0bd8f18b4ddb47cfb8 100644 (file)
 #ifndef QSPELLCHECKERDIALOG_H
 #define QSPELLCHECKERDIALOG_H
 
-
 #include "ui/QSpellcheckerDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QSpellchecker;
 
 class QSpellcheckerDialog : public QSpellcheckerDialogBase {
@@ -39,4 +41,7 @@ private:
        QSpellchecker * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QSPELLCHECKERDIALOG_H
index e0af1dff893c92bed9c906e2ef89895660bb12fa..b12715b136c509ee2059e54dcbd3a8f9275bb641 100644 (file)
@@ -30,6 +30,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlTabular, QView<QTabularDialog> > base_class;
 
@@ -361,3 +363,6 @@ void QTabular::closeGUI()
                        controller().set(LyXTabular::SET_PWIDTH, width);
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index ced67eedc1a905a2a9711aeb4d172a61871da24a..6780422fe07e58e33f5e79b562cb4521ede95693 100644 (file)
 #ifndef QTABULAR_H
 #define QTABULAR_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlTabular;
 class QTabularDialog;
@@ -47,4 +48,7 @@ private:
        virtual void closeGUI();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QTABULAR_H
index 5b4aab30748d80668e4dccf3cbf68ab641755f0d..843766768d5a2ce3eff7934cf5a00a6b2af864ee 100644 (file)
@@ -19,6 +19,9 @@
 #include <qspinbox.h>
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
+
 typedef QController<ControlTabularCreate, QView<QTabularCreateDialog> > base_class;
 
 
@@ -42,3 +45,6 @@ void QTabularCreate::apply()
        controller().params().first = dialog_->rowsSB->value();
        controller().params().second = dialog_->columnsSB->value();
 }
+
+} // namespace frontend
+} // namespace lyx
index 8a79afbee8fe3e67572b38eeb97911e1c6dbe3a0..8039bf9bd71cbbaf41129b6201e5962c2b99c442 100644 (file)
 #ifndef QTABULARCREATE_H
 #define QTABULARCREATE_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlTabularCreate;
 class QTabularCreateDialog;
 
-
 ///
 class QTabularCreate
        : public QController<ControlTabularCreate, QView<QTabularCreateDialog> >
@@ -38,4 +38,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QTABULARCREATE_H
index 99a19d3bcef67b9fafec44278bd6a3cf91924d43..ef862dc6e59fb0f5f9f48e195eaf3bc0ad3a540f 100644 (file)
@@ -11,9 +11,6 @@
 
 #include <config.h>
 
-
-
-
 #include "QTabularCreate.h"
 #include "QTabularCreateDialog.h"
 
@@ -21,6 +18,8 @@
 #include <qspinbox.h>
 #include "emptytable.h"
 
+namespace lyx {
+namespace frontend {
 
 QTabularCreateDialog::QTabularCreateDialog(QTabularCreate * form)
        : QTabularCreateDialogBase(0, 0, false, 0),
@@ -47,3 +46,6 @@ void QTabularCreateDialog::rowsChanged(int)
 {
        form_->changed();
 }
+
+} // namespace frontend
+} // namespace lyx
index 6dd870454246c6ba31c532fb2ae63f0407f67038..39e7478dbaf375ea3b0356cc4dde0276851415ac 100644 (file)
 #ifndef QTABULARCREATEDIALOG_H
 #define QTABULARCREATEDIALOG_H
 
-
 #include "ui/QTabularCreateDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QTabularCreate;
 
 class QTabularCreateDialog : public QTabularCreateDialogBase {
@@ -29,4 +31,7 @@ private:
        QTabularCreate * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QTABULARCREATEDIALOG_H
index 9d7bc25803d534b232844be09521e3e19ac2e3fe..eebdfdc6014de488305ad4c95f5a1cd971680a04 100644 (file)
@@ -25,6 +25,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 
 QTabularDialog::QTabularDialog(QTabular * form)
        : QTabularDialogBase(0, 0, false, 0),
@@ -342,3 +345,6 @@ void QTabularDialog::ltLastFooterEmpty_clicked()
        lastfooterBorderBelowCB->setEnabled(!enable);
        form_->changed();
 }
+
+} // namespace frontend
+} // namespace lyx
index f24ae522c530dfbadd21a6c4f2012b4e1fa04c4c..ede823f2fb4a5eef438968afc91ce73b36c4c4bf 100644 (file)
 #ifndef QTABULARDIALOG_H
 #define QTABULARDIALOG_H
 
-
 #include "ui/QTabularDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QTabular;
 
 class QTabularDialog : public QTabularDialogBase {
@@ -65,4 +67,7 @@ private:
        QTabular * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QTABULARDIALOG_H
index 43b2706a37b34eb5b977fe22ff774df9a7643f3f..3507585357cacdbf3a29c548e0a7f7ee06c88f91 100644 (file)
@@ -26,6 +26,8 @@ using lyx::support::OnlyFilename;
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlTexinfo, QView<QTexinfoDialog> > base_class;
 
@@ -69,3 +71,6 @@ void QTexinfo::updateStyles()
 {
        updateStyles(activeStyle);
 }
+
+} // namespace frontend
+} // namespace lyx
index 2b2aff8b7013946ea08d80f8fad99158bed827ca..93f6be60544ff75d4ac546be32f8ae11a050f91c 100644 (file)
 #ifndef QTEXINFO_H
 #define QTEXINFO_H
 
-
 #include "QDialogView.h"
 #include "ControlTexinfo.h"
 
 #include <map>
 #include <vector>
 
+namespace lyx {
+namespace frontend {
+
 class QTexinfoDialog;
 
 ///
@@ -49,4 +51,7 @@ private:
        std::map<ControlTexinfo::texFileSuffix, ContentsType> texdata_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QTEXINFO_H
index d2883b6e9002261311689299a09b51df1455551f..34da483d064ace07f54fd80fa581f4b217a1dc04 100644 (file)
@@ -10,8 +10,6 @@
 
 #include <config.h>
 
-
-
 #include "QTexinfoDialog.h"
 #include "QTexinfo.h"
 
@@ -22,6 +20,9 @@
 using std::vector;
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 
 QTexinfoDialog::QTexinfoDialog(QTexinfo * form)
        : QTexinfoDialogBase(0, 0, false, 0),
@@ -86,3 +87,6 @@ void QTexinfoDialog::enableViewPB()
 {
        viewPB->setEnabled(fileList->currentItem() > -1);
 }
+
+} // namespace frontend
+} // namespace lyx
index 37c689909ab945ee15f4bb543108e4caedb1a0b5..debb95b806efdf5c9c529bdadd3ae0809919a6a3 100644 (file)
 #ifndef QTEXINFODIALOG_H
 #define QTEXINFODIALOG_H
 
-
 #include "ui/QTexinfoDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QTexinfo;
 
 class QTexinfoDialog : public QTexinfoDialogBase {
@@ -33,4 +35,7 @@ private:
        QTexinfo * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QTEXINFODIALOG_H
index 09f344d8ad8789014563460332bfa2072de49adb..ed5b191c15bd37785c7a7457f669f6333bf97adb 100644 (file)
 #include <qlineedit.h>
 #include <qpushbutton.h>
 
-typedef QController<ControlThesaurus, QView<QThesaurusDialog> > base_class;
+namespace lyx {
+namespace frontend {
 
+typedef QController<ControlThesaurus, QView<QThesaurusDialog> > base_class;
 
 QThesaurus::QThesaurus(Dialog & parent)
        : base_class(parent, _("LyX: Thesaurus"))
@@ -52,3 +54,6 @@ void QThesaurus::replace()
 {
        controller().replace(fromqstr(dialog_->replaceED->text()));
 }
+
+} // namespace frontend
+} // namespace lyx
index 5b38231934efce08b571d487ca64f24fbc2a68de..0e5bd439927360fc9815ce8b5fa07e690b6e5bb0 100644 (file)
 #ifndef QTHESAURUS_H
 #define QTHESAURUS_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlThesaurus;
 class QThesaurusDialog;
@@ -40,4 +41,7 @@ private:
        void replace();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QTHESAURUS_H
index df64d0adcda65b6446e55c2d57768302af3e4280..db7a85215c57232c62e2032ebc7959f8cb09c699 100644 (file)
@@ -10,8 +10,6 @@
 
 #include <config.h>
 
-
-
 #include "ControlThesaurus.h"
 #include "QThesaurusDialog.h"
 #include "QThesaurus.h"
@@ -23,6 +21,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 
 QThesaurusDialog::QThesaurusDialog(QThesaurus * form)
@@ -110,3 +110,6 @@ void QThesaurusDialog::updateLists()
        meaningsLV->setUpdatesEnabled(true);
        meaningsLV->update();
 }
+
+} // namespace frontend
+} // namespace lyx
index 15b7eca6e9902fa00ab3294fee5dd745c42b501d..932467623340fb1cdafc80893fc098ee887ffa75 100644 (file)
 #ifndef QTHESAURUSDIALOG_H
 #define QTHESAURUSDIALOG_H
 
-
 #include "ui/QThesaurusDialogBase.h"
 
-class QThesaurus;
 class QListViewItem;
 
+namespace lyx {
+namespace frontend {
+
+class QThesaurus;
+
 class QThesaurusDialog : public QThesaurusDialogBase {
        Q_OBJECT
 public:
@@ -36,4 +39,7 @@ private:
        QThesaurus * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QTHESAURUSDIALOG_H
index ea098ee3c5bce7c898de0f84efb14355ab3d799b..88e51740dbbba1177b98218da6e3637ea73b5320 100644 (file)
@@ -31,6 +31,8 @@ using std::stack;
 using std::vector;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlToc, QView<QTocDialog> > base_class;
 
@@ -53,7 +55,7 @@ void QToc::updateType()
        dialog_->typeCO->clear();
 
        vector<string> const & choice = controller().getTypes();
-       string const & type = lyx::toc::getType(controller().params().getCmdName());
+       string const & type = toc::getType(controller().params().getCmdName());
 
        for (vector<string>::const_iterator it = choice.begin();
                it != choice.end(); ++it) {
@@ -77,7 +79,7 @@ void QToc::updateToc(int newdepth)
 {
        string type = fromqstr(dialog_->typeCO->currentText());
 
-       lyx::toc::Toc const & contents = controller().getContents(type);
+       toc::Toc const & contents = controller().getContents(type);
 
        // Check if all elements are the same.
        if (newdepth == depth_ && toclist == contents) {
@@ -105,7 +107,7 @@ void QToc::updateToc(int newdepth)
        // a QListView parent, rather than QListViewItem; and the
        // TOC can move in and out an arbitrary number of levels
 
-       for (lyx::toc::Toc::const_iterator iter = toclist.begin();
+       for (toc::Toc::const_iterator iter = toclist.begin();
             iter != toclist.end(); ++iter) {
                if (iter->depth == curdepth) {
                        // insert it after the last one we processed
@@ -159,7 +161,7 @@ void QToc::updateToc(int newdepth)
 
 void QToc::select(string const & text)
 {
-       lyx::toc::Toc::const_iterator iter = toclist.begin();
+       toc::Toc::const_iterator iter = toclist.begin();
 
        for (; iter != toclist.end(); ++iter) {
                if (iter->str == text)
@@ -181,3 +183,6 @@ void QToc::set_depth(int depth)
        if (depth != depth_)
                updateToc(depth);
 }
+
+} // namespace frontend
+} // namespace lyx
index db42391a21aedf8a2e5f9c1bb96590e3f6cb2a9b..09c6b69a250208da916ee67422fffa9add193f38 100644 (file)
 #ifndef QTOC_H
 #define QTOC_H
 
-
 #include "QDialogView.h"
 #include "toc.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlToc;
 class QTocDialog;
 
@@ -55,4 +57,7 @@ private:
        int depth_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QTOC_H
index 3831cd6d7a3f694c0829cfabfe9e787876025244..a873d217e8e6b3811dbee4374360cce9e97b9550 100644 (file)
@@ -18,6 +18,8 @@
 #include <qlistview.h>
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
 
 QTocDialog::QTocDialog(QToc * form)
        : QTocDialogBase(0, 0, false, 0),
@@ -70,3 +72,6 @@ void QTocDialog::closeEvent(QCloseEvent * e)
        form_->slotWMHide();
        e->accept();
 }
+
+} // namespace frontend
+} // namespace lyx
index af15fcea97bc2566afa7514bc9d2c319308bf423..d028d8131c822cdf40c4d58d633d6535275b7b7c 100644 (file)
 #ifndef QTOCDIALOG_H
 #define QTOCDIALOG_H
 
-
 #include "ui/QTocDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QToc;
 
 class QTocDialog : public QTocDialogBase {
@@ -33,4 +35,7 @@ private:
        QToc * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QTOCDIALOG_H
index 1beb2f3a00c233a3cd6f827ce420b84e79b16c93..48470c955642c9c77c8ff8ab374ab752bf2ea10d 100644 (file)
@@ -25,6 +25,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 typedef QController<ControlCommand, QView<QURLDialog> > base_class;
 
 QURL::QURL(Dialog & parent)
@@ -78,3 +81,6 @@ bool QURL::isValid()
 
        return !u.empty() || !n.empty();
 }
+
+} // namespace frontend
+} // namespace lyx
index 4e22838230fce9a004f78074451fdd1703fb253f..904862f4d5f6ac1676c532f7e004979b081c8042 100644 (file)
 #ifndef QURL_H
 #define QURL_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlCommand;
 class QURLDialog;
 
-
 class QURL :
        public QController<ControlCommand, QView<QURLDialog> >
 {
@@ -36,4 +37,7 @@ private:
        virtual void update_contents();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QURL_H
index e5a67f6bc5356790427c00dda52ab8f8428c0b80..08ae4bb0646697adaa70ce47986c22497d1a1222 100644 (file)
 
 #include <config.h>
 
-
 #include "QURL.h"
 #include "QURLDialog.h"
 
 #include <qpushbutton.h>
 #include <qlineedit.h>
 
+namespace lyx {
+namespace frontend {
 
 QURLDialog::QURLDialog(QURL * form)
        : QURLDialogBase(0, 0, false, 0),
@@ -52,3 +53,6 @@ void QURLDialog::closeEvent(QCloseEvent * e)
        form_->slotWMHide();
        e->accept();
 }
+
+} // namespace frontend
+} // namespace lyx
index 712603ae1c0d580e01c0d4da326cd9847a706df7..b94e389ac002d8d3044c9c06ada9c09fd0555380 100644 (file)
 #ifndef QURLDIALOG_H
 #define QURLDIALOG_H
 
-
 #include "ui/QURLDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QURL;
 
 class QURLDialog : public QURLDialogBase {
@@ -32,4 +34,7 @@ private:
        QURL * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QURLDIALOG_H
index 76b3888292fe950e5227e1de8e0f314a7bd5855e..e3cc6be868da39942de3bb378f33e290d3a8546c 100644 (file)
@@ -39,6 +39,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -179,3 +181,6 @@ void QVSpace::update_contents()
                             dialog_->unitCO,
                             dialog_->keepCB);
 }
+
+} // namespace frontend
+} // namespace lyx
index f35ad6e668cfc4651862666006c09e57f7790470..9422f723c30f170bed01c4e7a337cd01eb5f78ad 100644 (file)
@@ -18,6 +18,9 @@
 
 #include <vector>
 
+namespace lyx {
+namespace frontend {
+
 class ControlVSpace;
 class QVSpaceDialog;
 
@@ -40,4 +43,7 @@ private:
        virtual void update_contents();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif //QVSPACE_H
index 521a206136d74805aafc5f8d8b24f75d7ce1ff1f..6dfe544a18c2b19df6bb38fe27269139c7cb94fd 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "qt_helpers.h"
 
+namespace lyx {
+namespace frontend {
 
 QVSpaceDialog::QVSpaceDialog(QVSpace * form)
        : QVSpaceDialogBase(0, 0, false, 0),
@@ -56,3 +58,6 @@ void QVSpaceDialog::enableCustom(int)
        valueLE->setEnabled(enable);
        unitCO->setEnabled(enable);
 }
+
+} // namespace frontend
+} // namespace lyx
index a69498daece7ab335aca134275c324ef0ccbdfcd..d449274dc22695d1fb677ccb23926f349f913515 100644 (file)
 #ifndef QVSPACEDIALOG_H
 #define QVSPACEDIALOG_H
 
-
 #include "ui/QVSpaceDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QVSpace;
 
 class QVSpaceDialog : public QVSpaceDialogBase {
@@ -35,4 +37,7 @@ private:
        QVSpace * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QVSPACEDIALOG_H
index 6a92bee0259aed8caa86bc0d0c317dd8ed3eda31..e501b4609e9c88a784b84cf8336372e53fac3233 100644 (file)
@@ -30,6 +30,8 @@ using lyx::support::strToDbl;
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef QController<ControlWrap, QView<QWrapDialog> > base_class;
 
@@ -112,3 +114,6 @@ void QWrap::update_contents()
 
        dialog_->valignCO->setCurrentItem(item);
 }
+
+} // namespace frontend
+} // namespace lyx
index e9e11459979c7a58379c5ba44a75f8da1bb155ab..575777cce7c7e1474c303fa3949559bf09fb8a60 100644 (file)
 #ifndef QWRAP_H
 #define QWRAP_H
 
-
 #include "QDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlWrap;
 class QWrapDialog;
@@ -34,4 +35,7 @@ private:
        virtual void build_dialog();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QWRAP_H
index d252d9940669e39107ac0d5275e3dcf8d11449b1..7ea2817c230b8cc9e5b777bfbb6f6fe4d42503ff 100644 (file)
 
 #include <config.h>
 
-
-
 #include "QWrap.h"
 #include "QWrapDialog.h"
 
 #include <qpushbutton.h>
 
+namespace lyx {
+namespace frontend {
 
 
 QWrapDialog::QWrapDialog(QWrap * form)
@@ -45,3 +45,6 @@ void QWrapDialog::change_adaptor()
 {
        form_->changed();
 }
+
+} // namespace frontend
+} // namespace lyx
index 88a92850a3ef671ef8e09e03f948c11d652bbf02..57752315270863027b18bec373ef3094b211b306 100644 (file)
 #ifndef QWRAPDIALOG_H
 #define QWRAPDIALOG_H
 
-
 #include "ui/QWrapDialogBase.h"
 
+namespace lyx {
+namespace frontend {
+
 class QWrap;
 
 class QWrapDialog : public QWrapDialogBase {
@@ -29,4 +31,7 @@ private:
        QWrap * form_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QWRAPDIALOG_H
index 982d5857b1d67a49060c0ebd432d240e383b434f..3902338784f9897703cfc8c5b50990bc1ca9e219 100644 (file)
@@ -19,6 +19,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 Qt2BC::Qt2BC(ButtonController const & parent,
             string const & cancel, string const & close)
@@ -52,3 +54,6 @@ void Qt2BC::setButtonLabel(QButton * obj, string const & label) const
 {
        obj->setText(toqstr(label));
 }
+
+} // namespace frontend
+} // namespace lyx
index 6da14301bf3630ad8308737f9e11202591c0bd4f..c28e08d2bdd70595b4f771e4dd7effff7a8431c3 100644 (file)
 #ifndef QT2BC_H
 #define QT2BC_H
 
-
 #include "BCView.h"
 #include "gettext.h"
 
 class QWidget;
 class QButton;
 
+namespace lyx {
+namespace frontend {
+
 /** General purpose button controller for up to four buttons.
     Controls the activation of the OK, Apply and Cancel buttons.
     Actually supports 4 buttons in all and it's up to the user to decide on
@@ -43,4 +45,7 @@ private:
        void setButtonLabel(QButton *, std::string const & label) const;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QT2BC_H
index 1d9b8745568564d59dd1916bf435bed7d60b5c5f..eefdfaf5def4908f51530b3a97b11c8eb034f6bc 100644 (file)
 #include <qpixmap.h>
 #include <qstatusbar.h>
 
-using lyx::support::LibFileSearch;
-
 using std::string;
 
+qfont_loader fontloader;
+
+namespace lyx {
+
+using support::LibFileSearch;
+
+namespace frontend {
 
 namespace {
 
@@ -43,7 +48,6 @@ int const statusbar_timer_value = 3000;
 
 } // namespace anon
 
-qfont_loader fontloader;
 
 
 QtView::QtView(unsigned int width, unsigned int height)
@@ -160,3 +164,6 @@ void QtView::busy(bool yes) const
        else
                QApplication::restoreOverrideCursor();
 }
+
+} // namespace frontend
+} // namespace lyx
index f55a42267f18e927e059f3da28a871aa9690a558..bc723131d31e3c0d63ba9b08719b50ff5107ac6a 100644 (file)
 #include <qmainwindow.h>
 #include <qtimer.h>
 
-class QCommandBuffer;
 class FuncRequest;
 
+namespace lyx {
+namespace frontend {
+
+class QCommandBuffer;
+
 /**
  * QtView - Qt implementation of LyXView
  *
@@ -81,4 +85,7 @@ private:
        QCommandBuffer * commandbuffer_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // QTVIEW_H
index e6bf240e6325ee60f559d2106ab454b9340a8eb4..ea552d3e8925c1103ab618e383e7e41fd4aeb4c7 100644 (file)
@@ -16,6 +16,8 @@
 #include <qlineedit.h>
 #include <qvalidator.h>
 
+namespace lyx {
+namespace frontend {
 
 void addCheckedLineEdit(BCView & bcview,
                        QLineEdit * input, QLabel * label)
@@ -78,3 +80,6 @@ bool CheckedLineEdit::check() const
 
        return valid;
 }
+
+} // namespace frontend
+} // namespace lyx
index fde0e6301bf09e973c9239a7a64dea86734fb28a..8e0814a4cec4c1dfb4e226d3558218436da533d0 100644 (file)
 #ifndef CHECKEDWIDGETS_H
 #define CHECKEDWIDGETS_H
 
-
 #include "BCView.h"
 
 class QLabel;
 class QLineEdit;
 
+namespace lyx {
+namespace frontend {
 
 void addCheckedLineEdit(BCView & bcview,
                        QLineEdit * input, QLabel * label = 0);
@@ -35,4 +36,7 @@ private:
        QLabel * label_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CHECKEDWIDGETS_H
index f05705c795442950094407a5fb8dd3da20030981..dbfbd64e796d5c0906ba2704330b340eb8a0453d 100644 (file)
@@ -52,6 +52,8 @@
 
 using lyx::support::ltrim;
 
+using lyx::frontend::QtView;
+
 namespace os = lyx::support::os;
 
 #ifndef CXX_GLOBAL_CSTD
index 02c62f84ecc43dd00d6343a20a3cacc9d681d6c8..8fbad0ac1fa9f395ccfebc0b496dca29e3d60126 100644 (file)
@@ -22,6 +22,9 @@
 
 #include "lyx_forms.h"
 
+using lyx::frontend::formatted;
+using lyx::frontend::idex;
+using lyx::frontend::parse_shortcut;
 
 using std::make_pair;
 using std::pair;
index df23702bc721441057a412c9fadff0eb80d5d3ca..1d8612ce46d6abebeb8aaa7233069a5164a6dedb 100644 (file)
@@ -1,3 +1,7 @@
+2004-05-19  Angus Leeming  <leeming@lyx.org>
+
+       * Most files: wrap code up inside namespace lyx::frontend.
+
 2004-05-14  Angus Leeming  <leeming@lyx.org>
 
        * FormCitation.C: small changes due to the changes in biblio.h.
index fdb6ed963b7d84066bd8fc99e1970dd034695f8c..7c683b9b363a4cee304660b9b5c5cc5156bcfd0b 100644 (file)
@@ -21,7 +21,6 @@
 #include <cmath>
 #include <iomanip>
 
-
 #ifndef CXX_GLOBAL_CSTD
 using std::floor;
 #endif
@@ -34,6 +33,8 @@ using std::istringstream;
 using std::ostringstream;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -198,3 +199,6 @@ HSVColor::HSVColor(RGBColor const & rgb)
                        h += 360;
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index a297ae0765c3cf97f640ec7df7182e9cbc561701..498f3e9e9ba3c5aa0c2b4a47598461b8471f93b6 100644 (file)
 
 #include <string>
 
-
 class LColor_color;
 
+namespace lyx {
+namespace frontend {
 
 /** Given col, fills r, g, b in the range 0-255.
     The function returns true if successful.
@@ -77,4 +78,7 @@ bool operator!=(RGBColor const & c1, RGBColor const & c2)
        return !(c1 == c2);
 }
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index ac4da0db5043977d62b2419636bd9f6653de9298..e4309fe78cfc488c685d859807984f6ab73ecc18 100644 (file)
@@ -25,8 +25,6 @@
 
 #include <cmath>
 
-using lyx::support::bformat;
-
 #ifndef CXX_GLOBAL_CSTD
 using std::pow;
 #endif
@@ -34,18 +32,28 @@ using std::pow;
 using std::endl;
 using std::string;
 
+namespace lyx {
 
+namespace support {
 namespace {
 
        string tostr(XColor const & col)
        {
                return bformat("(%1$s,%2$s,%3$s)",
-                       ::tostr(col.red), ::tostr(col.green), ::tostr(col.blue));
+                              ::tostr(col.red),
+                              ::tostr(col.green),
+                              ::tostr(col.blue));
        }
 
-}
+} // namespace
+} // namespace support
+
+using support::bformat;
+using support::tostr;
 
 
+namespace frontend {
+
 LyXColorHandler::LyXColorHandler()
                : colorGCcache(LColor::ignore + 1)
 {
@@ -153,7 +161,7 @@ GC LyXColorHandler::getGCForeground(string const & s)
                lyxerr << bformat(
                                _("     Using closest allocated color with (r,g,b)=%1$s instead.\n"
                          "Pixel [%2$s] is used."),
-                       tostr(cmap[closest_pixel]), tostr(closest_pixel)) << endl;
+                       tostr(cmap[closest_pixel]), ::tostr(closest_pixel)) << endl;
 
                val.foreground = cmap[closest_pixel].pixel;
        }
@@ -264,3 +272,6 @@ void LyXColorHandler::updateColor (LColor_color c)
 
 //
 boost::scoped_ptr<LyXColorHandler> lyxColorHandler;
+
+} // namespace frontend
+} // namespace lyx
index 594d33d47cc3227e7ce133ed8e11f25015c559a5..d4086ae9a6f1e80ffe87e54b7e8f9d915845a0cc 100644 (file)
@@ -12,7 +12,6 @@
 #ifndef COLOR_HANDLER_H
 #define COLOR_HANDLER_H
 
-
 #include "frontends/Painter.h"
 
 #include <map>
@@ -25,6 +24,9 @@
 class LColor_color;
 class LyXFont;
 
+namespace lyx {
+namespace frontend {
+
 /**
  * This is a factory class that can produce GCs with a specific
  * color. It will cache GCs for performance.
@@ -65,4 +67,7 @@ private:
 ///
 extern boost::scoped_ptr<LyXColorHandler> lyxColorHandler;
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index c8898920d7f804430a54dc509fa2ac9ca47288d6..2a5d851adbce362143026f36358cd4cc85045f1c 100644 (file)
 
 
 using std::string;
+using namespace lyx::frontend;
 
 
 namespace {
index d21f42df7c6c352e6d48f20983ac56f4ca3a0dcc..13a7d5ab0e6c42185383d5a6dcd95f5d8f44be0d 100644 (file)
 
 #include <cmath>
 
-using lyx::support::atoi;
-using lyx::support::token;
-
 using std::abs;
 using std::endl;
 using std::string;
 
+namespace lyx {
+
+using support::atoi;
+using support::token;
+
+namespace frontend {
 
 /// Load font close to this size
 string const FontInfo::getFontname(int size)
@@ -166,3 +169,6 @@ void FontInfo::init()
        scalable = false;
        scaleindex = -1;
 }
+
+} // namespace frontend
+} // namespace lyx
index 47bc0776eda158d590a7d5c0ddb7194be37d326a..89703e76c42a166f64a741f7903df83d37dae3ab 100644 (file)
@@ -17,6 +17,9 @@
 
 #include <string>
 
+namespace lyx {
+namespace frontend {
+
 /** This class manages a font.
     The idea is to create a FontInfo object with a font name pattern with a
     wildcard at the size field. Then this object can host request for font-
@@ -87,4 +90,7 @@ private:
        std::string const resize(std::string const &, int size) const;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FONTINFO_H
index 963a5db4a23abd048eaa4a9f7777eff4616fdf49..66858aefe20625c2c671643b0e7671388eeb70bd 100644 (file)
@@ -25,6 +25,8 @@
 
 using std::ostringstream;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -91,3 +93,6 @@ void FormAboutlyx::build()
        // Manage the cancel/close button
        bcview().setCancel(dialog_->button_close);
 }
+
+} // namespace frontend
+} // namespace lyx
index 91a0e197129e51c7cdafea757730e016dcb46ec7..fc4b7b9c27334e38db56564a073a959a3b1df881 100644 (file)
 #ifndef FORMABOUTLYX_H
 #define FORMABOUTLYX_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlAboutlyx;
 struct FD_aboutlyx;
@@ -47,5 +48,7 @@ private:
        boost::scoped_ptr<FD_aboutlyx_license> license_;
 };
 
+} // namespace frontend
+} // namespace lyx
 
 #endif // FORMABOUTLYX_H
index 2544235c7c80edf1504dc60f8a3c565076b45b98..ef32104db29e3883dfd29e75c90e712b9fe2b688 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::compare;
-
 using std::string;
 
 
+namespace lyx {
+
+using support::compare;
+
+namespace frontend {
+
+
 typedef FormController<ControlCommand, FormView<FD_bibitem> > base_class;
 
 FormBibitem::FormBibitem(Dialog & parent)
@@ -83,3 +88,6 @@ void FormBibitem::apply()
        controller().params().setContents(fl_get_input(dialog_->input_key));
        controller().params().setOptions(fl_get_input(dialog_->input_label));
 }
+
+} // namespace frontend
+} // namespace lyx
index bfcb7f8705c30afc78ecc0799fa2bac62285ae54..1b5ae47450131cf8fa206f3f3fa25c09262b6f11 100644 (file)
 #ifndef FORMBIBITEM_H
 #define FORMBIBITEM_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlCommand;
 struct FD_bibitem;
 
@@ -37,4 +39,7 @@ private:
        virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMBIBITEM_H
index 4a8a0c1bccfedfc3e49306828d7b8729e84d0a14..cfcb93ae93df6afa1560d09182ca2826b9efe2ff 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::ChangeExtension;
-using lyx::support::compare;
-using lyx::support::contains;
-using lyx::support::FileFilterList;
-using lyx::support::getStringFromVector;
-using lyx::support::getVectorFromString;
-using lyx::support::OnlyFilename;
-using lyx::support::prefixIs;
-using lyx::support::split;
-
 using std::vector;
 using std::string;
 
+namespace lyx {
+
+using support::ChangeExtension;
+using support::compare;
+using support::contains;
+using support::FileFilterList;
+using support::getStringFromVector;
+using support::getVectorFromString;
+using support::OnlyFilename;
+using support::prefixIs;
+using support::split;
+
+namespace frontend {
+
 
 typedef FormController<ControlBibtex, FormView<FD_bibtex> > base_class;
 
@@ -226,7 +230,7 @@ string const unique_and_no_extensions(string const & str_in)
             it != dbase.end(); ++it) {
                *it = ChangeExtension(*it, string());
        }
-       lyx::eliminate_duplicates(dbase);
+       eliminate_duplicates(dbase);
        return getStringFromVector(dbase);
 }
 
@@ -286,4 +290,8 @@ void FormBibtex::apply()
 
        else
                controller().params().setSecOptions("");
+
 }
+
+} // namespace frontend
+} // namespace lyx
index ed050bf1d1ad55b0ab330750b456caac3fc75d54..c37bc1dae5251e5123551f219955ba309e321ead 100644 (file)
 #ifndef FORMBIBTEX_H
 #define FORMBIBTEX_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlBibtex;
 struct FD_bibtex;
 
@@ -37,4 +39,7 @@ private:
        virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMBIBTEX_H
index 3e02a095e9679fdb8c53df2d061c6474f194de94..c74a384a03a08a0cf10e38102012528336a46480 100644 (file)
 
 #include <vector>
 
-using lyx::support::getStringFromVector;
-using lyx::support::isStrDbl;
-using lyx::support::subst;
 using std::string;
 
+namespace lyx {
+
+using support::getStringFromVector;
+using support::isStrDbl;
+using support::subst;
+
+namespace frontend {
+
 
 typedef FormController<ControlBox, FormView<FD_box> > base_class;
 
@@ -285,3 +290,6 @@ ButtonPolicy::SMInput FormBox::input(FL_OBJECT * ob, long)
 
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index 0bdc2180a3c4a515c3dcd64680363facefc5eb6f..85cef790daabea99138ac720d27589ae4ba7c825 100644 (file)
 #ifndef FORMBOX_H
 #define FORMBOX_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlBox;
 struct FD_box;
@@ -52,4 +53,7 @@ private:
        };
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMBOX_H
index c2badd04ea346446011031fb9576f4ed5414d33e..0278bbfc0e23401749f35c4957390b07ca1cb1af 100644 (file)
@@ -25,6 +25,9 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
+
 
 typedef FormController<ControlBranch, FormView<FD_branch> > base_class;
 
@@ -72,3 +75,6 @@ void FormBranch::apply()
        string const type = fl_get_choice_text(dialog_->choice_branch);
        controller().params().branch = type;
 }
+
+} // namespace frontend
+} // namespace lyx
index 173f1d6aa637580838f3b17c92a7e75e05176aa7..6773db9825927c1187b81b4852ac0435147bc9e4 100644 (file)
 #ifndef FORMBRANCH_H
 #define FORMBRANCH_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlBranch;
 struct FD_branch;
@@ -34,4 +35,7 @@ private:
        virtual void update();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMBRANCH_H
index a59746961a178c7acf05408c5ea8d5f3923e900d..2cdacf7e74072aa440c211f6d26a39dfab93da09 100644 (file)
 #include "forms/form_browser.h"
 #include "xformsBC.h"
 
-
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 FormBrowser::FormBrowser(Dialog & parent,
                         string const & title, bool allowResize)
@@ -31,3 +32,6 @@ void FormBrowser::build()
        // Manage the close button
        bcview().setCancel(dialog_->button_close);
 }
+
+} // namespace frontend
+} // namespace lyx
index 98e37a8871be0727ac50d63d4436c58b156e4914..ebd3f0fa419c9b45b8e09251234b26a64b0843c6 100644 (file)
 #ifndef FORMBROWSER_H
 #define FORMBROWSER_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
+struct FD_browser;
+
 /**
  * This class provides an XForms implementation of a read only
  * text browser.
  */
-struct FD_browser;
 
 class FormBrowser : public FormView<FD_browser> {
 public:
@@ -31,4 +34,7 @@ private:
        virtual void build();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMBROWSER_H
index 4e086062c0283b0263dcc4b4f3cad22aa92d08c2..284ed5e7172a5984f84bf1bf94e8b1a6e669239e 100644 (file)
 
 #include "lyx_forms.h"
 
-
 using std::string;
 
 
+namespace lyx {
+namespace frontend {
+
+
 typedef FormController<ControlChanges, FormView<FD_changes> > base_class;
 
 FormChanges::FormChanges(Dialog & parent)
@@ -76,3 +79,6 @@ ButtonPolicy::SMInput FormChanges::input(FL_OBJECT * obj, long)
 
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index 8f55bf440d6f2efa8ad9a81bb118042b656e07e3..54e184d2098b64d77414aba27367b40fbfd3f0c9 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlChanges;
 struct FD_changes;
 
@@ -37,4 +40,7 @@ private:
        virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMCHANGES_H
index 68628856855984a375186b696cc00967ecf82f6d..ac126ba2f53068863ea2fce5176461f8688a11cf 100644 (file)
 #include "lyx_forms.h"
 #include "combox.h"
 
-using frnt::BarPair;
-using frnt::ColorPair;
-using frnt::FamilyPair;
-using frnt::getBarData;
-using frnt::getColorData;
-using frnt::getFamilyData;
-using frnt::getLanguageData;
-using frnt::getSeriesData;
-using frnt::getShapeData;
-using frnt::getSizeData;
-using frnt::LanguagePair;
-using frnt::SeriesPair;
-using frnt::ShapePair;
-using frnt::SizePair;
-
-using lyx::support::getStringFromVector;
-
 using std::vector;
 using std::string;
 
+namespace lyx {
+
+using support::getStringFromVector;
+
+namespace frontend {
+
 
 typedef FormController<ControlCharacter, FormView<FD_character> > base_class;
 
@@ -185,7 +174,7 @@ ButtonPolicy::SMInput FormCharacter::input(FL_OBJECT *, long)
                activate = ButtonPolicy::SMI_VALID;
 
        pos = fl_get_choice(dialog_->choice_bar);
-       if (bar_[pos - 1] != frnt::IGNORE)
+       if (bar_[pos - 1] != IGNORE)
                activate = ButtonPolicy::SMI_VALID;
 
        pos = fl_get_choice(dialog_->choice_color);
@@ -198,3 +187,6 @@ ButtonPolicy::SMInput FormCharacter::input(FL_OBJECT *, long)
 
        return activate;
 }
+
+} // namespace frontend
+} // namespace lyx
index 080b61dc3928fe1a7ebc3bb5a7c906378f03140a..328cc65abdb21f322d40d8929e7ef6c98eb2ba66 100644 (file)
 #include "ControlCharacter.h" // for ControlCharacter enum
 
 struct LColor_color;
+
+namespace lyx {
+namespace frontend {
+
 struct FD_character;
 
 /**
@@ -44,19 +48,22 @@ private:
        virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
 
        ///
-       std::vector<LyXFont::FONT_FAMILY>  family_;
+       std::vector<LyXFont::FONT_FAMILY> family_;
        ///
-       std::vector<LyXFont::FONT_SERIES>  series_;
+       std::vector<LyXFont::FONT_SERIES> series_;
        ///
-       std::vector<LyXFont::FONT_SHAPE>   shape_;
+       std::vector<LyXFont::FONT_SHAPE> shape_;
        ///
-       std::vector<LyXFont::FONT_SIZE>    size_;
+       std::vector<LyXFont::FONT_SIZE> size_;
        ///
-       std::vector<frnt::FONT_STATE>      bar_;
+       std::vector<FONT_STATE> bar_;
        ///
-       std::vector<LColor_color>            color_;
+       std::vector<LColor_color> color_;
        ///
-       std::vector<std::string>                lang_;
+       std::vector<std::string> lang_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index f0dc375f0cebff224232923559623c1e08f5936d..f6891d43f8cb257ac444b1b8b94428f9aee515e7 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::getStringFromVector;
-using lyx::support::getVectorFromString;
-using lyx::support::trim;
-
 using std::find;
 using std::max;
 
@@ -36,6 +32,14 @@ using std::vector;
 using std::string;
 
 
+namespace lyx {
+
+using support::getStringFromVector;
+using support::getVectorFromString;
+using support::trim;
+
+namespace frontend {
+
 namespace {
 
 // shamelessly stolen from Menubar_pimpl.C
@@ -522,3 +526,6 @@ void FormCitation::setCiteButtons(State status) const
        setEnabled(dialog_->button_up,   activate_up);
        setEnabled(dialog_->button_down, activate_down);
 }
+
+} // namespace frontend
+} // namespace lyx
index 12258b000ca458a6dd657d52638607abbe8900db..382c9fd58a2cda88d43c5ac75cc680f2b1836458 100644 (file)
 #ifndef FORMCITATION_H
 #define FORMCITATION_H
 
-
 #include "FormDialogView.h"
 #include "biblio.h"
 
-/** This class provides an XForms implementation of the Citation Dialog.
- */
+namespace lyx {
+namespace frontend {
+
 class ControlCitation;
 struct FD_citation;
 
+/** This class provides an XForms implementation of the Citation Dialog.
+ */
 class FormCitation
        : public FormController<ControlCitation, FormView<FD_citation> > {
 public:
@@ -62,4 +64,7 @@ private:
        std::vector<std::string> bibkeys;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMCITATION_H
index 92325a2be67c7d18e877817bcb93d2c981adcc02..7a23f9f01ab059a4403b52d548d22ddf6eef094f 100644 (file)
 
 #include "lyx_forms.h"
 
-
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -284,7 +285,7 @@ void FormColorpicker::prepare_to_show()
 
        //  assign an icon to the form
        string const iconname =
-               lyx::support::LibFileSearch("images", "lyx", "xpm");
+               support::LibFileSearch("images", "lyx", "xpm");
 
        if (!iconname.empty()) {
                unsigned int w, h;
@@ -365,3 +366,6 @@ static int C_WMHideCB(FL_FORM * form, void *)
 }
 
 } // extern "C"
+
+} // namespace frontend
+} // namespace lyx
index 4b3d7633efd36212644a1a9ff56ed9c0912d91dd..ab5980988793fec2bb9c4a94ce7d4bc572c458da 100644 (file)
 #include <boost/scoped_ptr.hpp>
 #include <X11/Xlib.h> // for Pixmap
 
+namespace lyx {
+namespace frontend {
 
-class Tooltips;
 class FD_colorpicker;
 class FD_colorpicker_rgb;
 class FD_colorpicker_hsv;
+class Tooltips;
 
-
-class FormColorpicker
-{
+class FormColorpicker {
 public:
        FormColorpicker();
        ~FormColorpicker();
@@ -85,4 +85,7 @@ private:
        boost::scoped_ptr<FD_colorpicker_hsv> hsv_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMCOLORPICKER_H
index 51dcee93fb788711fb9d29245ba5dd9ed1d0df03..5e742bdaa5e770460797518d3d09d52fe8fb35fd 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::bformat;
-using lyx::support::LibFileSearch;
-
 using std::string;
 
+namespace lyx {
+
+using support::bformat;
+using support::LibFileSearch;
+
+namespace frontend {
 
 extern "C" {
 
@@ -413,3 +416,6 @@ static int C_PrehandlerCB(FL_OBJECT * ob, int event,
 }
 
 } // extern "C"
+
+} // namespace frontend
+} // namespace lyx
index 945cd746a5a0d956edac8459ecc395a5661938cc..21966777acda7d68fca06b416597620ffbeadedf 100644 (file)
 
 #include <X11/Xlib.h> // for Pixmap
 
-class xformsBC;
-class Tooltips;
+namespace lyx {
+namespace frontend {
 
+class Tooltips;
+class xformsBC;
 
 /** This class is an XForms GUI base class.
  */
@@ -190,5 +192,7 @@ Controller const & FormController<Controller, Base>::controller() const
        return static_cast<Controller const &>(this->getController());
 }
 
+} // namespace frontend
+} // namespace lyx
 
 #endif // FORMDIALOGVIEW_H
index c4b29ab923d2a6ac3820834925730e0535fc0c48..feb07115329538d8c5342d133910847c7090fb3e 100644 (file)
 
 #include <iomanip>
 
-using lyx::support::bformat;
-using lyx::support::contains;
-using lyx::support::getStringFromVector;
-using lyx::support::getVectorFromString;
-using lyx::support::LibFileSearch;
-
 using boost::bind;
 
 using std::endl;
 using std::string;
 using std::vector;
 
+namespace lyx {
+
+using support::bformat;
+using support::contains;
+using support::getStringFromVector;
+using support::getVectorFromString;
+using support::LibFileSearch;
+
+namespace frontend {
 
 namespace {
 
@@ -285,12 +288,12 @@ void FormDocument::build()
                        "default|auto|latin1|latin2|latin3|latin4|latin5|latin9"
                        "|koi8-r|koi8-u|cp866|cp1251|iso88595|pt154");
 
-       vector<frnt::LanguagePair> const langs = frnt::getLanguageData(false);
+       vector<LanguagePair> const langs = getLanguageData(false);
        // Store the identifiers for later
        lang_ = getSecond(langs);
 
-       vector<frnt::LanguagePair>::const_iterator lit  = langs.begin();
-       vector<frnt::LanguagePair>::const_iterator lend = langs.end();
+       vector<LanguagePair>::const_iterator lit  = langs.begin();
+       vector<LanguagePair>::const_iterator lend = langs.end();
        for (; lit != lend; ++lit) {
                fl_addto_combox(language_->combox_language,
                                lit->first.c_str());
@@ -1524,8 +1527,7 @@ void FormDocument::CheckChoiceClass()
 {
        BufferParams & params = controller().params();
 
-       lyx::textclass_type const tc =
-               fl_get_combox(class_->combox_class) - 1;
+       textclass_type const tc = fl_get_combox(class_->combox_class) - 1;
 
        if (controller().loadTextclass(tc)) {
                params.textclass = tc;
@@ -1558,3 +1560,6 @@ void FormDocument::UpdateLayoutDocument(BufferParams const & params)
        options_update(params);
        bullets_update(params);
 }
+
+} // namespace frontend
+} // namespace lyx
index 64fcedcbb99f8d86d1b886762d7dc7e9ca6e111b..f7488ae220faf596f48a03f397103dab0dd5a1e5 100644 (file)
 #include "lyx_forms.h"
 #include <vector>
 
-class ControlDocument;
-
 class BufferParams;
 
-class FormColorpicker;
+namespace lyx {
+namespace frontend {
 
+class ControlDocument;
+class FormColorpicker;
 struct FD_document;
 struct FD_document_paper;
 struct FD_document_class;
@@ -134,4 +135,7 @@ private:
        BranchList branchlist_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index ab2db618d6d948c963e2304d0b41a8ba45e41486..7d80b9202b76c96fca139730f92d5cf6f7a90d0a 100644 (file)
@@ -18,6 +18,8 @@
 
 #include "lyx_forms.h"
 
+namespace lyx {
+namespace frontend {
 
 typedef  FormController<ControlERT, FormView<FD_ert> > base_class;
 
@@ -66,3 +68,6 @@ void FormERT::update()
                break;
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index 8e286b39183605dc8d22fabe220d2fb17cd40f32..e8af53699420ee4256d5b9f7b566683d14cc680c 100644 (file)
 #ifndef FORMERT_H
 #define FORMERT_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlERT;
 struct FD_ert;
@@ -35,4 +36,7 @@ private:
        virtual void update();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMERT_H
index 7ba8af2d174c5b4e2a2db31b13589b45d2f34e67..8f446c0fe88b2f0507178e822396dcbad8f32551 100644 (file)
@@ -18,6 +18,8 @@
 #include "xforms_helpers.h"
 #include "lyx_forms.h"
 
+namespace lyx {
+namespace frontend {
 
 typedef FormController<ControlErrorList, FormView<FD_errorlist> > base_class;
 
@@ -96,3 +98,6 @@ void FormErrorList::updateContents()
        fl_select_browser_line(dialog_->browser_errors, 1);
        goTo(0);
 }
+
+} // namespace frontend
+} // namespace lyx
index a56cee94e356f15237dfc39f8ebbb75605d4e0b7..ee7f9ca4f216d2929f3adc5a2cbd3deb9c3df15f 100644 (file)
 #ifndef FORMERRORLIST_H
 #define FORMERRORLIST_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlErrorList;
 struct FD_errorlist;
 
@@ -39,4 +41,7 @@ private:
        void updateContents();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMERRORLIST_H
index e1fcb2a9456e47c91b7f842cd2777869ddf67343..b78462e51adcec49e76f17051e576d1b0e94f6d7 100644 (file)
 
 namespace external = lyx::external;
 
-using lyx::support::bformat;
-using lyx::support::float_equal;
-using lyx::support::getStringFromVector;
-using lyx::support::isStrDbl;
-using lyx::support::strToDbl;
-using lyx::support::strToInt;
-using lyx::support::token;
-using lyx::support::trim;
-
 using std::find;
 using std::string;
 using std::vector;
 
+namespace lyx {
+
+using support::bformat;
+using support::float_equal;
+using support::getStringFromVector;
+using support::isStrDbl;
+using support::strToDbl;
+using support::strToInt;
+using support::token;
+using support::trim;
+
+namespace frontend {
 
 namespace {
 
@@ -101,7 +104,7 @@ void setDisplay(FL_OBJECT * displayCB, FL_OBJECT * showCO, FL_OBJECT * scaleED,
 
        fl_set_choice(showCO, item);
 
-       bool const no_display = display == lyx::external::NoDisplay;
+       bool const no_display = display == external::NoDisplay;
        setEnabled(showCO, !no_display && !read_only);
 
        fl_set_button(displayCB, !no_display);
@@ -271,7 +274,7 @@ void setCrop(FL_OBJECT * clipCB,
        BOOST_ASSERT(ytED && ytED->objclass == FL_INPUT);
 
        fl_set_button(clipCB, data.clip);
-       lyx::graphics::BoundingBox const & bbox = data.bbox;
+       graphics::BoundingBox const & bbox = data.bbox;
        fl_set_input(xlED, tostr(bbox.xl).c_str());
        fl_set_input(ybED, tostr(bbox.yb).c_str());
        fl_set_input(xrED, tostr(bbox.xr).c_str());
@@ -502,8 +505,6 @@ void FormExternal::update()
 
 void FormExternal::updateComboChange()
 {
-       namespace external = lyx::external;
-
        int const choice = fl_get_choice(file_->choice_template) - 1;
        external::Template templ = controller().getTemplate(choice);
 
@@ -753,3 +754,6 @@ void FormExternal::widthUnitChanged()
        setEnabled(scale_->input_height, useHeight);
        setEnabled(scale_->choice_height, useHeight);
 }
+
+} // namespace frontend
+} // namespace lyx
index 80296f3c3b6e252e98f0577bb7a5c7ef402ac6ae..f48c160be8486ac2275daf3a05f4db67fbf72e1c 100644 (file)
 #ifndef FORMEXTERNAL_H
 #define FORMEXTERNAL_H
 
-
 #include "FormDialogView.h"
 #include <map>
 
+namespace lyx {
+namespace frontend {
+
 class ControlExternal;
 struct FD_external;
 struct FD_external_file;
@@ -78,4 +80,7 @@ private:
        boost::scoped_ptr<FD_external_options> options_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMEXTERNAL_H
index 60e32ba098b5568de044b4184e060e6b20caf935..df009195aa5b5286a33eaa655dde17130236689b 100644 (file)
@@ -76,6 +76,7 @@ using std::string;
 using std::map;
 using std::vector;
 
+using namespace lyx::frontend;
 
 namespace {
 
@@ -187,7 +188,6 @@ public:
        }
 };
 
-
 } // namespace anon
 
 
index 93b97b26c3194270fe5b0dea0db7eb1c979ae2c5..9d6cee29bf255c6826df0687cd90ce9b6925bd35 100644 (file)
 
 class Dialogs;
 
+
+namespace lyx {
+
+namespace support {
+
+class FileFilterList;
+
+} // namespace support
+
+
+namespace frontend {
+
 /// DirEntry internal structure definition
 class DirEntry {
 public:
@@ -45,12 +57,7 @@ public:
 
 class FD_filedialog;
 
-namespace lyx {
-namespace support {
-
-class FileFilterList;
-
-} // namespace support
+} // namespace frontend
 } // namespace lyx
 
 
@@ -84,7 +91,7 @@ public:
 
 private:
        /// data
-       static FD_filedialog * file_dlg_form_;
+       static lyx::frontend::FD_filedialog * file_dlg_form_;
        ///
        static FileDialog::Private * current_dlg_;
        ///
@@ -110,7 +117,7 @@ private:
        ///
        std::string info_line_;
        ///
-       typedef std::vector<DirEntry> DirEntries;
+       typedef std::vector<lyx::frontend::DirEntry> DirEntries;
        ///
        DirEntries dir_entries_;
        ///
index ac27dcbf39101ae86acb581771a593401ec4fa69..c38b68a99885fef5d75cffa361477afb8262a61d 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::contains;
-
 using std::string;
 
+namespace lyx {
+
+using support::contains;
+
+namespace frontend {
 
 namespace {
 
@@ -254,3 +257,6 @@ ButtonPolicy::SMInput FormFloat::input(FL_OBJECT * ob, long)
 
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index faf5bb3486477973e50083c61ac9f649a33f011e..5eac685583fadf02445284d98f4cccfed171bb80 100644 (file)
@@ -15,6 +15,9 @@
 #include "FormDialogView.h"
 #include "RadioButtonGroup.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlFloat;
 struct FD_float;
 
@@ -39,4 +42,7 @@ private:
        RadioButtonGroup placement_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMFLOAT_H
index ed7ac852b099736c03e7606ce9f0818430016940..026676d19438b6cda9bab2c9e0867ceb6490206f 100644 (file)
 
 #include <cmath>
 
-using lyx::support::bformat;
-using lyx::support::float_equal;
-using lyx::support::getStringFromVector;
-using lyx::support::strToDbl;
-using lyx::support::strToInt;
-using lyx::support::token;
-
 #ifndef CXX_GLOBAL_CSTD
 using std::floor;
 #endif
@@ -53,6 +46,16 @@ using std::endl;
 using std::vector;
 using std::string;
 
+namespace lyx {
+
+using support::bformat;
+using support::float_equal;
+using support::getStringFromVector;
+using support::strToDbl;
+using support::strToInt;
+using support::token;
+
+namespace frontend {
 
 namespace {
 
@@ -200,7 +203,7 @@ void FormGraphics::build()
        fl_set_input_filter(bbox_->input_bb_y0, fl_unsigned_float_filter);
        fl_set_input_filter(bbox_->input_bb_y1, fl_unsigned_float_filter);
 
-       string const bb_units = getStringFromVector(frnt::getBBUnits(), "|");
+       string const bb_units = getStringFromVector(getBBUnits(), "|");
        fl_addto_choice(bbox_->choice_bb_units, bb_units.c_str());
 
        // set up the tooltips for the bounding-box-section
@@ -245,7 +248,6 @@ void FormGraphics::build()
 
        fl_set_input_filter(extra_->input_rotate_angle, fl_float_filter);
 
-       using namespace frnt;
        vector<RotationOriginPair> origindata = getRotationOriginData();
 
        // Store the identifiers for later
@@ -311,19 +313,19 @@ void FormGraphics::apply()
 
        switch (fl_get_choice(file_->choice_display)) {
        case 5:
-               igp.display = lyx::graphics::NoDisplay;
+               igp.display = graphics::NoDisplay;
                break;
        case 4:
-               igp.display = lyx::graphics::ColorDisplay;
+               igp.display = graphics::ColorDisplay;
                break;
        case 3:
-               igp.display = lyx::graphics::GrayscaleDisplay;
+               igp.display = graphics::GrayscaleDisplay;
                break;
        case 2:
-               igp.display = lyx::graphics::MonochromeDisplay;
+               igp.display = graphics::MonochromeDisplay;
                break;
        case 1:
-               igp.display = lyx::graphics::DefaultDisplay;
+               igp.display = graphics::DefaultDisplay;
        }
 
        // first item in choice_width means scaling
@@ -437,19 +439,19 @@ void FormGraphics::update() {
        fl_set_input(file_->input_lyxscale, tostr(igp.lyxscale).c_str());
 
        switch (igp.display) {
-       case lyx::graphics::NoDisplay:
+       case graphics::NoDisplay:
                fl_set_choice(file_->choice_display, 5);
                break;
-       case lyx::graphics::ColorDisplay:
+       case graphics::ColorDisplay:
                fl_set_choice(file_->choice_display, 4);
                break;
-       case lyx::graphics::GrayscaleDisplay:
+       case graphics::GrayscaleDisplay:
                fl_set_choice(file_->choice_display, 3);
                break;
-       case lyx::graphics::MonochromeDisplay:
+       case graphics::MonochromeDisplay:
                fl_set_choice(file_->choice_display, 2);
                break;
-       case lyx::graphics::DefaultDisplay:
+       case graphics::DefaultDisplay:
                fl_set_choice(file_->choice_display, 1);
        }
 
@@ -657,3 +659,6 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
 
        return activate;
 }
+
+} // namespace frontend
+} // namespace lyx
index 11ebe2646790b79620c1f43fc92e9e01a3ca1373..85ee23a7435a2104b03d75725d0b94cece13b0df 100644 (file)
 #ifndef FORMGRAPHICS_H
 #define FORMGRAPHICS_H
 
-
 #include "FormDialogView.h"
-
 #include <boost/scoped_ptr.hpp>
-
 #include <vector>
 
+namespace lyx {
+namespace frontend {
+
 class ControlGraphics;
 struct FD_graphics;
 struct FD_graphics_file;
@@ -60,4 +60,7 @@ private:
        std::vector<std::string> origins_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif  // FORMGRAPHICS_H
index 69b9185122e34ecd8fef83643ccfe2b8772e59bc..57bbb468e5fab34ad7f0fc43344aae83e535dec6 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::rtrim;
-
 using std::string;
 
+namespace lyx {
+
+using support::rtrim;
+
+namespace frontend {
 
 typedef FormController<ControlInclude, FormView<FD_include> > base_class;
 
@@ -183,3 +186,6 @@ ButtonPolicy::SMInput FormInclude::input(FL_OBJECT * ob, long)
 
        return action;
 }
+
+} // namespace frontend
+} // namespace lyx
index 2383baf12c61e2d4cc5fb4d2ce3f3efce417d8d6..5bd8464335b515a8da38305894b230f3c45711b6 100644 (file)
 #ifndef FORMINCLUDE_H
 #define FORMINCLUDE_H
 
-
 #include "FormDialogView.h"
 #include "RadioButtonGroup.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlInclude;
 struct FD_include;
@@ -42,4 +43,7 @@ private:
        RadioButtonGroup type_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMINCLUDE_H
index bcbf7ffb38c93b9c2c2f75a3d204e606bc6e8d9d..be6d6625eb252c66567ef7921124eec038046ae9 100644 (file)
@@ -18,6 +18,8 @@
 
 #include "lyx_forms.h"
 
+namespace lyx {
+namespace frontend {
 
 FormLog::FormLog(Dialog & parent)
        : FormController<ControlLog, FormBrowser>(parent, "")
@@ -34,3 +36,6 @@ void FormLog::update()
        fl_clear_browser(dialog_->browser);
        fl_add_browser_line(dialog_->browser, ss.str().c_str());
 }
+
+} // namespace frontend
+} // namespace lyx
index c81ce68c8740e16575d40e8bdf2bbd5470cb3d4c..aebbfba1ef9aab84ddd62ac637f267dad1920c36 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "FormBrowser.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlLog;
 
 /**
@@ -33,4 +36,7 @@ public:
        virtual void update();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMLOG_H
index 7280b2f091bae7572f05804e0fb60ab63e1a3b53..b588c23d8a78e0d417b910186eadff24cc87d34f 100644 (file)
@@ -25,6 +25,8 @@ using std::max;
 using std::vector;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 extern  "C" void C_FormDialogView_CancelCB(FL_OBJECT *, long);
 extern  "C" void C_FormDialogView_InputCB(FL_OBJECT *, long);
@@ -192,3 +194,6 @@ ButtonPolicy::SMInput FormMathsBitmap::input(FL_OBJECT * ob, long)
        apply();
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index 375f4e87769ba21907998fffe4fdde7d422ed9b1..77e4e33b19dbcac2cd3b2a4bce32eb12583620de 100644 (file)
@@ -17,6 +17,9 @@
 #include "FormDialogView.h"
 #include <vector>
 
+namespace lyx {
+namespace frontend {
+
 struct BitmapStore
 {
        BitmapStore(int nt_in, int nx_in, int ny_in, int bw_in, int bh_in,
@@ -95,5 +98,7 @@ private:
        int h_;
 };
 
+} // namespace frontend
+} // namespace lyx
 
 #endif // FORM_MATHSBITMAP_H
index a6c366c3684f43d6397fa44765c8ad566e5d7429..2bcc42f06f490e1750bf01fe1cbf5aee51549e78 100644 (file)
@@ -30,6 +30,8 @@ using std::ostringstream;
 #include "delim0.xpm"
 #include "delim1.xpm"
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -147,3 +149,6 @@ ButtonPolicy::SMInput FormMathsDelim::input(FL_OBJECT *, long)
 
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index 4ab44f16a0cf970b777957af085340895ad8dd0e..6563896b25e3f53c9d6bd60f3bd28659653b6110 100644 (file)
 #ifndef FORM_MATHSDELIM_H
 #define FORM_MATHSDELIM_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlMath;
 struct FD_maths_delim;
@@ -41,4 +42,7 @@ private:
        virtual void update();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif //  FORM_MATHSDELIM_H
index 9a12b1684acf67535fd45c76a4a170fe2c0d6d74..7076fc3054b40b4ec126ba0a3f0c3edef9aefa98 100644 (file)
@@ -34,26 +34,28 @@ using std::ostringstream;
 using std::strlen;
 #endif
 
+namespace lyx {
+namespace frontend {
 
-static char h_align_str[80] = "c";
-static char v_align_c[] = "tcb";
+namespace {
 
+char h_align_str[80] = "c";
+char v_align_c[] = "tcb";
 
-extern "C" {
-
-       static
-       int C_FormMathsMatrixAlignFilter(FL_OBJECT * ob, char const *,
-                                        char const * cur, int c)
-       {
-               BOOST_ASSERT(ob);
-               FormMathsMatrix * pre =
-                       static_cast<FormMathsMatrix *>(ob->u_vdata);
-               BOOST_ASSERT(pre);
-               return pre->AlignFilter(cur, c);
-       }
 
+extern "C"
+int C_FormMathsMatrixAlignFilter(FL_OBJECT * ob, char const *,
+                                char const * cur, int c)
+{
+       BOOST_ASSERT(ob);
+       FormMathsMatrix * pre =
+               static_cast<FormMathsMatrix *>(ob->u_vdata);
+       BOOST_ASSERT(pre);
+       return pre->AlignFilter(cur, c);
 }
 
+} // namespace anon
+
 
 typedef FormController<ControlMath, FormView<FD_maths_matrix> > base_class;
 
@@ -128,7 +130,7 @@ int FormMathsMatrix::AlignFilter(char const * cur, int c)
 
        int const n = int(fl_get_slider_value(dialog_->slider_columns) + 0.5)
                - int(len)
-               + int(lyx::count(cur, cur + len, '|'));
+               + int(count(cur, cur + len, '|'));
        if (n < 0)
                return FL_INVALID;
 
@@ -137,3 +139,6 @@ int FormMathsMatrix::AlignFilter(char const * cur, int c)
 
        return FL_INVALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index 7dfd416e933f542fe05025a4e1e55c80b1eff856..ba9d7c05a8d3d5c62c08a98df80a909b7239c621 100644 (file)
 #ifndef FORM_MATHSMATRIX_H
 #define FORM_MATHSMATRIX_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlMath;
 struct FD_maths_matrix;
@@ -43,4 +44,7 @@ private:
        virtual void update();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif //  FORM_MATHSMATRIX_H
index b6a1f0bf518f464e4dbdaf9de59f428e9620b2fc..c6cb94115161a0b999ee950e7c40e6dfe29d25eb 100644 (file)
@@ -32,6 +32,8 @@
 #include "sub.xpm"
 #include "super.xpm"
 
+namespace lyx {
+namespace frontend {
 
 typedef FormController<ControlMath, FormView<FD_maths_panel> > base_class;
 
@@ -130,3 +132,6 @@ ButtonPolicy::SMInput FormMathsPanel::input(FL_OBJECT * ob, long)
 
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index bf9d1eb8adba0d822c4564dcce0d61878c43bcb9..48427cff873588a3ea6258205d798921edbd202b 100644 (file)
 #ifndef FORM_MATHSPANEL_H
 #define FORM_MATHSPANEL_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlMath;
 struct FD_maths_panel;
@@ -42,4 +43,7 @@ private:
        virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif //  FORM_MATHSPANEL_H
index 03cce878ca02e94cbfaa4ec8946da0f020f6a00b..80453a92838d8746d1b98c63021480a77c86d7de 100644 (file)
 
 #include "lyx_forms.h"
 
-
 extern char * latex_mathspace[];
 
+namespace lyx {
+namespace frontend {
+
 typedef FormController<ControlMath, FormView<FD_maths_space> > base_class;
 
 FormMathsSpace::FormMathsSpace(Dialog & parent)
@@ -66,3 +68,6 @@ ButtonPolicy::SMInput FormMathsSpace::input(FL_OBJECT *, long data)
        }
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index f68c1c6638019284c0122b5284ef061978fdebfd..ea147507c62811fee4e44cf264da8c22ce495a4c 100644 (file)
 #ifndef FORM_MATHSSPACE_H
 #define FORM_MATHSSPACE_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlMath;
 struct FD_maths_space;
@@ -44,4 +45,7 @@ private:
        int space_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif //  FORM_MATHSSPACE_H
index b9de12dc42edf7c97c1f87ab77f78cd3b5b15c60..e97017b8bc831e01b6b21cbfc45e63c42fd98afb 100644 (file)
 #include "style.xbm"
 #include "font.xbm"
 
+namespace lyx {
+namespace frontend {
+
+namespace {
 
 char const * latex_mathstyle[] = {
        "displaystyle", "textstyle", "scriptstyle", "scriptscriptstyle"
@@ -34,6 +38,8 @@ kb_action latex_mathfontcmds[] = {
        LFUN_BOLD, LFUN_SANS, LFUN_ROMAN, LFUN_ITAL, LFUN_CODE,
        LFUN_NOUN, LFUN_FRAK, LFUN_EMPH, LFUN_FREEFONT_APPLY, LFUN_DEFAULT
 };
+} // namespace anon
 
 
 typedef FormController<ControlMath, FormView<FD_maths_style> > base_class;
@@ -95,3 +101,6 @@ ButtonPolicy::SMInput FormMathsStyle::input(FL_OBJECT * ob, long data)
 
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index 83ec9ae972649868073264eb7dc5bb6c9ec2134f..39892607b92fe150f2ab586c9923364338fcd3d1 100644 (file)
 #ifndef FORM_MATHSSTYLE_H
 #define FORM_MATHSSTYLE_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlMath;
 struct FD_maths_style;
@@ -44,4 +45,7 @@ private:
        int style_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif //  FORM_MATHSSTYLE_H
index 1160d69e76d4482d6b56decb64500a84e61afd84..00110aca241e9a3461853e265a8fbb08ac78895b 100644 (file)
 
 #include "lyx_forms.h"
 
-
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef FormController<ControlNote, FormView<FD_note> > base_class;
 
@@ -82,3 +83,6 @@ void FormNote::apply()
 
        controller().params().type = type;
 }
+
+} // namespace frontend
+} // namespace lyx
index d444734a2e262831e409911648b0c5c366830da0..8c1e1376d03c9ef4d17548a6df52e7ce62d40ba1 100644 (file)
 #ifndef FORMNOTE_H
 #define FORMNOTE_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
 
 class ControlNote;
 struct FD_note;
@@ -34,4 +35,7 @@ private:
        virtual void update();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMNOTE_H
index 316f98c6ab2967fec3e087b786cc2dd6a41739e4..6224a88ffad024fff257b424d94e75022ed94d39 100644 (file)
 
 #include <boost/bind.hpp>
 
-using lyx::support::contains;
-using lyx::support::getStringFromVector;
-using lyx::support::rtrim;
-
 using boost::bind;
 
 using std::remove_if;
@@ -45,6 +41,13 @@ using std::remove_if;
 using std::vector;
 using std::string;
 
+namespace lyx {
+
+using support::contains;
+using support::getStringFromVector;
+using support::rtrim;
+
+namespace frontend {
 
 namespace {
 
@@ -287,3 +290,6 @@ ButtonPolicy::SMInput FormParagraph::input(FL_OBJECT * ob, long)
 
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index 8d0f80870140b642c9db12075943b0240480069e..d55ae062aec0ef6bd94500fa5945c46516e1428e 100644 (file)
 #ifndef FORM_PARAGRAPH_H
 #define FORM_PARAGRAPH_H
 
-
 #include "FormDialogView.h"
 #include "RadioButtonGroup.h"
 
-struct FD_paragraph;
+namespace lyx {
+namespace frontend {
+
 class ControlParagraph;
+struct FD_paragraph;
 
 /** This class provides an XForms implementation of the FormParagraph dialog.
  */
@@ -41,4 +43,7 @@ private:
        RadioButtonGroup alignment_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index ed0c7d769088edaf77f799234634a8d18d0c0f04..b43be9b4951fc95945de73c34283ab5ec36b8876 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "lyx_forms.h"
 
+namespace lyx {
+namespace frontend {
 
 typedef FormController<ControlPreamble, FormView<FD_preamble> > base_class;
 
@@ -55,3 +57,6 @@ void FormPreamble::update()
 {
        fl_set_input(dialog_->input_preamble, controller().params().c_str());
 }
+
+} // namespace frontend
+} // namespace lyx
index 2abcfc7a92d5eddefe1d38b9da54d334e68544a0..335a1746951b189a69742e5bbe8a0a4b5a9c8b8e 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlPreamble;
 struct FD_preamble;
 
@@ -33,5 +36,7 @@ private:
        virtual void update();
 };
 
+} // namespace frontend
+} // namespace lyx
 
 #endif // FORMPREAMBLE_H
index 61d177d2c2f869cec73617f61c06a659caf6e25b..a0761a28e25efaa6364f0a55f81c7a76d2c121fa 100644 (file)
 
 #include <iomanip>
 
-using lyx::support::AddName;
-using lyx::support::ChangeExtension;
-using lyx::support::rtrim;
-using lyx::support::strToDbl;
-using lyx::support::trim;
-using lyx::support::user_lyxdir;
-
 using std::endl;
 using std::make_pair;
 using std::max;
@@ -53,6 +46,16 @@ using std::pair;
 using std::vector;
 using std::string;
 
+namespace lyx {
+
+using support::AddName;
+using support::ChangeExtension;
+using support::rtrim;
+using support::strToDbl;
+using support::trim;
+using support::user_lyxdir;
+
+namespace frontend {
 
 namespace {
 
@@ -1452,12 +1455,12 @@ void FormPreferences::Language::build()
        fl_set_input_return(dialog_->input_command_end, FL_RETURN_CHANGED);
 
        // Store the lang identifiers for later
-       vector<frnt::LanguagePair> const langs = frnt::getLanguageData(false);
+       vector<LanguagePair> const langs = getLanguageData(false);
        lang_ = getSecond(langs);
 
        FL_OBJECT * obj = dialog_->combox_default_lang;
-       vector<frnt::LanguagePair>::const_iterator lit  = langs.begin();
-       vector<frnt::LanguagePair>::const_iterator lend = langs.end();
+       vector<LanguagePair>::const_iterator lit  = langs.begin();
+       vector<LanguagePair>::const_iterator lend = langs.end();
        for (; lit != lend; ++lit) {
                fl_addto_combox(obj, lit->first.c_str());
        }
@@ -1626,22 +1629,22 @@ void FormPreferences::LnFmisc::apply(LyXRC & rc) const
                (fl_get_counter_value(dialog_->counter_wm_jump));
 
        // See FIXME below
-       // lyx::graphics::DisplayType old_value = rc.display_graphics;
+       // graphics::DisplayType old_value = rc.display_graphics;
        switch (fl_get_choice(dialog_->choice_graphics_display)) {
        case 4:
-               rc.display_graphics = lyx::graphics::NoDisplay;
+               rc.display_graphics = graphics::NoDisplay;
                break;
        case 3:
-               rc.display_graphics = lyx::graphics::ColorDisplay;
+               rc.display_graphics = graphics::ColorDisplay;
                break;
        case 2:
-               rc.display_graphics = lyx::graphics::GrayscaleDisplay;
+               rc.display_graphics = graphics::GrayscaleDisplay;
                break;
        case 1:
-               rc.display_graphics = lyx::graphics::MonochromeDisplay;
+               rc.display_graphics = graphics::MonochromeDisplay;
                break;
        default:
-               rc.display_graphics = lyx::graphics::ColorDisplay;
+               rc.display_graphics = graphics::ColorDisplay;
                break;
        }
 
@@ -1650,7 +1653,7 @@ void FormPreferences::LnFmisc::apply(LyXRC & rc) const
 #endif
 #if 0
        if (old_value != rc.display_graphics) {
-               lyx::graphics::GCache & gc = lyx::graphics::GCache::get();
+               graphics::GCache & gc = graphics::GCache::get();
                gc.changeDisplay();
        }
 #endif
@@ -1729,16 +1732,16 @@ void FormPreferences::LnFmisc::update(LyXRC const & rc)
        fl_set_counter_value(dialog_->counter_wm_jump, rc.wheel_jump);
 
        switch (rc.display_graphics) {
-       case lyx::graphics::NoDisplay:
+       case graphics::NoDisplay:
                fl_set_choice(dialog_->choice_graphics_display, 4);
                break;
-       case lyx::graphics::ColorDisplay:
+       case graphics::ColorDisplay:
                fl_set_choice(dialog_->choice_graphics_display, 3);
                break;
-       case lyx::graphics::GrayscaleDisplay:
+       case graphics::GrayscaleDisplay:
                fl_set_choice(dialog_->choice_graphics_display, 2);
                break;
-       case lyx::graphics::MonochromeDisplay:
+       case graphics::MonochromeDisplay:
                fl_set_choice(dialog_->choice_graphics_display, 1);
                break;
        default:
@@ -2798,3 +2801,6 @@ void FormPreferences::SpellOptions::update(LyXRC const & rc)
        // buttons.
        input(0);
 }
+
+} // namespace frontend
+} // namespace lyx
index 723b408dbce855ad37ad6ccad674366aa33a2d05..e7f4a0cb02d731538cd00cb8d9e9b89ed9a8aea0 100644 (file)
 
 #include <boost/scoped_ptr.hpp>
 
-class ControlPrefs;
 class Converters;
 class Formats;
 
 class Dialogs;
-class FormColorpicker;
 class LyXRC;
 class LyXView;
-class NamedColor;
-class RGBColor;
-class XformsColor;
 
+namespace lyx {
+namespace frontend {
+
+class ControlPrefs;
 struct FD_preferences;
 struct FD_preferences_colors;
 struct FD_preferences_converters;
@@ -47,6 +46,10 @@ struct FD_preferences_printer;
 struct FD_preferences_screen_fonts;
 struct FD_preferences_spelloptions;
 
+class FormColorpicker;
+class NamedColor;
+class RGBColor;
+class XformsColor;
 
 /** This class provides an XForms implementation of the FormPreferences Dialog.
  *  The preferences dialog allows users to set/save their preferences.
@@ -512,4 +515,7 @@ private:
        SpellOptions spelloptions_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMPREFERENCES_H
index a3ea1756ea58d693198c918c3b353e46a50331ab..48d38d464bd744ae796e8e2e474b7644365250a4 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::strToInt;
-
 using std::string;
 
+namespace lyx {
+
+using support::strToInt;
+
+namespace frontend {
 
 typedef FormController<ControlPrint, FormView<FD_print> > base_class;
 
@@ -253,3 +256,6 @@ ButtonPolicy::SMInput FormPrint::input(FL_OBJECT * ob, long)
 
        return activate;
 }
+
+} // namespace frontend
+} // namespace lyx
index 316c8951b5ffc9e033fdc2bf222e0471498adcb0..5a499b5366abd68d027be6f268878e0b7e6e8a5c 100644 (file)
@@ -16,6 +16,9 @@
 #include "FormDialogView.h"
 #include "RadioButtonGroup.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlPrint;
 struct FD_print;
 
@@ -44,4 +47,7 @@ private:
        RadioButtonGroup all_pages_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMPRINT_H
index 5e0ac68a7b6a9bedf471337d80e3f7032a0e35aa..d35e8e2d265f86889c39738c019617402648fde5 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::getStringFromVector;
-
 using std::find;
 using std::max;
 using std::sort;
 using std::string;
 using std::vector;
 
+namespace lyx {
+
+using support::getStringFromVector;
+
+namespace frontend {
 
 typedef FormController<ControlRef, FormView<FD_ref> > base_class;
 
@@ -289,3 +292,6 @@ void FormRef::switch_go_button()
        fl_set_button_shortcut(dialog_->button_go, "#G", 1);
        fl_show_object(dialog_->button_go);
 }
+
+} // namespace frontend
+} // namespace lyx
index 4a5b24b0acd2fab9d543df14cb2233dba7fc97fb..cd00ae9bd99e6bc9bf86b9b31aaa900a734b517a 100644 (file)
 #ifndef FORMREF_H
 #define FORMREF_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlRef;
 struct FD_ref;
 
@@ -46,4 +48,7 @@ private:
        std::vector<std::string> refs_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMREF_H
index 4cf9b97e743b0da77fc7680e2cdd328564b729fc..375dc0e21e6c97e5d880869269efa78410b50f0a 100644 (file)
 
 #include "lyx_forms.h"
 
-
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef FormController<ControlSearch, FormView<FD_search> > base_class;
 
@@ -91,3 +92,6 @@ ButtonPolicy::SMInput FormSearch::input(FL_OBJECT * ob, long)
 
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index 3571508112031887a8c73c7c052c94e9931669b4..7208a27c02e9425245ac540934ece36989169975 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlSearch;
 struct FD_search;
 
@@ -36,4 +39,7 @@ private:
        virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMSEARCH_H
index b1b08ffdcb6c2d7f24c92dfcdebf66aa83df7cb5..7fd0484ca845ffacb612cd4c346fe74fd73517ea 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::trim;
-
 using std::vector;
 using std::string;
 
+namespace lyx {
+
+using support::trim;
+
+namespace frontend {
 
 typedef FormController<ControlSendto, FormView<FD_sendto> > base_class;
 
@@ -118,3 +121,6 @@ void FormSendto::apply()
        controller().setFormat(all_formats_[line-1]);
        controller().setCommand(cmd);
 }
+
+} // namespace frontend
+} // namespace lyx
index b4c85937e6445b7aeda0f277a031fffe8cc887d3..7557e117d26c73e51e6401e102e382fe2da944a8 100644 (file)
 #include "FormDialogView.h"
 #include <vector>
 
-struct FD_sendto;
-class ControlSendto;
 class Format;
 
+namespace lyx {
+namespace frontend {
+
+class ControlSendto;
+struct FD_sendto;
+
 /** This class provides an XForms implementation of the Custom Export Dialog.
  */
 class FormSendto
@@ -39,4 +43,7 @@ private:
        std::vector<Format const *> all_formats_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMSENDTO_H
index 5e94c49c79330ed99895ece17f21bb38f6a19ef0..168c2ddeded2b402db8e103bbe30f929624c22d2 100644 (file)
 
 #include "lyx_forms.h"
 
-
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 FormShowFile::FormShowFile(Dialog & parent)
        : FormController<ControlShowFile, FormBrowser>(parent, _("Show File"))
@@ -45,3 +46,6 @@ void FormShowFile::update()
        else
                fl_add_browser_line(dialog_->browser, contents.c_str());
 }
+
+} // namespace frontend
+} // namespace lyx
index 1b6b4447160199e49a284f677f4b93e964842dff..c52bd744abe7b44824e54748db732642d6e67969 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "FormBrowser.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlShowFile;
 
 /**
@@ -33,4 +36,7 @@ public:
        virtual void update();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMSHOWFILE_H
index 3a4bccbdfb6ca5f5686b8d3653c83ebe438b7bfb..4f51c8d6640a88b1d6334e6e518bb527f4acb07c 100644 (file)
 
 #include "lyx_forms.h"
 
-
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef FormController<ControlSpellchecker, FormView<FD_spellchecker> > base_class;
 
@@ -159,3 +160,6 @@ ButtonPolicy::SMInput FormSpellchecker::input(FL_OBJECT * ob, long ob_value)
 
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index 5a3f036e4f0e7d01e086ef56de45e613240b9160..4a43cb4e5446e8bee4a7da057ad0ab06318f9cb0 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlSpellchecker;
 struct FD_spellchecker;
 
@@ -39,4 +42,7 @@ private:
        virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMSPELLCHECKER_H
index 88d0860fad39f4b4116be94c00cf1369805a3ed2..cc395ba82209b4a5f0834742a5e9f851c653e9c7 100644 (file)
 
 #include <boost/bind.hpp>
 
-using lyx::support::contains;
-using lyx::support::getStringFromVector;
-using lyx::support::isStrDbl;
-
 using boost::bind;
 
 using std::string;
 using std::vector;
 
+namespace lyx {
+
+using support::contains;
+using support::getStringFromVector;
+using support::isStrDbl;
+
+namespace frontend {
 
 namespace {
 
@@ -730,3 +733,6 @@ int FormTabular::checkLongtableOptions(FL_OBJECT * ob, string & special)
 
        return LyXTabular::LAST_ACTION;
 }
+
+} // namespace frontend
+} // namespace lyx
index e6e8529b863086a8efc8d68c53bca2f71fcb9cf2..1d7bbe249b7edd7d6d4d433bb3f5da77bf762e08 100644 (file)
 #include <boost/scoped_ptr.hpp>
 
 class InsetTabular;
+
+namespace lyx {
+namespace frontend {
+
 class ControlTabular;
 struct FD_tabular;
 struct FD_tabular_options;
@@ -65,4 +69,7 @@ private:
        int actCell_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMTABULAR_H
index 4e8f33c87e172a72243627c64754cc02cf537ba5..909a78145bf015354435a9dd5c9948432f7f5d4f 100644 (file)
@@ -22,6 +22,8 @@
 using std::make_pair;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 typedef FormController<ControlTabularCreate, FormView<FD_tabular_create> > base_class;
 
@@ -54,3 +56,6 @@ void FormTabularCreate::apply()
 
        controller().params() = make_pair(xsize, ysize);
 }
+
+} // namespace frontend
+} // namespace lyx
index 4cb7343735255c62dc38c4db1f91cd204c6b9055..61f64dde2c3aed268c424d05a046fc947758f064 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlTabularCreate;
 struct FD_tabular_create;
 
@@ -34,4 +37,7 @@ private:
        virtual void update() {};
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMTABULARCREATE
index f609af0b96e2b07871574c0fb753ad5cc2d3abae..3f672ba1e7bb027e212b02617b2d4a3a2534bd48 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::OnlyFilename;
-
 using std::string;
 
+namespace lyx {
+
+using support::OnlyFilename;
+
+namespace frontend {
+
 
 typedef FormController<ControlTexinfo, FormView<FD_texinfo> > base_class;
 
@@ -135,3 +139,6 @@ void FormTexinfo::updateStyles(ControlTexinfo::texFileSuffix whichStyle)
 
        activeStyle = whichStyle;
 }
+
+} // namespace frontend
+} // namespace lyx
index a28742a6feaf3f2ec658da0617dbfda83fd10815..a5c76cf1c1b85f1f67fda80523c4467317147abf 100644 (file)
 #ifndef FORMTEXINFO_H
 #define FORMTEXINFO_H
 
-
 #include "FormDialogView.h"
 #include "ControlTexinfo.h"
 #include <map>
 
+namespace lyx {
+namespace frontend {
+
 struct FD_texinfo;
 
 class FormTexinfo
@@ -43,4 +45,7 @@ private:
        std::map<ControlTexinfo::texFileSuffix, ContentsType> texdata_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMTEXINFO_H
index 0fd0cd15097b14df836a03932e1cb7cf615b97f7..95af628a270c620982cf962827e431398c67954b 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::trim;
-
 using std::string;
 
+namespace lyx {
+
+using support::trim;
+
+namespace frontend {
 
 typedef FormController<ControlCommand, FormView<FD_text> > base_class;
 
@@ -68,3 +71,6 @@ void FormText::apply()
 {
        controller().params().setContents(fl_get_input(dialog_->input_text));
 }
+
+} // namespace frontend
+} // namespace lyx
index 2c09effac2c495f5a6d38aacceb693e34d893094..af8f543e05ffa8f5892edead10df4c7c14a693a9 100644 (file)
 #ifndef FORMTEXT_H
 #define FORMTEXT_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlCommand;
 struct FD_text;
 
-
 class FormText : public FormController<ControlCommand, FormView<FD_text> > {
 public:
        ///
@@ -35,4 +36,7 @@ private:
        std::string const label_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMTEXT_H
index 9e1dc93b4fb46c8b4e67b7ff81349f3a9d6ad522..245ea49207123910ebfeed1ecb4a15a2a8c21121 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::lowercase;
-using lyx::support::trim;
-using lyx::support::uppercase;
-
 #ifndef CXX_GLOBAL_CSTD
 using std::islower;
 using std::isupper;
@@ -33,6 +29,13 @@ using std::isupper;
 using std::vector;
 using std::string;
 
+namespace lyx {
+
+using support::lowercase;
+using support::trim;
+using support::uppercase;
+
+namespace frontend {
 
 typedef FormController<ControlThesaurus, FormView<FD_thesaurus> > base_class;
 
@@ -190,3 +193,6 @@ ButtonPolicy::SMInput FormThesaurus::input(FL_OBJECT * obj, long)
 
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index 7b0ab9c6240dd7c7890b311353c0f09db36b96e4..aa1c47b2654fdebc60f60e9bdd7319d76884bd99 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlThesaurus;
 struct FD_thesaurus;
 
@@ -48,4 +51,7 @@ private:
        std::string str_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMTHESAURUS_H
index a14c5f5ea06cb5dd6ae862c4571678dbf651e71d..62842e0342c0029ae6e25e43228e176a432b9431 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::getStringFromVector;
-
 using std::vector;
 using std::string;
 
+namespace lyx {
+
+using support::getStringFromVector;
+
+namespace frontend {
 
 typedef FormController<ControlToc, FormView<FD_toc> > base_class;
 
@@ -86,7 +89,7 @@ void FormToc::updateType()
        fl_addto_choice(dialog_->choice_toc_type, choice.c_str());
 
        // And select the correct one
-       string const type = lyx::toc::getType(controller().params().getCmdName());
+       string const type = toc::getType(controller().params().getCmdName());
        fl_set_choice_text(dialog_->choice_toc_type, type.c_str());
 }
 
@@ -102,7 +105,7 @@ void FormToc::updateContents()
                return;
        }
 
-       lyx::toc::Toc const contents = controller().getContents(type);
+       toc::Toc const contents = controller().getContents(type);
 
        // Check if all elements are the same.
        if (toc_ == contents) {
@@ -127,8 +130,8 @@ void FormToc::updateContents()
        fl_clear_browser(dialog_->browser_toc);
        setEnabled(dialog_->browser_toc, true);
 
-       lyx::toc::Toc::const_iterator cit = contents.begin();
-       lyx::toc::Toc::const_iterator end = contents.end();
+       toc::Toc::const_iterator cit = contents.begin();
+       toc::Toc::const_iterator end = contents.end();
        for (; cit != end; ++cit) {
                fl_add_browser_line(dialog_->browser_toc,
                                    cit->asString().c_str());
@@ -137,3 +140,6 @@ void FormToc::updateContents()
        fl_set_browser_topline(dialog_->browser_toc, topline);
        fl_select_browser_line(dialog_->browser_toc, line);
 }
+
+} // namespace frontend
+} // namespace lyx
index 7e55c9e2ab96d43ea86c24712461f71cfd6aac1a..1064ad5aeead774d0838a71de4b019757f24a54c 100644 (file)
 #ifndef FORMTOC_H
 #define FORMTOC_H
 
-
 #include "FormDialogView.h"
 #include "toc.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlToc;
 struct FD_toc;
 
@@ -41,7 +43,10 @@ private:
        void updateContents();
 
        ///
-       lyx::toc::Toc toc_;
+       toc::Toc toc_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMTOC_H
index 9d52023ac98915d318de207cadb3eda311e673c2..0c073e076dcc3c21724fd5eed15dbfdcd5df668c 100644 (file)
@@ -8,7 +8,6 @@
  * Full author contact details are available in file CREDITS.
  */
 
-
 #include <config.h>
 
 #include "FormUrl.h"
@@ -19,6 +18,8 @@
 
 #include "lyx_forms.h"
 
+namespace lyx {
+namespace frontend {
 
 typedef  FormController<ControlCommand, FormView<FD_url> > base_class;
 
@@ -73,3 +74,6 @@ void FormUrl::apply()
        else
                controller().params().setCmdName("url");
 }
+
+} // namespace frontend
+} // namespace lyx
index f5b278527f548f769525c517984e88cf7c41c606..af727c08d3a0ad39759167ef09c25eb9d4dc07cd 100644 (file)
 #ifndef FORMURL_H
 #define FORMURL_H
 
-
 #include "FormDialogView.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlCommand;
 struct FD_url;
 
@@ -33,4 +35,7 @@ private:
        virtual void update();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMURL_H
index a94686ceecc506fa2f92ef7938930263f55c2b28..0df4171318a063df41e775ab37d651e06c756cde 100644 (file)
 
 #include <boost/bind.hpp>
 
-using lyx::support::contains;
-using lyx::support::getStringFromVector;
-using lyx::support::rtrim;
-
 using boost::bind;
 
 using std::remove_if;
@@ -46,6 +42,13 @@ using std::remove_if;
 using std::vector;
 using std::string;
 
+namespace lyx {
+
+using support::contains;
+using support::getStringFromVector;
+using support::rtrim;
+
+namespace frontend {
 
 namespace {
 
@@ -270,3 +273,6 @@ ButtonPolicy::SMInput FormVSpace::input(FL_OBJECT * ob, long)
        }
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx
index d286bdbd457bd35c7d99f15a393e7678ef3c91b9..1f04fbf35b02787a5b4bdbd29a28c4474b9d5255 100644 (file)
 #ifndef FORM_VSPACE_H
 #define FORM_VSPACE_H
 
-
 #include "FormDialogView.h"
 #include "RadioButtonGroup.h"
 
+namespace lyx {
+namespace frontend {
+
 struct FD_vspace;
 class ControlVSpace;
 
@@ -38,4 +40,7 @@ private:
        virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 2a30826980edbef3dd9435ba16a272ab094b96d4..37788f02026d9c819649869f947be8d485c44de9 100644 (file)
 #include "lyx_forms.h"
 #include "support/tostr.h"
 
-using lyx::support::getStringFromVector;
-using lyx::support::subst;
-
 using std::string;
 
+namespace lyx {
+
+using support::getStringFromVector;
+using support::subst;
+
+namespace frontend {
 
 typedef FormController<ControlWrap, FormView<FD_wrap> > base_class;
 
@@ -113,3 +116,6 @@ void FormWrap::update()
        else
                placement_.set(params.placement.c_str()[0]);
 }
+
+} // namespace frontend
+} // namespace lyx
index 45994f318bade9ede8b35826b1129a58f8ea1940..e97057302f66397befff0b4605931976c8a510fa 100644 (file)
 #ifndef FORMWRAP_H
 #define FORMWRAP_H
 
-
 #include "FormDialogView.h"
 #include "RadioButtonGroup.h"
 
+namespace lyx {
+namespace frontend {
+
 class ControlWrap;
 struct FD_wrap;
 
@@ -39,4 +41,7 @@ private:
        RadioButtonGroup placement_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMWRAP_H
index f5ce4c134d284e416eb74819fc6a9e5a9db2a203..0409b58cdd265a8cd54effa3ac5ac4bad9ee5f99 100644 (file)
@@ -19,7 +19,7 @@ namespace LyXKeySymFactory {
 
 LyXKeySym * create()
 {
-       return new XLyXKeySym;
+       return new lyx::frontend::XLyXKeySym;
 }
 
 }
index b17a549d9fa6c27cc5a17fb46b161017d317ce3b..6e007f0de8d6113b758485e0ccbc935aa48375b7 100644 (file)
@@ -20,6 +20,9 @@ namespace LyXScreenFactory {
 
 LyXScreen * create(WorkArea & owner)
 {
+       using lyx::frontend::XScreen;
+       using lyx::frontend::XWorkArea;
+
        return new XScreen(static_cast<XWorkArea &>(owner));
 }
 
index cdaa0906aae2988ea164862c385cf8535da4af10..08e3884cbb90048cd6a8adcba0515e0c5b8bf666 100644 (file)
@@ -25,6 +25,8 @@
 
 using std::endl;
 
+namespace lyx {
+namespace frontend {
 
 void RadioButtonGroup::init(FL_OBJECT * ob, size_type value)
 {
@@ -96,7 +98,7 @@ void RadioButtonGroup::unset() const
 }
 
 
-RadioButtonGroup::size_type RadioButtonGroup::get() const
+size_type RadioButtonGroup::get() const
 {
        // Find the active button.
        ButtonValueMap::const_iterator it =
@@ -117,6 +119,9 @@ void RadioButtonGroup::setEnabled(bool enable)
        ButtonValueMap::iterator it  = map.begin();
        ButtonValueMap::iterator end = map.end();
        for (; it != end; ++it) {
-               ::setEnabled(it->first, enable);
+               lyx::frontend::setEnabled(it->first, enable);
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index 5fc6b1ed4d6704a6b081da7aa5c1777f76592166..3be3c0ad6182c064d8b2e0fc325d343f151efb3e 100644 (file)
 #ifndef RADIOBUTTONGROUP_H
 #define RADIOBUTTONGROUP_H
 
-
 #include "support/types.h"
 #include <vector>
 #include <utility>
 #include "forms_fwd.h"
 
+namespace lyx {
+namespace frontend {
+
 /** This class simplifies interaction with a group of radio buttons:
  *  one, and only one, can be selected.
  *  The idea is that you register a bunch of radio buttons with
@@ -31,8 +33,6 @@
  */
 class RadioButtonGroup {
 public:
-       ///
-       typedef lyx::size_type size_type;
 
        /// Register a radio button with its corresponding value.
        void init(FL_OBJECT * ob, size_type value);
@@ -58,4 +58,7 @@ private:
        ButtonValueMap map;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // RADIOBUTTONGROUP_H
index dc741ca98e0181db71c59a85be374814d2a595df..9ea6da5f03feb849c84cf73655a4ccaaa1baa643 100644 (file)
 
 #include <boost/bind.hpp>
 
-using lyx::support::trim;
-
 using std::string;
 
 
+namespace lyx {
+
+using support::trim;
+
+namespace frontend {
+
+
 bool Tooltips::enabled_ = true;
 
 boost::signal0<void> Tooltips::toggled;
@@ -76,3 +81,6 @@ void Tooltips::init(FL_OBJECT * ob, string const & tip)
        char const * const c_str = enabled_ ? str.c_str() : 0;
        fl_set_object_helper(ob, c_str);
 }
+
+} // namespace frontend
+} // namespace lyx
index 5b7624a098e3486b72a5bce71bb0becaa1f9140e..cd618d1a42433cf22b33a897c73bd596a91d5137 100644 (file)
@@ -25,6 +25,8 @@
 
 #include <map>
 
+namespace lyx {
+namespace frontend {
 
 class Tooltips : boost::noncopyable, public boost::signals::trackable {
 public:
@@ -61,4 +63,7 @@ private:
        TooltipsMap tooltipsMap;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // TOOLTIPS_H
index 8158ee0191a708853ad4864bbea387ee52635227..3b186a1f3e57f14a1f8dd6cea21fd8be4f56e717 100644 (file)
@@ -18,7 +18,7 @@ namespace WorkAreaFactory {
 
 WorkArea * create(LyXView & owner, int w, int h)
 {
-       return new XWorkArea(owner, w, h);
+       return new lyx::frontend::XWorkArea(owner, w, h);
 }
 
 }
index a52ffe6c88938c08bf92e127aa1fa0b9681b070b..74a1d7843ebe741ca23a1c5f39b853f9fb8c53f8 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::frontend::Box;
-using lyx::frontend::BoxList;
-
-using lyx::support::lowercase;
-using lyx::support::subst;
-
 using std::distance;
 using std::endl;
 using std::for_each;
 using std::string;
 using std::vector;
 
+namespace lyx {
+
+using support::lowercase;
+using support::subst;
+
+namespace frontend {
 
 typedef vector<int>::size_type size_type;
 
@@ -91,7 +91,6 @@ XFormsMenubar::XFormsMenubar(LyXView * view, MenuBackend const & mb)
          menubackend_(&mb),
          menubar_(0)
 {
-       using lyx::frontend::WidgetMap;
        owner_->metricsUpdated.connect(boost::bind(&WidgetMap::updateMetrics,
                                                   &widgets_));
 
@@ -428,3 +427,6 @@ XFormsMenubar::ItemInfo::ItemInfo
 
 XFormsMenubar::ItemInfo::~ItemInfo()
 {}
+
+} // namespace frontend
+} // namespace lyx
index ded13fb8622c3f6611bb8a358e19b202bfe3c286..b73c480c1d5d42f26658111b92ea8fc2d1824052 100644 (file)
 
 #include <vector>
 
-
 class LyXView;
-class XFormsView;
 class Menu;
 class MenuItem;
 class MenuBackend;
 
+namespace lyx {
+namespace frontend {
+
+class XFormsView;
+
 class XFormsMenubar : public Menubar {
 public:
        ///
@@ -69,9 +72,9 @@ private:
        ///
        MenuBackend const * menubackend_;
        ///
-       lyx::frontend::Box * menubar_;
+       Box * menubar_;
        ///
-       lyx::frontend::WidgetMap widgets_;
+       WidgetMap widgets_;
        ///
        struct ItemInfo {
                ///
@@ -91,4 +94,8 @@ private:
        ///
        ButtonList buttonlist_;
 };
+
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 283e630932b5d08bc1449489780a1a8066a19dce..aa965320e8da09e09ff613ff63a02a034fc37acd 100644 (file)
 #include <sstream>
 #include <vector>
 
-using lyx::frontend::Box;
-using lyx::frontend::BoxList;
-
-using lyx::support::compare_ascii_no_case;
-
 using std::distance;
 using std::endl;
 using std::string;
 using std::vector;
 
+namespace lyx {
+
+using support::compare_ascii_no_case;
+
+namespace frontend {
 
 // some constants
 const int standardspacing = 2; // the usual space between items
@@ -183,14 +183,21 @@ void XFormsToolbar::toolbarItem::generateInactivePixmaps()
                                raw_inactive_data, &inactive_pixmap, 0, 0);
 }
 
+} // namespace frontend
+} // namespace lyx
+
 
 Toolbars::ToolbarPtr make_toolbar(ToolbarBackend::Toolbar const & tbb,
                                  LyXView & owner)
 {
+       using lyx::frontend::XFormsToolbar
        return Toolbars::ToolbarPtr(new XFormsToolbar(tbb, owner));
 }
 
 
+namespace lyx {
+namespace frontend {
+
 XFormsToolbar::XFormsToolbar(ToolbarBackend::Toolbar const & tbb,
                             LyXView & o)
        : toolbar_(0),
@@ -234,7 +241,6 @@ XFormsToolbar::XFormsToolbar(ToolbarBackend::Toolbar const & tbb,
 
        toolbar_->children().push_back(Box(padding, padding));
 
-       using lyx::frontend::WidgetMap;
        owner_.metricsUpdated.connect(boost::bind(&WidgetMap::updateMetrics,
                                                  &widgets_));
 
@@ -507,7 +513,7 @@ void XLayoutBox::open()
 
 void XLayoutBox::setEnabled(bool enable)
 {
-       ::setEnabled(combox_, enable);
+       lyx::frontend::setEnabled(combox_, enable);
 }
 
 
@@ -530,3 +536,6 @@ void XLayoutBox::selected()
        }
        lyxerr << "ERROR (XLayoutBox::selected): layout not found!" << endl;
 }
+
+} // namespace frontend
+} // namespace lyx
index 006e28162e099d3d37219279655c68e5f8ac4a89..dc31ce5ab6f23342d206b7d30ce0be0bd8d5865f 100644 (file)
 #include <boost/scoped_ptr.hpp>
 #include <vector>
 
+namespace lyx {
+namespace frontend {
 
+class Tooltips;
 class XFormsToolbar;
 class XFormsView;
-class Tooltips;
 
 
 class XLayoutBox: public LayoutBox {
@@ -95,11 +97,11 @@ public:
        ///
        XFormsView::Position position_;
        ///
-       lyx::frontend::Box * toolbar_;
+       Box * toolbar_;
        ///
-       lyx::frontend::BoxList * toolbar_buttons_;
+       BoxList * toolbar_buttons_;
        ///
-       lyx::frontend::WidgetMap widgets_;
+       WidgetMap widgets_;
 
        typedef std::vector<FuncRequest> Funcs;
 
@@ -117,4 +119,7 @@ public:
        boost::scoped_ptr<XLayoutBox> layout_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 7f7db7abcf3e420a68686db646d7389bd9b375e7..7cf8cd28aa62edb36863bac7eb521f6f1b74caa6 100644 (file)
 
 #include <boost/bind.hpp>
 
-using lyx::frontend::Box;
-
-using lyx::support::LibFileSearch;
-
 using std::abs;
 using std::endl;
 using std::string;
 
-
 //extern void AutoSave(BufferView *);
 extern void QuitLyX();
 
+namespace lyx {
+
+using support::LibFileSearch;
+
+namespace frontend {
+
 extern "C" {
 
 static
@@ -273,3 +274,6 @@ void XFormsView::busy(bool yes) const
                fl_activate_all_forms();
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index 8d96550ee34ea70d3616dc3bb90cf15027df2872..f74b4ff28831334b4727c8bb428e21a36f0ed620 100644 (file)
@@ -22,6 +22,9 @@
 
 #include <map>
 
+namespace lyx {
+namespace frontend {
+
 class XMiniBuffer;
 
 /**
@@ -45,7 +48,7 @@ public:
        ~XFormsView();
 
        /// Accessor to the appropriate layout Box.
-       lyx::frontend::Box & getBox(Position pos) const;
+       Box & getBox(Position pos) const;
 
        /**
         * show - display the top-level window
@@ -88,10 +91,10 @@ private:
        void show_view_state();
 
        /// The top-most box of the layout engine containing all other boxes.
-       lyx::frontend::Box window_;
+       Box window_;
 
        // Accessors to the various Boxes.
-       std::map<Position, lyx::frontend::Box *> box_map_;
+       std::map<Position, Box *> box_map_;
 
        /// the minibuffer
        boost::scoped_ptr<XMiniBuffer> minibuffer_;
@@ -109,4 +112,8 @@ private:
        ///
        Pixmap icon_mask_;
 };
+
+} // namespace frontend
+} // namespace lyx
+
 #endif
index 5a71008dabc9a4c617f91fb93763f907f7cb6f3b..a16a7bc6c12e90eb9a66f9851463d79761a17e26 100644 (file)
@@ -21,6 +21,17 @@ using std::endl;
 using std::string;
 
 
+bool operator==(LyXKeySym const & k1, LyXKeySym const & k2)
+{
+       using lyx::frontend::XLyXKeySym;
+       return static_cast<XLyXKeySym const &>(k1).keysym()
+               == static_cast<XLyXKeySym const &>(k2).keysym();
+}
+
+
+namespace lyx {
+namespace frontend {
+
 XLyXKeySym::XLyXKeySym()
        : LyXKeySym(), keysym_(NoSymbol)
 {
@@ -106,9 +117,5 @@ string const XLyXKeySym::print(key_modifier::state mod) const
        return kb_keymap::printKeySym(*this, mod);
 }
 
-
-bool operator==(LyXKeySym const & k1, LyXKeySym const & k2)
-{
-       return static_cast<XLyXKeySym const &>(k1).keysym()
-               == static_cast<XLyXKeySym const &>(k2).keysym();
-}
+} // namespace frontend
+} // namespace lyx
index 93944204a2798e135f2f5b7a589b9e69a453f950..dca9a9f6fd6169d779e6b71f5bfe480f34ee05c3 100644 (file)
@@ -15,6 +15,9 @@
 #include <X11/Xlib.h>
 #include "frontends/LyXKeySym.h"
 
+namespace lyx {
+namespace frontend {
+
 /**
  * This is the XForms (X11) version of LyXKeySym.
  */
@@ -55,4 +58,7 @@ private:
        unsigned int keysym_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // XLYXKEYSYM_H
index 40854a4b1f874599adec77b57c029826487f50fa..54c983f03069b3973265ccfd5173128816a9fb20 100644 (file)
 
 #include <boost/bind.hpp>
 
-using lyx::frontend::Box;
-using lyx::frontend::BoxList;
-using lyx::frontend::WidgetMap;
-
 using std::vector;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -358,3 +356,6 @@ FL_FREEBROWSER * create_freebrowser(void * parent)
 }
 
 } // namespace anon
+
+} // namespace frontend
+} // namespace lyx
index afea4343c8ea4061ea8a5adb65e9df8af91b5025..ea75f214cf64bdc99e9665e822efd5b87ae63cd5 100644 (file)
 struct fl_freebrowser_;
 typedef fl_freebrowser_ FL_FREEBROWSER;
 
+class Timeout;
+
+namespace lyx {
+namespace frontend {
+
 class XFormsView;
 class ControlCommandBuffer;
-class Timeout;
 
 /// in xforms, the minibuffer is both a status bar and a command buffer
 class XMiniBuffer {
@@ -105,9 +109,12 @@ private:
        /// are we showing an informational temporary message ?
        bool info_shown_;
        ///
-       lyx::frontend::Box * minibuffer_;
+       Box * minibuffer_;
        ///
-       lyx::frontend::WidgetMap widgets_;
+       WidgetMap widgets_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // XMINIBUFFER_H
index e9e433953cacb3a8214d636ed3802d60a74ec584..7bfbca941dc1e750d3fdbbd6d1a1c20e2920c14e 100644 (file)
 
 #include "support/lstrings.h"
 
-using lyx::support::uppercase;
-
 using std::string;
 
+namespace lyx {
+
+using support::uppercase;
+
+namespace frontend {
 
 XPainter::XPainter(XWorkArea & xwa)
        : Painter(), owner_(xwa)
@@ -137,11 +140,11 @@ void XPainter::arc(int x, int y,
 
 
 void XPainter::image(int x, int y,
-                         int w, int h,
-                         lyx::graphics::Image const & i)
+                    int w, int h,
+                    graphics::Image const & i)
 {
-       lyx::graphics::xformsImage const & image =
-               static_cast<lyx::graphics::xformsImage const &>(i);
+       graphics::xformsImage const & image =
+               static_cast<graphics::xformsImage const &>(i);
 
        XGCValues val;
        val.function = GXcopy;
@@ -260,3 +263,6 @@ void XPainter::text(int x, int y,
                underline(f, x, y, xfont_metrics::width(s, ls, f));
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index 1be0ca6aab918c98fcefafe7113647d678e6b480..e7de816b6e4e09d2bc17cac3690b8b202e8a9443 100644 (file)
 
 #include <X11/Xlib.h>
 
-
 class LyXFont;
+
+namespace lyx {
+namespace frontend {
+
 class XWorkArea;
 
 /**
@@ -91,7 +94,7 @@ public:
        /// draw an image from the image cache
        virtual void image(int x, int y,
                int w, int h,
-               lyx::graphics::Image const & image);
+               graphics::Image const & image);
 
        /// draw a string at position x, y (y is the baseline)
        virtual void text(int x, int y,
@@ -118,4 +121,7 @@ private:
        XWorkArea & owner_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // XPAINTER_H
index 5a6cc2e89be19d0e6d3c9bfee9ec6ebe8b8a9e56..ff5e6f534f5584b661a40b46ee52c1111cb27042 100644 (file)
 
 #include <boost/bind.hpp>
 
-using lyx::frontend::Box;
-using lyx::frontend::BoxList;
-using lyx::frontend::WidgetMap;
-
 using std::abs;
 using std::dec;
 using std::endl;
 using std::hex;
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -634,3 +632,6 @@ void XWorkArea::putClipboard(string const & s) const
 
        fl_stuff_clipboard(work_area, 0, hold.data(), hold.size(), 0);
 }
+
+} // namespace frontend
+} // namespace lyx
index 570100df53cb8b8387be5f205f1bac581ac54077..4936c38a223f970237a2b4df848d047838b5ffd0 100644 (file)
@@ -22,7 +22,9 @@
 
 class LyXView;
 
-///
+namespace lyx {
+namespace frontend {
+
 class XWorkArea : public WorkArea {
 public:
        ///
@@ -86,9 +88,12 @@ private:
        /// the current document's height (for scrollbar)
        int doc_height_;
        ///
-       lyx::frontend::Box * wa_box_;
+       Box * wa_box_;
        ///
-       lyx::frontend::WidgetMap widgets_;
+       WidgetMap widgets_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // XWORKAREA_H
index 41b5b746401da012245aa6b3514951c1f56d39a8..532823e34fbf245f9d58affc705f5f39e5fd1d94 100644 (file)
 
 #include "lyx_forms.h"
 
-using lyx::support::isStrDbl;
-
 using std::string;
 
+namespace lyx {
+
+using support::isStrDbl;
+
+namespace frontend {
+
 
 void addCheckedLyXLength(BCView & bcview,
                         FL_OBJECT * input, FL_OBJECT * label)
@@ -102,3 +106,6 @@ bool CheckedGlueLength::check() const
 
        return valid;
 }
+
+} // namespace frontend
+} // namespace lyx
index 5318e5c811d8291be149213a91adfb705964cf40..1088bbcaa999eefbdabb4c6c39009cc4edc6012d 100644 (file)
 #ifndef CHECKEDWIDGETS_H
 #define CHECKEDWIDGETS_H
 
-
 #include "BCView.h"
 #include "forms_fwd.h"
 
+namespace lyx {
+namespace frontend {
+
 void addCheckedLyXLength(BCView & bcview,
                         FL_OBJECT * input, FL_OBJECT * label = 0);
 
@@ -57,4 +59,7 @@ private:
        FL_OBJECT * label_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CHECKEDWIDGETS_H
index 3a9add497f4f7f3d14f04588a101fbda7eda55d9..242ba736b9c256aba6046d3fe3ef366b5217cc43 100644 (file)
@@ -13,6 +13,9 @@
 #include "fdesign_base.h"
 #include "lyx_forms.h"
 
+namespace lyx {
+namespace frontend {
+
 FD_base::~FD_base()
 {
        if (!form)
@@ -23,3 +26,6 @@ FD_base::~FD_base()
 
        fl_free_form(form);
 }
+
+} // namespace frontend
+} // namespace lyx
index 26dfd3e6609a685f35345ce3eeae4b9b7bee881c..dad30079558f939fa8ddffd714f700703bee0fec 100644 (file)
 #ifndef FDESIGN_BASE_H
 #define FDESIGN_BASE_H
 
-
 #include "forms_fwd.h"
 
+namespace lyx {
+namespace frontend {
+
 /// A base class for the fdesign-generated structs
 struct FD_base {
        virtual ~FD_base();
        FL_FORM * form;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FDESIGN_BASE_H
index 4e56a4d2903fb798580b64196d7340b857779036..a744a149a94249deb20e0baea39c6edc30e261bf 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+b#!/bin/sh
 #
 # file fdfix.sh
 # This file is part of LyX, the document processor.
index e9780b0ea76efdaa5f5836aa390ca06241f3b5ac..80e0c377b795272cf0e889cab1f421cd4c5a1e6a 100644 (file)
 s/[    ]*$//
 
 
+# Immediately after line "#include form_xxx.h"
+# open namespace lyx::frontend.
+/^#include "form_/a\
+\
+namespace lyx {\
+namespace frontend {
+
+
+# When the end of the file is reached, close namespace lyx::frontend.
+$ a\
+\
+} // namespace frontend\
+} // namespace lyx
+
+
 # Delete blank lines and fdesign comments.
 /^$/d
 /generated with fdesign/d
index fa17837069aac01bbf162c1fea16af23793c569c..bf9bf9f0ef31544db047e69228114863e8ecca16 100644 (file)
@@ -24,18 +24,25 @@ s/[         ]*$//
 /generated with fdesign/d
 
 
-# Pretty formatting; add an empty line before "#endif"
+# Immediately before line "#endif", close namespace lyx::frontend
 /#endif/i\
-
+\
+} // namespace frontend\
+} // namespace lyx\
 
 # Immediately after line "#define FD_xxx_h_" that starts off the header file,
-# #include "fdesign_base.h" and append the contents of file EXTERN_FUNCS.
+# * #include "fdesign_base.h";
+# * open namespace lyx::frontend and;
+# * append the contents of file EXTERN_FUNCS.
 # This latter is a sorted, unique list of any function declarations.
 # The actual name of the file is inserted by the parent shell script.
 /#define FD/{
 a\
 \
 #include "fdesign_base.h"\
+\
+namespace lyx {\
+namespace frontend {\
 
 r EXTERN_FUNCS
 }
index 75cf0b6dfde7818349a24b4ef5c228c33d6bec94..1f8f5d1466bf10ca8e72f29902452b2187f62edf 100644 (file)
 
 #include "support/lstrings.h"
 
-namespace support = lyx::support;
-
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 // Extract shortcut from "<identifier>|<shortcut>" string
 string const scex(string const & str)
@@ -32,3 +32,6 @@ string const idex(string const & str)
        support::split(str, identifier, '|');
        return identifier;
 }
+
+} // namespace frontend
+} // namespace lyx
index b5895e429be93bcf1526b7e8be3e22bbcf9d4a4f..65a1318cae911ff126abcf9c648b75ba4f927192 100644 (file)
 
 #include <string>
 
+namespace lyx {
+namespace frontend {
+
 /// Extract shortcut from "<identifer>|<shortcut>" string
 std::string const scex(std::string const &);
 
 /// Extract identifier from "<identifer>|<shortcut>" string
 std::string const idex(std::string const &);
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // FORMS_GETTEXT_H
index a2e8ecba193fdf4a8d1d8e666f985a6e302e0861..df14095962faec7cdb8ed26043c68740aa6cf2e0 100644 (file)
 using lyx::support::AddName;
 using lyx::support::user_lyxdir;
 
+using lyx::frontend::fontloader;
+using lyx::frontend::getRGBColor;
+using lyx::frontend::lyxColorHandler;
+using lyx::frontend::LyXColorHandler;
+using lyx::frontend::XformsColor;
+using lyx::frontend::XFormsView;
+
 namespace os = lyx::support::os;
 
 #ifndef CXX_GLOBAL_CSTD
index 73703b343b0519b942d8a25be3164feb1630f44c..28030cb45beb3672fa84e5a29dfd6b4ab5416787 100644 (file)
 
 #include <algorithm>
 
-using lyx::support::LibFileSearch;
-using lyx::support::OnlyPath;
-using lyx::support::Systemcall;
-
 using std::endl;
 using std::string;
 
+namespace lyx {
+
+using support::LibFileSearch;
+using support::OnlyPath;
+using support::Systemcall;
+
+namespace frontend {
 
 // The global fontloader
 xfont_loader fontloader;
@@ -381,3 +384,6 @@ bool xfont_loader::available(LyXFont const & f)
                getFontinfo(f.family(), f.series(), f.realShape());
        return fontinfo[f.family()][f.series()][f.realShape()]->exist();
 }
+
+} // namespace frontend
+} // namespace lyx
index 2e8beb67dc81a0817294b373536d15137cc1c895..c86dec027f970b05e383941c10c7aae9cd0ff4d1 100644 (file)
 #ifndef FONTLOADER_H_
 #define FONTLOADER_H_
 
-
 #include <X11/Xlib.h>
 #include "lyxfont.h"
 
+namespace lyx {
+namespace frontend {
+
 class FontInfo;
 
 /** This class takes care of loading fonts. It uses FontInfo to make
@@ -75,4 +77,7 @@ private:
 ///
 extern xfont_loader fontloader;
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index eba8c5f4dac5533577cd26cd69263a21ed038c52..a150e65df90b065bbbc8116cca3326c8968701d6 100644 (file)
 
 #include <boost/scoped_array.hpp>
 
-using lyx::support::uppercase;
-
 using std::string;
 
+using lyx::support::uppercase;
+using lyx::frontend::fontloader;
 
 namespace {
 
index c4326be7cc09ffd50d2f603d7b5b7cb1d658681a..4b31b277be36c2c6f5dcb23eadff983938194546 100644 (file)
@@ -13,9 +13,6 @@
 #ifndef XFONT_METRICS_H
 #define XFONT_METRICS_H
 
-
-
-
 #include <X11/Xlib.h>
 
 class LyXFont;
index 99f20eaab5c8f35b5958ea4d75e865f21e30e776..354d55cfa35da13dd81b961191c32e2b2ab2860b 100644 (file)
@@ -20,6 +20,8 @@
 
 using std::string;
 
+namespace lyx {
+namespace frontend {
 
 xformsBC::xformsBC(ButtonController const & parent,
                   string const & cancel, string const & close)
@@ -43,3 +45,6 @@ void xformsBC::setButtonLabel(FL_OBJECT * obj, string const & label) const
 {
        fl_set_object_label(obj, label.c_str());
 }
+
+} // namespace frontend
+} // namespace lyx
index e7725c3baac9e6a6c88b444aff157680f53363fb..085ca7174a378aeac3034b84374a4b7ede80761b 100644 (file)
@@ -19,6 +19,9 @@
 #include "BCView.h"
 #include "gettext.h"
 
+namespace lyx {
+namespace frontend {
+
 class xformsBC : public GuiBC<FL_OBJECT, FL_OBJECT> {
 public:
        ///
@@ -36,4 +39,7 @@ private:
        void setButtonLabel(FL_OBJECT *, std::string const & label) const;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // XFORMSBC_H
index bdb98f49cdfdc7537edc578bf38c9cfcd2bcaa15..49662b99728196a7ddc59bdde78121d54cabf574 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <boost/tuple/tuple.hpp>
 
+using lyx::frontend::getRGBColor;
 
 using lyx::support::float_equal;
 using lyx::support::prefixIs;
index 6d4d3ccce1505d523ecd7f2b6ddea24b63944cb3..f7e7e8eb0f2662945012978d6c86516db85ba3be 100644 (file)
@@ -16,7 +16,6 @@
 #ifndef XFORMSIMAGE_H
 #define XFORMSIMAGE_H
 
-
 #include "graphics/GraphicsImage.h"
 
 #include <X11/X.h>
index 324a280c60908b00ee3f54488dbc77450c6ab720..c9f5c26f090393abe6d39dacc7eba5a8419334f5 100644 (file)
 
 #include "lyx_forms.h"
 
-
 Timeout::Timeout(unsigned int msec, Type t)
-       : pimpl_(new xformsTimeout(*this)), type(t), timeout_ms(msec)
+       : pimpl_(new lyx::frontend::xformsTimeout(*this)),
+         type(t), timeout_ms(msec)
 {}
 
 
+namespace lyx {
+namespace frontend {
+
 namespace {
 
 extern "C"
@@ -77,3 +80,6 @@ void xformsTimeout::reset()
 {
        timeout_id = -1;
 }
+
+} // namespace frontend
+} // namespace lyx
index 3a127d84682fbd2b94366a54e8a51ac7f2203868..34aff02df06e43a7a5b0282b9955d9a67fc7df37 100644 (file)
@@ -16,6 +16,8 @@
 
 #include "frontends/Timeout.h"
 
+namespace lyx {
+namespace frontend {
 
 /**
  * This class executes the callback when the timeout expires
@@ -41,4 +43,7 @@ private:
        int timeout_id;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // XFORMSTIMEOUT_H
index 1901b372366a6cbc390bdc41648682544a2edeb7..50fb6409d4fb85485fd65cbb49a8008bd56552fa 100644 (file)
 
 #include <fstream>
 
-using lyx::support::AbsolutePath;
-using lyx::support::FileInfo;
-using lyx::support::isStrDbl;
-using lyx::support::OnlyPath;
-using lyx::support::subst;
-using lyx::support::trim;
-
 using std::make_pair;
 
 using std::ofstream;
 using std::vector;
 using std::string;
 
+namespace lyx {
+
+using support::AbsolutePath;
+using support::FileInfo;
+using support::isStrDbl;
+using support::OnlyPath;
+using support::subst;
+using support::trim;
+
+namespace frontend {
 
 std::string const buildChoiceLengthString()
 {
@@ -557,3 +560,6 @@ bool RWInfo::ReadableFile(string const & name)
 
        return true;
 }
+
+} // namespace frontend
+} // namespace lyx
index 7a514945d5b3049e5031609191f53273ee3efd2f..0d003d1ea7fecc52c85653ec2edea02298321214 100644 (file)
@@ -12,7 +12,6 @@
 #ifndef XFORMSHELPERS_H
 #define XFORMSHELPERS_H
 
-
 #include "forms_fwd.h"
 
 #include "Color.h"
@@ -22,6 +21,9 @@
 
 class LyXLength;
 
+namespace lyx {
+namespace frontend {
+
 /// parse "&Save" etc. to <"Save", "#S">. Does not handle &&
 std::pair<std::string, std::string> parse_shortcut(std::string const & str);
 
@@ -116,4 +118,8 @@ private:
        ///
        static std::string error_message;
 };
+
+} // namespace frontend
+} // namespace lyx
+
 #endif // XFORMSHELPERS_H
index ddfc76907847f817d7276bdca59dda99f3864924..d84aa560be7e402de64b83151bdc353ee1a20f26 100644 (file)
@@ -18,6 +18,8 @@
 #include <algorithm> // std::max. Use FL_max in .c code...
 #include "lyx_forms.h"
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -165,3 +167,6 @@ void scale_form_horizontally(FL_FORM * form, double factor)
                        scale_tabfolder_horizontally(ob, factor);
        }
 }
+
+} // namespace frontend
+} // namespace lyx
index cc268743f79fc6227316475792699729bd29893c..7243dc8401dbdc7a9754753ecf34cad7166316cf 100644 (file)
 #ifndef XFORMS_RESIZE_H
 #define XFORMS_RESIZE_H
 
-
 #include "forms_fwd.h"
 
+namespace lyx {
+namespace frontend {
+
 /** Ascertains the scaling factor needed to ensure that all labels fit
     within their button.
 
@@ -30,4 +32,7 @@ double get_scale_to_fit(FL_FORM * form);
  */
 void scale_form_horizontally(FL_FORM * form, double factor);
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // XFORMS_RESIZE_H
index 6465b5fee3ac60c9197a807250ec31b17f01c7e5..826dae7635b5902a2960745b87e823fbe8519d9c 100644 (file)
@@ -21,6 +21,8 @@
 
 using std::endl;
 
+namespace lyx {
+namespace frontend {
 
 namespace {
 
@@ -171,3 +173,6 @@ void XScreen::expose(int x, int y, int w, int h)
 
        XSendEvent(fl_get_display(), owner_.getWin(), False, 0, &ev);
 }
+
+} // namespace frontend
+} // namespace lyx
index 68eb4cca0f6c2878617455404fb2b3e128211232..00bfc2538e2455602404165ad568b821a04f9ecf 100644 (file)
 #ifndef XSCREEN_H
 #define XSCREEN_H
 
-
 #include "screen.h"
 #include <X11/Xlib.h> // for Pixmap, GC
 
 class WorkArea;
-class XWorkArea;
 
+namespace lyx {
+namespace frontend {
+
+class XWorkArea;
 
 /** The class XScreen is used for the main Textbody.
     Concretely, the screen is held in a pixmap.  This pixmap is kept up to
@@ -68,4 +70,7 @@ private:
        GC gc_copy;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif
index c082574b2ad1647cc67dbc4ce1a7d1100e2cf135..b4ef5755c02333a2000c082c89df36f8b71a6ac4 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-19  Angus Leeming  <leeming@lyx.org>
+
+       * insetcite.[Ch]: small change because namespace biblio is
+       now namespace lyx::biblio.
+
 2004-05-15  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * insettabular.[Ch] (buffer): make Buffer * argument const
index 86e675f0fcdbc2e8f8b8d3e168ca8c382cd607b9..ef4e21acf2363b6a8066eb1ac469ef257599d599 100644 (file)
@@ -36,6 +36,8 @@ using std::ostream;
 using std::vector;
 using std::map;
 
+namespace biblio = lyx::biblio;
+
 
 namespace {
 
index 12b8b1d3bb93140c05cd5b696d82710858ce1132..8a5091f33f0353bf53a0b3b7387f9f3504f86154 100644 (file)
@@ -48,9 +48,9 @@ private:
 
        struct Cache {
                ///
-               Cache() : engine(biblio::ENGINE_BASIC) {}
+               Cache() : engine(lyx::biblio::ENGINE_BASIC) {}
                ///
-               biblio::CiteEngine engine;
+               lyx::biblio::CiteEngine engine;
                ///
                InsetCommandParams params;
                ///
index 42a7b708da894108948468fdb07a517823f382e6..defcbe968966c9fbb70760d854e8dce6b6123a78 100644 (file)
@@ -128,6 +128,8 @@ using std::pair;
 using std::string;
 using std::istringstream;
 
+namespace biblio = lyx::biblio;
+
 
 extern BufferList bufferlist;
 extern LyXServer * lyxserver;