+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>
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)
string const ToolbarBackend::getIcon(FuncRequest const & f)
{
+ using lyx::frontend::find_xpm;
+
string fullname;
if (f.action == LFUN_INSERT_MATH) {
using std::ostringstream;
using std::pair;
+namespace biblio = lyx::biblio;
+
struct BufferParams::Impl
{
struct Language;
+namespace lyx {
namespace biblio {
enum CiteEngine {
};
} // namespace biblio
+} // namespace lyx
/** Buffer parameters.
};
AMS use_amsmath;
///
- biblio::CiteEngine cite_engine;
+ lyx::biblio::CiteEngine cite_engine;
///
bool use_bibtopic;
/// revision tracking for this buffer ?
+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]:
using std::string;
+using lyx::frontend::Dialog;
// Note that static boost signals break some compilers, so this wrapper
#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
///
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);
using std::endl;
using std::string;
+using lyx::frontend::ControlCommandBuffer;
string current_layout;
class InsetBase;
class Intl;
class Menubar;
-class ControlCommandBuffer;
class BufferView;
class Dialogs;
class Timeout;
class FuncRequest;
+namespace lyx {
+namespace frontend {
+class ControlCommandBuffer;
+} // namespace frontend
+} // namespace lyx
+
/**
* LyXView - main LyX window
*
/// 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
#include "BCView.h"
#include "ButtonController.h"
+namespace lyx {
+namespace frontend {
CheckedWidget::~CheckedWidget()
{}
// return valid status after checking ALL widgets
return valid;
}
+
+} // namespace frontend
+} // namespace lyx
#include <list>
#include <string>
+namespace lyx {
+namespace frontend {
class ButtonController;
class ButtonPolicy;
Widgets read_only_;
};
+} // namespace frontend
+} // namespace lyx
#include "BCView.tmpl"
#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)
setWidgetEnabled(*iter, enable);
}
}
+
+} // namespace frontend
+} // namespace lyx
#include "ButtonController.h"
#include "BCView.h"
+namespace lyx {
+namespace frontend {
BCView & ButtonController::view() const
{
view().refresh();
return ro;
}
+
+} // namespace frontend
+} // namespace lyx
#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.
*
boost::scoped_ptr<BCView> view_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // BUTTONCONTROLLER_H
using std::endl;
using std::string;
+namespace lyx {
+namespace frontend {
+
namespace {
string const printState(ButtonPolicy::State const & state)
"NoRepeatedApplyPolicy");
}
}
+
+} // namespace frontend
+} // namespace lyx
#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
}
};
+} // namespace frontend
+} // namespace lyx
+
#endif
+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
#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)
{}
return ss.str();
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
#include <iosfwd>
+namespace lyx {
+namespace frontend {
+
/** \c ControlAboutlyx is a controller for the "About LyX" dialogs.
*/
class ControlAboutlyx : public Dialog::Controller {
//@}
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLABOUTLYX_H
#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")
{}
{
return kernel().buffer().params().use_bibtopic;
}
+
+} // namespace frontend
+} // namespace lyx
#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 {
/// 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
bool usingBibtopic() const;
};
+} // namespace frontend
+} // namespace lyx
#endif // CONTROLBIBTEX_H
using std::string;
using std::vector;
+namespace lyx {
+namespace frontend {
ControlBox::ControlBox(Dialog & parent)
: Dialog::Controller(parent)
gui_names.push_back(_("Total Height"));
gui_names.push_back(_("Width"));
}
+
+} // namespace frontend
+} // namespace lyx
class InsetBoxParams;
+namespace lyx {
+namespace frontend {
+
class ControlBox : public Dialog::Controller {
public:
///
void box_gui_tokens_special_length(std::vector<std::string> &,
std::vector<std::string> &);
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLBOX_H
using std::string;
using std::vector;
+namespace lyx {
+namespace frontend {
ControlBranch::ControlBranch(Dialog & parent)
: Dialog::Controller(parent)
{
return kernel().buffer().params().branchlist();
}
+
+} // namespace frontend
+} // namespace lyx
class BranchList;
class InsetBranchParams;
+namespace lyx {
+namespace frontend {
class ControlBranch : public Dialog::Controller {
public:
boost::scoped_ptr<InsetBranchParams> params_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLBRANCH_H
#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)
bool ControlChanges::find()
{
- return lyx::find::findNextChange(kernel().bufferview());
+ return find::findNextChange(kernel().bufferview());
}
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
#include "Dialog.h"
+namespace lyx {
+namespace frontend {
+
/**
* A controller for the merge changes dialog.
*/
void reject();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLCHANGES_H
using std::string;
+namespace lyx {
+namespace frontend {
ControlCharacter::ControlCharacter(Dialog & parent)
: Dialog::Controller(parent),
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();
}
-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);
{
toggleall_ = t;
}
+
+} // namespace frontend
+} // namespace lyx
class LColor_color;
+namespace lyx {
+namespace frontend {
class ControlCharacter : public Dialog::Controller {
public:
///
void setSize(LyXFont::FONT_SIZE);
///
- void setBar(frnt::FONT_STATE);
+ void setBar(FONT_STATE);
///
void setColor(LColor_color);
///
///
LyXFont::FONT_SIZE getSize() const;
///
- frnt::FONT_STATE getBar() const;
+ FONT_STATE getBar() const;
///
LColor_color getColor() const;
///
bool toggleall_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLCHARACTER_H
using std::vector;
using std::pair;
+namespace lyx {
+namespace frontend {
vector<biblio::CiteStyle> ControlCitation::citeStyles_;
return styles;
}
+
+} // namespace frontend
+} // namespace lyx
#include "ControlCommand.h"
#include "biblio.h"
+namespace lyx {
+namespace frontend {
+
/** A controller for Citation dialogs.
*/
class ControlCitation : public ControlCommand {
static std::vector<biblio::CiteStyle> citeStyles_;
};
+} // namespace frontend
+} // namespace lyx
#endif // CONTROLCITATION_H
using std::string;
+namespace lyx {
+namespace frontend {
ControlCommand::ControlCommand(Dialog & dialog, string const & lfun_name)
: Dialog::Controller(dialog),
params_);
kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
#include "insets/insetcommandparams.h"
+namespace lyx {
+namespace frontend {
class ControlCommand : public Dialog::Controller {
public:
std::string const lfun_name_;
};
+} // namespace frontend
+} // namespace lyx
#endif // CONTROLCOMMAND_H
#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 {
: lv_(lv), history_pos_(history_.end())
{
transform(lyxaction.func_begin(), lyxaction.func_end(),
- back_inserter(commands_), lyx::firster());
+ back_inserter(commands_), firster());
}
{
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()) {
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);
history_pos_ = history_.end();
lv_.getLyXFunc().dispatch(lyxaction.lookupFunc(str), true);
}
+
+} // namespace frontend
+} // namespace lyx
class LyXView;
+namespace lyx {
+namespace frontend {
+
/**
* ControlCommandBuffer
*
std::vector<std::string>::const_iterator history_pos_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLCOMMANDBUFFER_H
using std::ostringstream;
using std::string;
+namespace lyx {
+namespace frontend {
ControlDocument::ControlDocument(Dialog & parent)
: Dialog::Controller(parent)
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();
}
-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));
{
dispatch_bufferparams(kernel(), params(), LFUN_SAVE_AS_DEFAULT);
}
+
+} // namespace frontend
+} // namespace lyx
class BufferParams;
class LyXTextClass;
+namespace lyx {
+namespace frontend {
/** A controller for Document dialogs.
*/
///
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
using std::string;
+namespace lyx {
+namespace frontend {
ControlERT::ControlERT(Dialog & parent)
: Dialog::Controller(parent), status_(InsetERT::Collapsed)
string const lfun = InsetERTMailer::params2string(status_);
kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
#include "insets/insetert.h" // InsetERT::ERTStatus
+namespace lyx {
+namespace frontend {
class ControlERT : public Dialog::Controller {
public:
InsetCollapsable::CollapseStatus status_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::endl;
using std::string;
+namespace lyx {
+namespace frontend {
ControlErrorList::ControlErrorList(Dialog & d)
: Dialog::Controller(d)
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
kernel().bufferview()->putSelectionAt(pos, range, false);
#endif
}
+
+} // namespace frontend
+} // namespace lyx
#include "errorlist.h"
#include "Dialog.h"
-
+namespace lyx {
+namespace frontend {
/** A controller for the ErrorList dialog.
*/
-
-
class ControlErrorList : public Dialog::Controller {
public:
///
std::string name_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLERRORLIST_H
#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),
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();
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
} // namespace anon
-namespace lyx {
-namespace external {
vector<RotationDataType> const & all_origins()
{
class InsetExternalParams;
namespace lyx {
+
namespace external {
+
class Template;
class RotationDataType;
+
} // namespace external
-} // namespace lyx
+namespace frontend {
+
class ControlExternal : public Dialog::Controller {
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;
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
using std::string;
+namespace lyx {
+namespace frontend {
ControlFloat::ControlFloat(Dialog & parent)
: Dialog::Controller(parent)
string const lfun = InsetFloatMailer::params2string(params());
kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
}
+
+} // namespace frontend
+} // namespace lyx
class InsetFloatParams;
+namespace lyx {
+namespace frontend {
+
class ControlFloat : public Dialog::Controller {
public:
///
boost::scoped_ptr<InsetFloatParams> params_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
#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)
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();
kernel().dispatch(FuncRequest(LFUN_GRAPHICS_EDIT, lfun));
}
-namespace frnt {
namespace {
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]);
}
return data;
}
-} // namespace frnt
+} // namespace frontend
+} // namespace lyx
class InsetGraphicsParams;
class LyXView;
+namespace lyx {
+namespace frontend {
+
/** A controller for Graphics dialogs.
*/
-
class ControlGraphics : public Dialog::Controller {
public:
///
boost::scoped_ptr<InsetGraphicsParams> params_;
};
-namespace frnt {
/// get the units for the bounding box
std::vector<std::string> const getBBUnits();
///
std::vector<RotationOriginPair> getRotationOriginData();
-} // namespace frnt
+} // namespace frontend
+} // namespace lyx
#endif // CONTROLGRAPHICS_H
#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)
return false;
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
#include "insets/insetcommandparams.h"
+namespace lyx {
+namespace frontend {
/** A controller for the Include file dialog.
*/
InsetCommandParams params_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLINCLUDE_H
using std::ostream;
using std::string;
+namespace lyx {
+namespace frontend {
ControlLog::ControlLog(Dialog & parent)
: Dialog::Controller(parent),
break;
}
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
+namespace lyx {
+namespace frontend {
+
/**
* A controller for a read-only text browser.
*/
std::string logfile_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLLOG_H
#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)
{
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));
return LibFileSearch("images/math/", xpm_name, "xpm");
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
#include "lfuns.h" // for kb_action
+namespace lyx {
+namespace frontend {
class ControlMath : public Dialog::Controller {
public:
*/
std::string const find_xpm(std::string const & name);
+} // namespace frontend
+} // namespace lyx
+
#endif // NOT CONTROLMATH
using std::string;
+namespace lyx {
+namespace frontend {
ControlNote::ControlNote(Dialog & parent)
: Dialog::Controller(parent)
string const lfun = InsetNoteMailer::params2string(params());
kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
}
+
+} // namespace frontend
+} // namespace lyx
class InsetNoteParams;
+namespace lyx {
+namespace frontend {
+
class ControlNote : public Dialog::Controller {
public:
///
boost::scoped_ptr<InsetNoteParams> params_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLNOTE_H
using std::ostringstream;
using std::string;
+namespace lyx {
+namespace frontend {
ControlParagraph::ControlParagraph(Dialog & parent)
: Dialog::Controller(parent), ininset_(false)
{
return aligndefault_;
}
+
+} // namespace frontend
+} // namespace lyx
class ParagraphParameters;
+namespace lyx {
+namespace frontend {
+
class ControlParagraph : public Dialog::Controller {
public:
///
LyXAlignment aligndefault_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLPARAGRAPH_H
using std::string;
+namespace lyx {
+namespace frontend {
ControlPreamble::ControlPreamble(Dialog & parent)
: Dialog::Controller(parent)
{
params_ = newparams;
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
+namespace lyx {
+namespace frontend {
+
/** A controller for Preamble dialogs.
*/
class ControlPreamble : public Dialog::Controller {
std::string params_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLPREAMBLE_H
#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;
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),
{
return browseDir(path, title);
}
+
+} // namespace frontend
+} // namespace lyx
class LColor_color;
+namespace lyx {
+namespace frontend {
class ControlPrefs : public Dialog::Controller {
public:
bool update_screen_font_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLPREFS_H
#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)
string const data = target + " " + target_name + " " + command;
kernel().dispatch(FuncRequest(LFUN_PRINT, data));
}
+
+} // namespace frontend
+} // namespace lyx
class PrinterParams;
+namespace lyx {
+namespace frontend {
+
/** A controller for Print dialogs.
*/
class ControlPrint : public Dialog::Controller {
boost::scoped_ptr<PrinterParams> params_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLPRINT_H
#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")
{
return bufferlist.getFileNames()[num];
}
+
+} // namespace frontend
+} // namespace lyx
#include "ControlCommand.h"
#include <vector>
+namespace lyx {
+namespace frontend {
/** A controller for the Ref Dialog.
*/
virtual bool disconnectOnApply() const { return true; }
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLREF_H
using std::string;
+namespace lyx {
+namespace frontend {
ControlSearch::ControlSearch(Dialog & parent)
: Dialog::Controller(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));
}
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
#include "Dialog.h"
+namespace lyx {
+namespace frontend {
/** A controller for Search dialogs.
*/
bool forward, bool all);
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLSEARCH_H
#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)
{
command_ = trim(cmd);
}
+
+} // namespace frontend
+} // namespace lyx
class Format;
+namespace lyx {
+namespace frontend {
+
/** A controller for the Custom Export dialogs.
*/
class ControlSendto : public Dialog::Controller {
std::string command_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLSENDTO_H
#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)
{
return OnlyFilename(filename_);
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
+namespace lyx {
+namespace frontend {
+
/** A controller for the ShowFile dialog. */
class ControlShowFile : public Dialog::Controller {
std::string filename_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLSHOWFILE_H
#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),
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
speller_->accept(word_);
check();
}
+
+} // namespace frontend
+} // namespace lyx
#include "WordLangTuple.h"
#include <boost/scoped_ptr.hpp>
-
class SpellBase;
+namespace lyx {
+namespace frontend {
+
/** A controller for Spellchecker dialogs.
*/
class ControlSpellchecker : public Dialog::Controller {
boost::scoped_ptr<SpellBase> speller_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLSPELLCHECKER_H
using std::string;
+namespace lyx {
+namespace frontend {
ControlTabular::ControlTabular(Dialog & parent)
: Dialog::Controller(parent), active_cell_(-1)
else
set(LyXTabular::UNSET_LONGTABULAR);
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
#include "tabular.h"
+namespace lyx {
+namespace frontend {
class ControlTabular : public Dialog::Controller {
public:
boost::scoped_ptr<LyXTabular> params_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLTABULAR_H
using std::string;
+namespace lyx {
+namespace frontend {
ControlTabularCreate::ControlTabularCreate(Dialog & parent)
: Dialog::Controller(parent)
string data = tostr(params().first) + ' ' + tostr(params().second);
kernel().dispatch(FuncRequest(LFUN_TABULAR_INSERT, data));
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
#include <utility>
+namespace lyx {
+namespace frontend {
+
/** A controller for the TabularCreate Dialog.
*/
class ControlTabularCreate : public Dialog::Controller {
rowsCols params_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLTABULARCREATE_H
using std::string;
+namespace lyx {
+namespace frontend {
void getTexFileList(ControlTexinfo::texFileSuffix type,
std::vector<string> & list)
{
return getListOfOptions(filename, "cls");
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
#include "tex_helpers.h"
+namespace lyx {
+namespace frontend {
+
/** A controller for Texinfo dialogs. */
class ControlTexinfo : public Dialog::Controller {
void getTexFileList(ControlTexinfo::texFileSuffix type,
std::vector<std::string> & contents);
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLTEXINFO_H
using std::string;
+namespace lyx {
+namespace frontend {
ControlThesaurus::ControlThesaurus(Dialog & parent)
: Dialog::Controller(parent)
* 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));
}
meanings_ = thesaurus.lookup(str);
return meanings_;
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
#include "Thesaurus.h"
+namespace lyx {
+namespace frontend {
+
/** A controller for Thesaurus dialogs.
*/
class ControlThesaurus : public Dialog::Controller {
virtual void apply() {}
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLTHESAURUS_H
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());
}
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
#include "toc.h"
#include <vector>
+namespace lyx {
+namespace frontend {
+
/** A controller for TOC dialogs.
*/
class ControlToc : public ControlCommand {
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
using std::istringstream;
using std::string;
+namespace lyx {
+namespace frontend {
ControlVSpace::ControlVSpace(Dialog & parent)
: Dialog::Controller(parent)
{
return params_;
}
+
+} // namespace frontend
+} // namespace lyx
#include "Dialog.h"
#include "vspace.h"
+namespace lyx {
+namespace frontend {
class ControlVSpace : public Dialog::Controller {
public:
VSpace params_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CONTROLPARAGRAPH_H
using std::string;
+namespace lyx {
+namespace frontend {
ControlWrap::ControlWrap(Dialog & parent)
: Dialog::Controller(parent)
string const lfun = InsetWrapMailer::params2string(params());
kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
}
+
+} // namespace frontend
+} // namespace lyx
class InsetWrapParams;
+namespace lyx {
+namespace frontend {
+
class ControlWrap : public Dialog::Controller {
public:
///
boost::scoped_ptr<InsetWrapParams> params_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+namespace lyx {
+namespace frontend {
Dialog::Dialog(LyXView & lv, string const & name)
: is_closing_(false), kernel_(lv), name_(name),
void Dialog::View::partialUpdate(int)
{}
+
+} // namespace frontend
+} // namespace lyx
#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.
std::string title_;
};
+} // namespace frontend
+} // namespace lyx
#endif // DIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
Kernel::Kernel(LyXView & lyxview)
: lyxview_(lyxview)
BOOST_ASSERT(lyxview_.buffer());
return *lyxview_.buffer();
}
+
+} // namespace frontend
+} // namespace lyx
#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-
LyXView & lyxview_;
};
+} // namespace frontend
+} // namespace lyx
#endif // KERNEL_H
#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 {
}
} // namespace biblio
+} // namespace lyx
class Buffer;
/** Functions of use to citation and bibtex GUI controllers and views */
+namespace lyx {
namespace biblio {
class CiteEngine_enum;
getAuthorYearStrings(std::string const & key,
InfoMap const & map,
std::vector<CiteStyle> const & styles);
+
} // namespace biblio
+} // namespace lyx
#endif // BIBLIOHELPERS_H
using std::vector;
-namespace frnt {
+namespace lyx {
+namespace frontend {
vector<FamilyPair> const getFamilyData()
{
return color;
}
-} // namespace frnt
+} // namespace frontend
+} // namespace lyx
/** Functions of use to the character GUI controller and view */
-namespace frnt {
+namespace lyx {
+namespace frontend {
///
enum FONT_STATE {
///
std::vector<ColorPair> const getColorData();
-} // namespace frnt
+} // namespace frontend
+} // namespace lyx
#endif // CHARACTERHELPERS
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)
{
return langs;
}
-} // namespace frnt
+} // namespace frontend
+} // namespace lyx
#include <utility>
#include <vector>
-namespace frnt {
+namespace lyx {
+namespace frontend {
///
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
#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,
}
-// 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;
return units;
}
+
+} // namespace frontend
+} // namespace lyx
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.
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()),
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()),
return tmp;
}
+} // namespace frontend
+} // namespace lyx
+
#endif // NOT HELPERFUNCS_H
#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
*it = regex.Merge((*it), "/");
}
- lyx::eliminate_duplicates(list);
+ eliminate_duplicates(list);
}
return classfile;
}
+
+} // namespace frontend
+} // namespace lyx
#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
/// 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
+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.
using std::string;
+using namespace lyx::frontend;
namespace {
using std::ostringstream;
using std::string;
+namespace lyx {
+namespace frontend {
namespace {
setCancel(btn);
//btn->signal_clicked().connect(SigC::slot(*this, &GViewBase::onCancel));
}
+
+} // namespace frontend
+} // namespace lyx
#include "GViewBase.h"
+namespace lyx {
+namespace frontend {
+
class ControlAboutlyx;
class GAboutlyx : public GViewCB<ControlAboutlyx, GViewGladeB>
virtual void doBuild();
};
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+namespace lyx {
+namespace frontend {
GBC::GBC(ButtonController const & parent,
string const & cancel, string const & close)
{
btn->set_label(Glib::locale_to_utf8(label));
}
+
+} // namespace frontend
+} // namespace lyx
#include "BCView.h"
#include "gettext.h"
+namespace lyx {
+namespace frontend {
+
class GBC : public GuiBC<Gtk::Button, Gtk::Widget>
{
public:
void setButtonLabel(Gtk::Button *, std::string const & label) const;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+namespace lyx {
+namespace frontend {
+
namespace
{
{
bc().valid();
}
+
+} // namespace frontend
+} // namespace lyx
#include "support/lstrings.h"
#include "GXpmBtnTbl.h"
+namespace lyx {
+namespace frontend {
+
class ControlMath;
class GMathDelim : public GViewCB<ControlMath, GViewGladeB>
int rightSel_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+namespace lyx {
+namespace frontend {
+
namespace {
char const * infoUp[][5] =
controller().dispatchInsert(
Glib::locale_from_utf8(sel));
}
+
+} // namespace frontend
+} // namespace lyx
#include "support/lstrings.h"
#include "GXpmBtnTbl.h"
+namespace lyx {
+namespace frontend {
+
class ControlMath;
class GMathPanel : public GViewCB<ControlMath, GViewGladeB>
GXpmBtnTbl tableDown_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+namespace lyx {
+namespace frontend {
+
namespace
{
{
view_->getLyXFunc().dispatch(item->func(), true);
}
+
+} // namespace frontend
+} // namespace lyx
class LyXView;
+namespace lyx {
+namespace frontend {
+
class GMenubar : public Menubar, public SigC::Object {
public:
GMenubar(LyXView *, MenuBackend const &);
std::vector<Glib::ustring> mainMenuNames_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+namespace lyx {
+namespace frontend {
GMiniBuffer::GMiniBuffer(GView * view, ControlCommandBuffer & control) :
controller_(control), view_(view)
entry_.set_text(input);
entry_.set_position(-1);
}
+
+} // namespace frontend
+} // namespace lyx
#include "frontends/Timeout.h"
+namespace lyx {
+namespace frontend {
+
class ControlCommandBuffer;
class GMiniBuffer : public SigC::Object
Glib::RefPtr<Gtk::TreeSelection> listSel_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
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)
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,
}
-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);
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);
len = mbstowcs(wcs.get(), s, ls + 1);
text(x, y, wcs.get(), len, f);
}
+
+} // namespace frontend
+} // namespace lyx
#include <map>
class LyXFont;
+
+namespace lyx {
+namespace frontend {
+
class GWorkArea;
/**
/// 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,
GWorkArea & owner_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // XPAINTER_H
#include "PrinterParams.h"
#include "support/lstrings.h"
+namespace lyx {
+namespace frontend {
GPrint::GPrint(Dialog & parent, string title)
: GViewCB<ControlPrint, GViewGladeB>(parent, title, false)
fromTo_->signal_toggled().connect(SigC::slot(*this, &GPrint::updateUI));
number_->signal_changed().connect(SigC::slot(*this, &GPrint::updateUI));
}
+
+} // namespace frontend
+} // namespace lyx
#include "GViewBase.h"
+namespace lyx {
+namespace frontend {
+
class ControlPrint;
class GPrint : public GViewCB<ControlPrint, GViewGladeB>
Gtk::Entry * toEntry_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
#include <algorithm>
+namespace lyx {
+namespace frontend {
GScreen::GScreen(GWorkArea & o)
: LyXScreen(), owner_(o)
y + owner_.ypos(),
w, h);
}
+
+} // namespace frontend
+} // namespace lyx
#include "screen.h"
+namespace lyx {
+namespace frontend {
+
class GWorkArea;
/** The class GScreen is used for the main Textbody.
int cursorH_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+namespace lyx {
+namespace frontend {
+
GTableCreate::GTableCreate(Dialog & parent)
: GViewCB<ControlTabularCreate, GViewGladeB>(parent, _("Insert Table"))
{
int columns = columns_->get_value_as_int();
controller().params() = std::make_pair(columns, rows);
}
+
+} // namespace frontend
+} // namespace lyx
#include "GViewBase.h"
+namespace lyx {
+namespace frontend {
+
class ControlTableCreate;
class GTableCreate : public GViewCB<ControlTabularCreate, GViewGladeB>
Gtk::SpinButton *columns_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+namespace lyx {
+namespace frontend {
GText::GText(Dialog & parent, string const & title, string const & label)
: GViewCB<ControlCommand, GViewGladeB>(parent, title),
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));
}
{
bc().valid(!entry_->get_text().empty());
}
+
+} // namespace frontend
+} // namespace lyx
#include "GViewBase.h"
+namespace lyx {
+namespace frontend {
+
class ControlCommand;
class GText : public GViewCB<ControlCommand, GViewGladeB>
Gtk::Entry * entry_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
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)
emit();
return false; // discontinue emitting timeouts.
}
+
+} // namespace frontend
+} // namespace lyx
#include <sigc++/sigc++.h>
+namespace lyx {
+namespace frontend {
+
/**
* This class executes the callback when the timeout expires
* using Gtk mechanisms
bool running_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+namespace lyx {
+namespace frontend {
namespace {
<< 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))
set_relief(Gtk::RELIEF_NONE);
}
}
+
+} // namespace frontend
+} // namespace lyx
#include <boost/scoped_ptr.hpp>
-class GView;
+namespace lyx {
+namespace frontend {
+class GView;
class GLayoutBox: public LayoutBox, public SigC::Object {
public:
boost::scoped_ptr<GLayoutBox> layout_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // NOT GTOOLBAR_H
using std::string;
+namespace lyx {
+namespace frontend {
+
GUrl::GUrl(Dialog & parent)
: GViewCB<ControlCommand, GViewGladeB>(parent, _("URL"))
{
else
controller().params().setCmdName("url");
}
+
+} // namespace frontend
+} // namespace lyx
#include "GViewBase.h"
+namespace lyx {
+namespace frontend {
+
class ControlCommand;
class GUrl : public GViewCB<ControlCommand, GViewGladeB>
Gtk::CheckButton * htmlType_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+namespace lyx {
+namespace frontend {
namespace {
// 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);
}
{
message(getLyXFunc().viewStatusMessage());
}
+
+} // namespace frontend
+} // namespace lyx
#include "bufferview_funcs.h"
#include <map>
+namespace lyx {
+namespace frontend {
+
class GMiniBuffer;
class GView : public LyXView, public Gtk::Window
Gtk::Widget * workArea_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+namespace lyx {
+namespace frontend {
GViewBase::GViewBase(Dialog & parent, string const & t, bool allowResize) :
Dialog::View(parent, t), allowResize_(allowResize)
{
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(
xml_->get_widget("dialog", win);
return win;
}
+
+} // namespace frontend
+} // namespace lyx
#include "ButtonPolicies.h"
#include "GBC.h"
+namespace lyx {
+namespace frontend {
+
class GViewBase : public Dialog::View, public SigC::Object
{
public:
return static_cast<Controller const &>(getController());
}
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+namespace lyx {
+namespace frontend {
ColorCache colorCache;
Gtk::Clipboard::get(GDK_SELECTION_PRIMARY);
clipboard->set_text(Glib::locale_to_utf8(str));
}
+
+} // namespace frontend
+} // namespace lyx
class LColor_color;
class LyXView;
+namespace lyx {
+namespace frontend {
+
class ColorCache
{
typedef std::map<LColor_color, Gdk::Color *> Map;
std::string inputCache_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
LyXScreen * create(WorkArea & owner)
{
+ using lyx::frontend::GScreen;
+ using lyx::frontend::GWorkArea;
+
return new GScreen(static_cast<GWorkArea &>(owner));
}
WorkArea * create(LyXView & owner, int w, int h)
{
- return new GWorkArea(owner, w, h);
+ return new lyx::frontend::GWorkArea(owner, w, h);
}
using std::string;
+namespace lyx {
+namespace frontend {
+
string const findGladeFile(string const & name)
{
// First, search in the installation directories.
return filename;
}
+
+} // namespace frontend
+} // namespace lyx
#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
using std::ostringstream;
using std::string;
+using lyx::frontend::colorCache;
+using lyx::frontend::GView;
+using lyx::frontend::XformsColor;
+
extern BufferList bufferlist;
+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.
using std::string;
+using namespace lyx::frontend;
namespace {
using std::ostringstream;
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlAboutlyx, QView<QAboutDialog> > base_class;
bcview().setCancel(dialog_->closePB);
bc().refresh();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMABOUT_H
#define FORMABOUT_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
class QAboutDialog;
class ControlAboutlyx;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMABOUT_H
#include <config.h>
-
#include "QAboutDialog.h"
+namespace lyx {
+namespace frontend {
QAboutDialog::QAboutDialog(QWidget * parent, const char * name,
bool modal, WFlags fl)
QAboutDialog::~QAboutDialog()
{}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QABOUTDIALOG_H
#define QABOUTDIALOG_H
-
#include "ui/QAboutDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QAboutDialog : public QAboutDialogBase {
Q_OBJECT
public:
~QAboutDialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QABOUTDIALOG_H
#include <config.h>
-
-
#include "debug.h"
#include "ControlCommand.h"
#include "qt_helpers.h"
#include "QBibitem.h"
#include "Qt2BC.h"
+namespace lyx {
+namespace frontend {
+
typedef QController<ControlCommand, QView<QBibitemDialog> > base_class;
{
return !dialog_->keyED->text().isEmpty();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QBIBITEM_H
#define QBIBITEM_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlCommand;
class QBibitemDialog;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QBIBITEM_H
#include "QBibitemDialog.h"
#include "QBibitem.h"
+namespace lyx {
+namespace frontend {
QBibitemDialog::QBibitemDialog(QBibitem * form)
: QBibitemDialogBase(0, 0, false, 0),
form_->slotWMHide();
e->accept();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QBIBITEMDIALOG_H
#define QBIBITEMDIALOG_H
-
#include "ui/QBibitemDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QBibitem;
class QBibitemDialog : public QBibitemDialogBase {
QBibitem * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QBIBITEMDIALOG_H
using std::vector;
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlBibtex, QView<QBibtexDialog> > base_class;
{
return dialog_->databaseLB->count() != 0;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QBIBTEX_H
#define QBIBTEX_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlBibtex;
class QBibtexDialog;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QBIBTEX_H
using std::string;
+namespace lyx {
+namespace frontend {
QBibtexDialog::QBibtexDialog(QBibtex * form)
: QBibtexDialogBase(0, 0, false, 0),
form_->slotWMHide();
e->accept();
}
+
+} // namespace frontend
+} // namespace lyx
#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
QBibtex * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QBIBTEXDIALOG_H
using lyx::support::subst;
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlBox, QView<QBoxDialog> > base_class;
dialog_->innerBoxCO->setCurrentItem(i);
}
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QBOX_H
#define QBOX_H
-
#include "QDialogView.h"
#include <vector>
+namespace lyx {
+namespace frontend {
class ControlBox;
class QBoxDialog;
std::vector<std::string> gui_names_spec_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QBOX_H
#include <config.h>
-
#include "QBox.h"
#include "QBoxDialog.h"
#include "qt_helpers.h"
#include <qpushbutton.h>
#include <qlineedit.h>
+namespace lyx {
+namespace frontend {
QBoxDialog::QBoxDialog(QBox * form)
: QBoxDialogBase(0, 0, false, 0),
heightUnitsLC->setCurrentItem(j);
}
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QBOXDIALOG_H
#define QBOXDIALOG_H
-
#include "ui/QBoxDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QBox;
class QBoxDialog : public QBoxDialogBase {
QBox * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QBOXDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlBranch, QView<QBranchDialog> > base_class;
string const type = fromqstr(dialog_->branchCO->currentText());
controller().params().branch = type;
}
+
+} // namespace frontend
+} // namespace lyx
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlBranch;
class QBranchDialog;
virtual void update_contents();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QBRANCH_H
#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),
{
form_->changed();
}
+
+} // namespace frontend
+} // namespace lyx
#include "ui/QBranchDialogBase.h"
+namespace lyx {
+namespace frontend {
class QBranch;
QBranch * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QBRANCHDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlChanges, QView<QChangesDialog> > base_class;
{
controller().reject();
}
+
+} // namespace frontend
+} // namespace lyx
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlChanges;
class QChangesDialog;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QCHANGES_H
#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),
form_->slotWMHide();
e->accept();
}
+
+} // namespace frontend
+} // namespace lyx
#include "ui/QChangesDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QChanges;
class QChangesDialog : public QChangesDialogBase {
QChanges * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QCHANGESDIALOG_H
#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;
ctrl.setToggleAll(dialog_->toggleallCB->isChecked());
}
+
+} // namespace frontend
+} // namespace lyx
#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;
/// 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
#include <qcombobox.h>
#include <qpushbutton.h>
+namespace lyx {
+namespace frontend {
QCharacterDialog::QCharacterDialog(QCharacter * form)
: QCharacterDialogBase(0, 0, false, 0),
form_->slotWMHide();
e->accept();
}
+
+} // namespace frontend
+} // namespace lyx
#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:
void change_adaptor();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QCHARACTERDIALOG_H
#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;
browser->insertItem(toqstr(key));
}
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QCITATION_H
#define QCITATION_H
-
#include "QDialogView.h"
#include <vector>
-
class QListBox;
+
+namespace lyx {
+namespace frontend {
+
class ControlCitation;
class QCitationDialog;
int style_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QCITATION_H
using std::vector;
using std::string;
+namespace lyx {
+namespace frontend {
QCitationDialog::QCitationDialog(QCitation * form)
: QCitationDialogBase(0, 0, false, 0),
add_->availableLB->setSelected(found, true);
add_->availableLB->ensureCurrentVisible();
}
+
+} // namespace frontend
+} // namespace lyx
#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
QCitation * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QCITATIOINDIALOG_H
using std::vector;
using std::string;
+namespace lyx {
+namespace frontend {
namespace {
}
#endif
+
+} // namespace frontend
+} // namespace lyx
#include <qwidget.h>
-class QtView;
-class QCommandEdit;
class QListBoxItem;
+
+namespace lyx {
+namespace frontend {
+
+class QCommandEdit;
+class QtView;
class ControlCommandBuffer;
class QCommandBuffer : public QWidget {
QCommandEdit * edit_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QCOMMANDBUFFER_H
#include "QCommandEdit.h"
+namespace lyx {
+namespace frontend {
+
QCommandEdit::QCommandEdit(QWidget * parent)
: QLineEdit(parent)
{
emit tabPressed();
return true;
}
+
+} // namespace frontend
+} // namespace lyx
#include <qlineedit.h>
+namespace lyx {
+namespace frontend {
+
class QCommandEdit : public QLineEdit {
Q_OBJECT
public:
virtual void keyPressEvent(QKeyEvent * e);
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QCOMMANDEDIT_H
using std::string;
+namespace lyx {
+namespace frontend {
+
namespace {
char const * delim[] = {
set_label(leftPI, left_);
}
}
+
+} // namespace frontend
+} // namespace lyx
#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:
QMathDelimiter * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QDELIMITERDIALOG_H
#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)
{
dialog().RestoreButton();
}
+
+} // namespace frontend
+} // namespace lyx
#include <qdialog.h>
#include <qobject.h>
+namespace lyx {
+namespace frontend {
+
class Qt2BC;
/** This class is an Qt2 GUI base class.
return static_cast<Controller const &>(this->getController());
}
+} // namespace frontend
+} // namespace lyx
#endif // QDIALOGVIEW_H
using std::vector;
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlDocument, QView<QDocumentDialog> > base_class;
QDocument::QDocument(Dialog & parent)
: base_class(parent, _("LyX: Document Settings")),
- lang_(getSecond(frnt::getLanguageData(false)))
+ lang_(getSecond(getLanguageData(false)))
{}
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));
params.useClassDefaults();
update_contents();
}
+
+} // namespace frontend
+} // namespace lyx
* 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> >
BranchList branchlist_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QDOCUMENT_H
using std::string;
+namespace lyx {
+namespace frontend {
QDocumentDialog::QDocumentDialog(QDocument * form)
: QDocumentDialogBase(0, 0, false, 0), form_(form)
}
}
}
+
+} // namespace frontend
+} // namespace lyx
#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
QDocument * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // DOCUMENTDIALOG_H
#include "QERT.h"
#include "Qt2BC.h"
+namespace lyx {
+namespace frontend {
+
typedef QController<ControlERT, QView<QERTDialog> > base_class;
rb->setChecked(true);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QERT_H
#define QERT_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlERT;
class QERTDialog;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QERT_H
#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),
{
form_->changed();
}
+
+} // namespace frontend
+} // namespace lyx
#include "ui/QERTDialogBase.h"
+namespace lyx {
+namespace frontend {
class QERT;
QERT * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QERTDIALOG_H
#include <qtextbrowser.h>
#include <qpushbutton.h>
+namespace lyx {
+namespace frontend {
+
typedef QController<ControlErrorList, QView<QErrorListDialog> > base_class;
QErrorList::QErrorList(Dialog & parent)
dialog_->errorsLB->setSelected(0, true);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QERRORLIST_H
#define QERRORLIST_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlErrorList;
class QErrorListDialog;
virtual void update_contents();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QERRORLIST_H
#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),
form_->slotWMHide();
e->accept();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QERRORLISTDIALOG_H
#define QERRORLISTDIALOG_H
-
#include "ui/QErrorListDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QErrorList;
class QErrorListDialog : public QErrorListDialogBase {
QErrorList * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QTOCERRORLIST_H
using std::vector;
using std::find;
+namespace lyx {
+namespace frontend {
namespace {
}
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);
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)));
controller().bbChanged(false);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QEXTERNAL_H
#define QEXTERNAL_H
-
#include "QDialogView.h"
#include <map>
+namespace lyx {
+namespace frontend {
class ControlExternal;
class QExternalDialog;
MapType extra_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QEXTERNAL_H
using lyx::support::strToDbl;
using std::string;
+namespace lyx {
+namespace frontend {
namespace {
heightUnitCO->setEnabled(useHeight);
form_->changed();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QEXTERNALDIALOG_H
#define QEXTERNALDIALOG_H
-
#include "ui/QExternalDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QExternal;
class QExternalDialog : public QExternalDialogBase {
QExternal * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QEXTERNALDIALOG_H
#include <qpushbutton.h>
+namespace lyx {
+namespace frontend {
+
typedef QController<ControlFloat, QView<QFloatDialog> > base_class;
params.placement = dialog_->floatFP->get(params.wide, params.sideways);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QFLOAT_H
#define QFLOAT_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlFloat;
class QFloatDialog;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QFLOAT_H
#include <config.h>
-
-
-
#include "floatplacement.h"
#include <qpushbutton.h>
#include "QFloatDialog.h"
#include "QFloat.h"
+namespace lyx {
+namespace frontend {
QFloatDialog::QFloatDialog(QFloat * form)
: QFloatDialogBase(0, 0, false, 0),
form_->slotWMHide();
e->accept();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QFLOATDIALOG_H
#define QFLOATDIALOG_H
-
#include "ui/QFloatDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QFloat;
class QFloatDialog : public QFloatDialogBase {
QFloat * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QFLOATDIALOG_H
using std::vector;
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlGraphics, QView<QGraphicsDialog> > base_class;
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();
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);
if (!igp.rotateOrigin.empty())
dialog_->origin->setCurrentItem(
- ::getItemNo(origin_ltx, igp.rotateOrigin));
+ getItemNo(origin_ltx, igp.rotateOrigin));
else
dialog_->origin->setCurrentItem(0);
{
controller().editGraphics();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QGRAPHICS_H
#define QGRAPHICS_H
-
#include "QDialogView.h"
#include <vector>
+namespace lyx {
+namespace frontend {
class ControlGraphics;
class QGraphicsDialog;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QGRAPHICS_H
#include <config.h>
-
#include "ControlGraphics.h"
#include "debug.h"
#include "qt_helpers.h"
using std::string;
+namespace lyx {
+namespace frontend {
QGraphicsDialog::QGraphicsDialog(QGraphics * form)
: QGraphicsDialogBase(0, 0, false, 0),
{
form_->controller().editGraphics();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QGRAPHICSDIALOG_H
#define QGRAPHICSDIALOG_H
-
#include "ui/QGraphicsDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QGraphics;
class QGraphicsDialog : public QGraphicsDialogBase {
QGraphics * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QGRAPHICSDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlInclude, QView<QIncludeDialog> > base_class;
{
return !dialog_->filenameED->text().isEmpty();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QINCLUDE_H
#define QINCLUDE_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlInclude;
class QIncludeDialog;
void browse();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QINCLUDE_H
#include <config.h>
-
-
#include <qpushbutton.h>
#include <qcheckbox.h>
#include <qlineedit.h>
#include "QIncludeDialog.h"
#include "QInclude.h"
-
+namespace lyx {
+namespace frontend {
QIncludeDialog::QIncludeDialog(QInclude * form)
: QIncludeDialogBase(0, 0, false, 0),
{
form_->browse();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QINCLUDEDIALOG_H
#define QINCLUDEDIALOG_H
-
#include "ui/QIncludeDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QInclude;
class QIncludeDialog : public QIncludeDialogBase {
QInclude * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QINCLUDEDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
+
typedef QController<ControlCommand, QView<QIndexDialog> > base_class;
{
return !dialog_->keywordED->text().isEmpty();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QINDEX_H
#define QINDEX_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlCommand;
class QIndexDialog;
QString const label_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QINDEX_H
#include <qlineedit.h>
#include <qwhatsthis.h>
+namespace lyx {
+namespace frontend {
QIndexDialog::QIndexDialog(QIndex * form)
: QIndexDialogBase(0, 0, false, 0),
form_->slotWMHide();
e->accept();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QINDEXDIALOG_H
#define QINDEXDIALOG_H
-
#include "ui/QIndexDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QIndex;
class QIndexDialog : public QIndexDialogBase {
QIndex * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QINDEXDIALOG_H
using std::pair;
using std::string;
+namespace lyx {
+namespace frontend {
QLMenubar::QLMenubar(LyXView * view, MenuBackend const & mbe)
: owner_(static_cast<QtView*>(view)), menubackend_(mbe)
{
return menubackend_;
}
+
+} // namespace frontend
+} // namespace lyx
* 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:
NameMap name_map_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QLMENUBAR_H
#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 {
owner_->backend().expand(frommenu, tomenu, owner_->view());
populate(&tomenu);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QLPOPUPMENU_H
#define QLPOPUPMENU_H
-
#include <qpopupmenu.h>
#include "funcrequest.h"
class MenuItem;
class Menu;
class QMenuData;
+
+namespace lyx {
+namespace frontend {
+
class QLMenubar;
class QLPopupMenu;
Funcs funcs_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QLPOPUPMENU_H
#include <config.h>
-
#include "qt_helpers.h"
#include "QPrint.h"
#include <qpushbutton.h>
#include <qradiobutton.h>
+namespace lyx {
+namespace frontend {
QLPrintDialog::QLPrintDialog(QPrint * f)
: QPrintDialogBase(0, 0, false, 0),
{
form_->changed();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QLPRINTDIALOG_H
#define QLPRINTDIALOG_H
-
#include "ui/QPrintDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QPrint;
class QLPrintDialog : public QPrintDialogBase {
QPrint * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QLPRINTDIALOG_H
using std::endl;
using std::string;
+namespace lyx {
+namespace frontend {
namespace {
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)),
else
lyxerr << "non existent tool button selected !" << endl;
}
+
+} // namespace frontend
+} // namespace lyx
#include <qobject.h>
-
class QComboBox;
class QToolBar;
class QToolButton;
-class QtView;
+namespace lyx {
+namespace frontend {
+
class QLayoutBox;
+class QtView;
class QLToolbar;
boost::scoped_ptr<QLayoutBox> layout_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // NOT QLTOOLBAR_H
#include <qtextview.h>
#include <qpushbutton.h>
+namespace lyx {
+namespace frontend {
typedef QController<ControlLog, QView<QLogDialog> > base_class;
dialog_->logTV->setText(toqstr(ss.str()));
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QLOG_H
#define QLOG_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlLog;
class QLogDialog;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QLOG_H
#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),
{
form_->update_contents();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QLOGDIALOG_H
#define QLOGDIALOG_H
-
#include "ui/QLogDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QLog;
class QLogDialog : public QLogDialogBase {
QLog * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QLOGDIALOG_H
#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;
{
dialog_.reset(new QDelimiterDialog(this));
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QMATH_H
#define QMATH_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlMath;
class QMathDialog;
class QMathMatrixDialog;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QMATH_H
using std::string;
+namespace lyx {
+namespace frontend {
class QScrollViewSingle : public QScrollView {
public:
}
form_->controller().dispatchInsert(str);
}
+
+} // namespace frontend
+} // namespace lyx
#include "ui/QMathDialogBase.h"
#include <string>
+class IconPalette;
+
+namespace lyx {
+namespace frontend {
class QMath;
-class IconPalette;
class QMathDialog : public QMathDialogBase
{
QMath * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QMATHDIALOG_H
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)
{
close();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QMATHMATRIXDIALOG_H
#define QMATHMATRIXDIALOG_H
-
#include "ui/QMathMatrixDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QMathMatrix;
class QMathMatrixDialog : public QMathMatrixDialogBase {
QMathMatrix * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QMATHMATRIXDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlNote, QView<QNoteDialog> > base_class;
controller().params().type = type;
}
+
+} // namespace frontend
+} // namespace lyx
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlNote;
class QNoteDialog;
virtual void update_contents();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QNOTE_H
#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),
{
form_->changed();
}
+
+} // namespace frontend
+} // namespace lyx
#include "ui/QNoteDialogBase.h"
+namespace lyx {
+namespace frontend {
class QNote;
QNote * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QNOTEDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlParagraph, QView<QParagraphDialog> > base_class;
dialog_->linespacingValue->setEnabled(false);
}
}
+
+} // namespace frontend
+} // namespace lyx
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlParagraph;
class QParagraphDialog;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QPARAGRAPH_H
#include "qt_helpers.h"
+namespace lyx {
+namespace frontend {
QParagraphDialog::QParagraphDialog(QParagraph * form)
: QParagraphDialogBase(0, 0, false, 0),
bool const enable = linespacing->currentItem() == 4;
linespacingValue->setEnabled(enable);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QPARAGRAPHDIALOG_H
#define QPARAGRAPHDIALOG_H
-
#include "ui/QParagraphDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QParagraph;
class QParagraphDialog : public QParagraphDialogBase {
void enableLinespacingValue(int);
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QPARAGRAPHDIALOG_H
using std::pair;
using std::vector;
+namespace lyx {
+namespace frontend {
typedef QController<ControlPrefs, QView<QPrefsDialog> > base_class;
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));
}
dialog_->updateConverters();
}
+
+} // namespace frontend
+} // namespace lyx
#include "QDialogView.h"
#include <vector>
+class Formats;
+
+namespace lyx {
+namespace frontend {
+
class QPrefsDialog;
class Controllers;
-class Formats;
class QPrefs
: public QController<ControlPrefs, QView<QPrefsDialog> >
std::vector<std::string> lang_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QPREFS_H
#include "ControlPrefs.h"
#include "QPrefs.h"
-
#include "QPrefsDialog.h"
#include "ui/QPrefAsciiModule.h"
using std::string;
+namespace lyx {
+namespace frontend {
QPrefsDialog::QPrefsDialog(QPrefs * form)
: QPrefsDialogBase(0, 0, false, 0), form_(form)
{
screenfontsModule->screenTypewriterFE->set(QFont(name), name);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QPREFSDIALOG_H
#define QPREFSDIALOG_H
-
#include "ui/QPrefsDialogBase.h"
#include <vector>
class LColor_color;
-class QPrefs;
class QPrefAsciiModule;
class QPrefDateModule;
class QPrefKeyboardModule;
class QPrefUIModule;
class QPrefIdentityModule;
+namespace lyx {
+namespace frontend {
+
+class QPrefs;
+
class QPrefsDialog : public QPrefsDialogBase {
Q_OBJECT
public:
QPrefs * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // PREFSDIALOG_H
#include <qspinbox.h>
#include <qpushbutton.h>
+namespace lyx {
+namespace frontend {
typedef QController<ControlPrint, QView<QLPrintDialog> > base_class;
controller().params() = pp;
}
+
+} // namespace frontend
+} // namespace lyx
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlPrint;
class QLPrintDialog;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QPRINT_H
using std::vector;
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlRef, QView<QRefDialog> > base_class;
dialog_->gotoPB->setEnabled(!refs_.empty());
redoRefs();
}
+
+} // namespace frontend
+} // namespace lyx
#include <vector>
+namespace lyx {
+namespace frontend {
class ControlRef;
class QRefDialog;
std::vector<std::string> refs_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QREF_H
#include <config.h>
-
-
#include "QRef.h"
#include "QRefDialog.h"
#include <qcombobox.h>
#include <qlistbox.h>
+namespace lyx {
+namespace frontend {
QRefDialog::QRefDialog(QRef * form)
: QRefDialogBase(0, 0, false, 0),
form_->slotWMHide();
e->accept();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QREFDIALOG_H
#define QREFDIALOG_H
-
#include "ui/QRefDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QRef;
class QRefDialog : public QRefDialogBase {
QRef * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QREFDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlSearch, QView<QSearchDialog> > base_class;
controller().replace(findstr, replacestr, casesens, words,
!backwards, all);
}
+
+} // namespace frontend
+} // namespace lyx
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlSearch;
class QSearchDialog;
-
///
class QSearch
: public QController<ControlSearch, QView<QSearchDialog> >
bool casesens, bool words, bool backwards, bool all);
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QSEARCH_H
#include <config.h>
-
#include "ControlSearch.h"
#include "QSearchDialog.h"
#include "QSearch.h"
using std::string;
+namespace lyx {
+namespace frontend {
+
namespace {
void uniqueInsert(QComboBox * box, QString const & text)
uniqueInsert(findCO, findCO->currentText());
uniqueInsert(replaceCO, replaceCO->currentText());
}
+
+} // namespace frontend
+} // namespace lyx
#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:
QSearch * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QSEARCHDIALOG_H
using std::vector;
using std::string;
+namespace lyx {
+namespace frontend {
+
typedef QController<ControlSendto, QView<QSendtoDialog> > base_class;
else return dialog_->formatLB->count() != 0 &&
!dialog_->commandCO->currentText().isEmpty();
}
+
+} // namespace frontend
+} // namespace lyx
#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.
*/
std::vector<Format const *> all_formats_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QSENDTO_H
#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),
form_->slotWMHide();
e->accept();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QSENDTODIALOG_H
#define QSENDTODIALOG_H
-
#include "ui/QSendtoDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QSendto;
class QSendtoDialog : public QSendtoDialogBase {
QSendto * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QSENDTODIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
+
typedef QController<ControlShowFile, QView<QShowFileDialog> > base_class;
dialog_->text->setText(toqstr(contents));
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QSHOWFILE_H
#define QSHOWFILE_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlShowFile;
class QShowFileDialog;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QSHOWFILE_H
#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),
form_->slotWMHide();
e->accept();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QSHOWFILEDIALOG_H
#define QSHOWFILEDIALOG_H
-
#include "ui/QShowFileDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QShowFile;
class QShowFileDialog : public QShowFileDialogBase {
QShowFile * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QSHOWFILEDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
+
typedef QController<ControlSpellchecker, QView<QSpellcheckerDialog> > base_class;
}
}
+
+} // namespace frontend
+} // namespace lyx
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlSpellchecker;
class QSpellcheckerDialog;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QSPELLCHECKER_H
#include <config.h>
-
#include "QSpellcheckerDialog.h"
#include "QSpellchecker.h"
#include <qlistbox.h>
#include <qcombobox.h>
+namespace lyx {
+namespace frontend {
QSpellcheckerDialog::QSpellcheckerDialog(QSpellchecker * form)
: QSpellcheckerDialogBase(0, 0, false, 0),
form_->slotWMHide();
QSpellcheckerDialogBase::reject();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QSPELLCHECKERDIALOG_H
#define QSPELLCHECKERDIALOG_H
-
#include "ui/QSpellcheckerDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QSpellchecker;
class QSpellcheckerDialog : public QSpellcheckerDialogBase {
QSpellchecker * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QSPELLCHECKERDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlTabular, QView<QTabularDialog> > base_class;
controller().set(LyXTabular::SET_PWIDTH, width);
}
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QTABULAR_H
#define QTABULAR_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlTabular;
class QTabularDialog;
virtual void closeGUI();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QTABULAR_H
#include <qspinbox.h>
#include <qpushbutton.h>
+namespace lyx {
+namespace frontend {
+
typedef QController<ControlTabularCreate, QView<QTabularCreateDialog> > base_class;
controller().params().first = dialog_->rowsSB->value();
controller().params().second = dialog_->columnsSB->value();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QTABULARCREATE_H
#define QTABULARCREATE_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlTabularCreate;
class QTabularCreateDialog;
-
///
class QTabularCreate
: public QController<ControlTabularCreate, QView<QTabularCreateDialog> >
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QTABULARCREATE_H
#include <config.h>
-
-
-
#include "QTabularCreate.h"
#include "QTabularCreateDialog.h"
#include <qspinbox.h>
#include "emptytable.h"
+namespace lyx {
+namespace frontend {
QTabularCreateDialog::QTabularCreateDialog(QTabularCreate * form)
: QTabularCreateDialogBase(0, 0, false, 0),
{
form_->changed();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QTABULARCREATEDIALOG_H
#define QTABULARCREATEDIALOG_H
-
#include "ui/QTabularCreateDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QTabularCreate;
class QTabularCreateDialog : public QTabularCreateDialogBase {
QTabularCreate * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QTABULARCREATEDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
+
QTabularDialog::QTabularDialog(QTabular * form)
: QTabularDialogBase(0, 0, false, 0),
lastfooterBorderBelowCB->setEnabled(!enable);
form_->changed();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QTABULARDIALOG_H
#define QTABULARDIALOG_H
-
#include "ui/QTabularDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QTabular;
class QTabularDialog : public QTabularDialogBase {
QTabular * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QTABULARDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlTexinfo, QView<QTexinfoDialog> > base_class;
{
updateStyles(activeStyle);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QTEXINFO_H
#define QTEXINFO_H
-
#include "QDialogView.h"
#include "ControlTexinfo.h"
#include <map>
#include <vector>
+namespace lyx {
+namespace frontend {
+
class QTexinfoDialog;
///
std::map<ControlTexinfo::texFileSuffix, ContentsType> texdata_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QTEXINFO_H
#include <config.h>
-
-
#include "QTexinfoDialog.h"
#include "QTexinfo.h"
using std::vector;
using std::string;
+namespace lyx {
+namespace frontend {
+
QTexinfoDialog::QTexinfoDialog(QTexinfo * form)
: QTexinfoDialogBase(0, 0, false, 0),
{
viewPB->setEnabled(fileList->currentItem() > -1);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QTEXINFODIALOG_H
#define QTEXINFODIALOG_H
-
#include "ui/QTexinfoDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QTexinfo;
class QTexinfoDialog : public QTexinfoDialogBase {
QTexinfo * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QTEXINFODIALOG_H
#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"))
{
controller().replace(fromqstr(dialog_->replaceED->text()));
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QTHESAURUS_H
#define QTHESAURUS_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlThesaurus;
class QThesaurusDialog;
void replace();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QTHESAURUS_H
#include <config.h>
-
-
#include "ControlThesaurus.h"
#include "QThesaurusDialog.h"
#include "QThesaurus.h"
using std::string;
+namespace lyx {
+namespace frontend {
QThesaurusDialog::QThesaurusDialog(QThesaurus * form)
meaningsLV->setUpdatesEnabled(true);
meaningsLV->update();
}
+
+} // namespace frontend
+} // namespace lyx
#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:
QThesaurus * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QTHESAURUSDIALOG_H
using std::vector;
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlToc, QView<QTocDialog> > base_class;
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) {
{
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) {
// 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
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)
if (depth != depth_)
updateToc(depth);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QTOC_H
#define QTOC_H
-
#include "QDialogView.h"
#include "toc.h"
+namespace lyx {
+namespace frontend {
+
class ControlToc;
class QTocDialog;
int depth_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QTOC_H
#include <qlistview.h>
#include <qpushbutton.h>
+namespace lyx {
+namespace frontend {
QTocDialog::QTocDialog(QToc * form)
: QTocDialogBase(0, 0, false, 0),
form_->slotWMHide();
e->accept();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QTOCDIALOG_H
#define QTOCDIALOG_H
-
#include "ui/QTocDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QToc;
class QTocDialog : public QTocDialogBase {
QToc * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QTOCDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
+
typedef QController<ControlCommand, QView<QURLDialog> > base_class;
QURL::QURL(Dialog & parent)
return !u.empty() || !n.empty();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QURL_H
#define QURL_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlCommand;
class QURLDialog;
-
class QURL :
public QController<ControlCommand, QView<QURLDialog> >
{
virtual void update_contents();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QURL_H
#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),
form_->slotWMHide();
e->accept();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QURLDIALOG_H
#define QURLDIALOG_H
-
#include "ui/QURLDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QURL;
class QURLDialog : public QURLDialogBase {
QURL * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QURLDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
namespace {
dialog_->unitCO,
dialog_->keepCB);
}
+
+} // namespace frontend
+} // namespace lyx
#include <vector>
+namespace lyx {
+namespace frontend {
+
class ControlVSpace;
class QVSpaceDialog;
virtual void update_contents();
};
+} // namespace frontend
+} // namespace lyx
+
#endif //QVSPACE_H
#include "qt_helpers.h"
+namespace lyx {
+namespace frontend {
QVSpaceDialog::QVSpaceDialog(QVSpace * form)
: QVSpaceDialogBase(0, 0, false, 0),
valueLE->setEnabled(enable);
unitCO->setEnabled(enable);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QVSPACEDIALOG_H
#define QVSPACEDIALOG_H
-
#include "ui/QVSpaceDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QVSpace;
class QVSpaceDialog : public QVSpaceDialogBase {
QVSpace * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QVSPACEDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
typedef QController<ControlWrap, QView<QWrapDialog> > base_class;
dialog_->valignCO->setCurrentItem(item);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QWRAP_H
#define QWRAP_H
-
#include "QDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlWrap;
class QWrapDialog;
virtual void build_dialog();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QWRAP_H
#include <config.h>
-
-
#include "QWrap.h"
#include "QWrapDialog.h"
#include <qpushbutton.h>
+namespace lyx {
+namespace frontend {
QWrapDialog::QWrapDialog(QWrap * form)
{
form_->changed();
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef QWRAPDIALOG_H
#define QWRAPDIALOG_H
-
#include "ui/QWrapDialogBase.h"
+namespace lyx {
+namespace frontend {
+
class QWrap;
class QWrapDialog : public QWrapDialogBase {
QWrap * form_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QWRAPDIALOG_H
using std::string;
+namespace lyx {
+namespace frontend {
Qt2BC::Qt2BC(ButtonController const & parent,
string const & cancel, string const & close)
{
obj->setText(toqstr(label));
}
+
+} // namespace frontend
+} // namespace lyx
#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
void setButtonLabel(QButton *, std::string const & label) const;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QT2BC_H
#include <qpixmap.h>
#include <qstatusbar.h>
-using lyx::support::LibFileSearch;
-
using std::string;
+qfont_loader fontloader;
+
+namespace lyx {
+
+using support::LibFileSearch;
+
+namespace frontend {
namespace {
} // namespace anon
-qfont_loader fontloader;
QtView::QtView(unsigned int width, unsigned int height)
else
QApplication::restoreOverrideCursor();
}
+
+} // namespace frontend
+} // namespace lyx
#include <qmainwindow.h>
#include <qtimer.h>
-class QCommandBuffer;
class FuncRequest;
+namespace lyx {
+namespace frontend {
+
+class QCommandBuffer;
+
/**
* QtView - Qt implementation of LyXView
*
QCommandBuffer * commandbuffer_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // QTVIEW_H
#include <qlineedit.h>
#include <qvalidator.h>
+namespace lyx {
+namespace frontend {
void addCheckedLineEdit(BCView & bcview,
QLineEdit * input, QLabel * label)
return valid;
}
+
+} // namespace frontend
+} // namespace lyx
#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);
QLabel * label_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CHECKEDWIDGETS_H
using lyx::support::ltrim;
+using lyx::frontend::QtView;
+
namespace os = lyx::support::os;
#ifndef CXX_GLOBAL_CSTD
#include "lyx_forms.h"
+using lyx::frontend::formatted;
+using lyx::frontend::idex;
+using lyx::frontend::parse_shortcut;
using std::make_pair;
using std::pair;
+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.
#include <cmath>
#include <iomanip>
-
#ifndef CXX_GLOBAL_CSTD
using std::floor;
#endif
using std::ostringstream;
using std::string;
+namespace lyx {
+namespace frontend {
namespace {
h += 360;
}
}
+
+} // namespace frontend
+} // namespace lyx
#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.
return !(c1 == c2);
}
+} // namespace frontend
+} // namespace lyx
+
#endif
#include <cmath>
-using lyx::support::bformat;
-
#ifndef CXX_GLOBAL_CSTD
using std::pow;
#endif
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)
{
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;
}
//
boost::scoped_ptr<LyXColorHandler> lyxColorHandler;
+
+} // namespace frontend
+} // namespace lyx
#ifndef COLOR_HANDLER_H
#define COLOR_HANDLER_H
-
#include "frontends/Painter.h"
#include <map>
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.
///
extern boost::scoped_ptr<LyXColorHandler> lyxColorHandler;
+} // namespace frontend
+} // namespace lyx
+
#endif
using std::string;
+using namespace lyx::frontend;
namespace {
#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)
scalable = false;
scaleindex = -1;
}
+
+} // namespace frontend
+} // namespace lyx
#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-
std::string const resize(std::string const &, int size) const;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FONTINFO_H
using std::ostringstream;
+namespace lyx {
+namespace frontend {
namespace {
// Manage the cancel/close button
bcview().setCancel(dialog_->button_close);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMABOUTLYX_H
#define FORMABOUTLYX_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlAboutlyx;
struct FD_aboutlyx;
boost::scoped_ptr<FD_aboutlyx_license> license_;
};
+} // namespace frontend
+} // namespace lyx
#endif // FORMABOUTLYX_H
#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)
controller().params().setContents(fl_get_input(dialog_->input_key));
controller().params().setOptions(fl_get_input(dialog_->input_label));
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMBIBITEM_H
#define FORMBIBITEM_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlCommand;
struct FD_bibitem;
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMBIBITEM_H
#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;
it != dbase.end(); ++it) {
*it = ChangeExtension(*it, string());
}
- lyx::eliminate_duplicates(dbase);
+ eliminate_duplicates(dbase);
return getStringFromVector(dbase);
}
else
controller().params().setSecOptions("");
+
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMBIBTEX_H
#define FORMBIBTEX_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlBibtex;
struct FD_bibtex;
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMBIBTEX_H
#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;
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMBOX_H
#define FORMBOX_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlBox;
struct FD_box;
};
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMBOX_H
using std::string;
+namespace lyx {
+namespace frontend {
+
typedef FormController<ControlBranch, FormView<FD_branch> > base_class;
string const type = fl_get_choice_text(dialog_->choice_branch);
controller().params().branch = type;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMBRANCH_H
#define FORMBRANCH_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlBranch;
struct FD_branch;
virtual void update();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMBRANCH_H
#include "forms/form_browser.h"
#include "xformsBC.h"
-
using std::string;
+namespace lyx {
+namespace frontend {
FormBrowser::FormBrowser(Dialog & parent,
string const & title, bool allowResize)
// Manage the close button
bcview().setCancel(dialog_->button_close);
}
+
+} // namespace frontend
+} // namespace lyx
#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:
virtual void build();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMBROWSER_H
#include "lyx_forms.h"
-
using std::string;
+namespace lyx {
+namespace frontend {
+
+
typedef FormController<ControlChanges, FormView<FD_changes> > base_class;
FormChanges::FormChanges(Dialog & parent)
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlChanges;
struct FD_changes;
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMCHANGES_H
#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;
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);
return activate;
}
+
+} // namespace frontend
+} // namespace lyx
#include "ControlCharacter.h" // for ControlCharacter enum
struct LColor_color;
+
+namespace lyx {
+namespace frontend {
+
struct FD_character;
/**
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
#include "lyx_forms.h"
-using lyx::support::getStringFromVector;
-using lyx::support::getVectorFromString;
-using lyx::support::trim;
-
using std::find;
using std::max;
using std::string;
+namespace lyx {
+
+using support::getStringFromVector;
+using support::getVectorFromString;
+using support::trim;
+
+namespace frontend {
+
namespace {
// shamelessly stolen from Menubar_pimpl.C
setEnabled(dialog_->button_up, activate_up);
setEnabled(dialog_->button_down, activate_down);
}
+
+} // namespace frontend
+} // namespace lyx
#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:
std::vector<std::string> bibkeys;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMCITATION_H
#include "lyx_forms.h"
-
using std::string;
+namespace lyx {
+namespace frontend {
namespace {
// 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;
}
} // extern "C"
+
+} // namespace frontend
+} // namespace lyx
#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();
boost::scoped_ptr<FD_colorpicker_hsv> hsv_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMCOLORPICKER_H
#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" {
}
} // extern "C"
+
+} // namespace frontend
+} // namespace lyx
#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.
*/
return static_cast<Controller const &>(this->getController());
}
+} // namespace frontend
+} // namespace lyx
#endif // FORMDIALOGVIEW_H
#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 {
"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());
{
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;
options_update(params);
bullets_update(params);
}
+
+} // namespace frontend
+} // namespace lyx
#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;
BranchList branchlist_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
#include "lyx_forms.h"
+namespace lyx {
+namespace frontend {
typedef FormController<ControlERT, FormView<FD_ert> > base_class;
break;
}
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMERT_H
#define FORMERT_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlERT;
struct FD_ert;
virtual void update();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMERT_H
#include "xforms_helpers.h"
#include "lyx_forms.h"
+namespace lyx {
+namespace frontend {
typedef FormController<ControlErrorList, FormView<FD_errorlist> > base_class;
fl_select_browser_line(dialog_->browser_errors, 1);
goTo(0);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMERRORLIST_H
#define FORMERRORLIST_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlErrorList;
struct FD_errorlist;
void updateContents();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMERRORLIST_H
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 {
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);
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());
void FormExternal::updateComboChange()
{
- namespace external = lyx::external;
-
int const choice = fl_get_choice(file_->choice_template) - 1;
external::Template templ = controller().getTemplate(choice);
setEnabled(scale_->input_height, useHeight);
setEnabled(scale_->choice_height, useHeight);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMEXTERNAL_H
#define FORMEXTERNAL_H
-
#include "FormDialogView.h"
#include <map>
+namespace lyx {
+namespace frontend {
+
class ControlExternal;
struct FD_external;
struct FD_external_file;
boost::scoped_ptr<FD_external_options> options_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMEXTERNAL_H
using std::map;
using std::vector;
+using namespace lyx::frontend;
namespace {
}
};
-
} // namespace anon
class Dialogs;
+
+namespace lyx {
+
+namespace support {
+
+class FileFilterList;
+
+} // namespace support
+
+
+namespace frontend {
+
/// DirEntry internal structure definition
class DirEntry {
public:
class FD_filedialog;
-namespace lyx {
-namespace support {
-
-class FileFilterList;
-
-} // namespace support
+} // namespace frontend
} // namespace lyx
private:
/// data
- static FD_filedialog * file_dlg_form_;
+ static lyx::frontend::FD_filedialog * file_dlg_form_;
///
static FileDialog::Private * current_dlg_;
///
///
std::string info_line_;
///
- typedef std::vector<DirEntry> DirEntries;
+ typedef std::vector<lyx::frontend::DirEntry> DirEntries;
///
DirEntries dir_entries_;
///
#include "lyx_forms.h"
-using lyx::support::contains;
-
using std::string;
+namespace lyx {
+
+using support::contains;
+
+namespace frontend {
namespace {
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#include "FormDialogView.h"
#include "RadioButtonGroup.h"
+namespace lyx {
+namespace frontend {
+
class ControlFloat;
struct FD_float;
RadioButtonGroup placement_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMFLOAT_H
#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
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 {
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
fl_set_input_filter(extra_->input_rotate_angle, fl_float_filter);
- using namespace frnt;
vector<RotationOriginPair> origindata = getRotationOriginData();
// Store the identifiers for later
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
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);
}
return activate;
}
+
+} // namespace frontend
+} // namespace lyx
#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;
std::vector<std::string> origins_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMGRAPHICS_H
#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;
return action;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMINCLUDE_H
#define FORMINCLUDE_H
-
#include "FormDialogView.h"
#include "RadioButtonGroup.h"
+namespace lyx {
+namespace frontend {
class ControlInclude;
struct FD_include;
RadioButtonGroup type_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMINCLUDE_H
#include "lyx_forms.h"
+namespace lyx {
+namespace frontend {
FormLog::FormLog(Dialog & parent)
: FormController<ControlLog, FormBrowser>(parent, "")
fl_clear_browser(dialog_->browser);
fl_add_browser_line(dialog_->browser, ss.str().c_str());
}
+
+} // namespace frontend
+} // namespace lyx
#include "FormBrowser.h"
+namespace lyx {
+namespace frontend {
+
class ControlLog;
/**
virtual void update();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMLOG_H
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);
apply();
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#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,
int h_;
};
+} // namespace frontend
+} // namespace lyx
#endif // FORM_MATHSBITMAP_H
#include "delim0.xpm"
#include "delim1.xpm"
+namespace lyx {
+namespace frontend {
namespace {
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORM_MATHSDELIM_H
#define FORM_MATHSDELIM_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlMath;
struct FD_maths_delim;
virtual void update();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORM_MATHSDELIM_H
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;
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;
return FL_INVALID;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORM_MATHSMATRIX_H
#define FORM_MATHSMATRIX_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlMath;
struct FD_maths_matrix;
virtual void update();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORM_MATHSMATRIX_H
#include "sub.xpm"
#include "super.xpm"
+namespace lyx {
+namespace frontend {
typedef FormController<ControlMath, FormView<FD_maths_panel> > base_class;
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORM_MATHSPANEL_H
#define FORM_MATHSPANEL_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlMath;
struct FD_maths_panel;
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORM_MATHSPANEL_H
#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)
}
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORM_MATHSSPACE_H
#define FORM_MATHSSPACE_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlMath;
struct FD_maths_space;
int space_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORM_MATHSSPACE_H
#include "style.xbm"
#include "font.xbm"
+namespace lyx {
+namespace frontend {
+
+namespace {
char const * latex_mathstyle[] = {
"displaystyle", "textstyle", "scriptstyle", "scriptscriptstyle"
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;
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORM_MATHSSTYLE_H
#define FORM_MATHSSTYLE_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlMath;
struct FD_maths_style;
int style_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORM_MATHSSTYLE_H
#include "lyx_forms.h"
-
using std::string;
+namespace lyx {
+namespace frontend {
typedef FormController<ControlNote, FormView<FD_note> > base_class;
controller().params().type = type;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMNOTE_H
#define FORMNOTE_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
class ControlNote;
struct FD_note;
virtual void update();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMNOTE_H
#include <boost/bind.hpp>
-using lyx::support::contains;
-using lyx::support::getStringFromVector;
-using lyx::support::rtrim;
-
using boost::bind;
using std::remove_if;
using std::vector;
using std::string;
+namespace lyx {
+
+using support::contains;
+using support::getStringFromVector;
+using support::rtrim;
+
+namespace frontend {
namespace {
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#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.
*/
RadioButtonGroup alignment_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
#include "lyx_forms.h"
+namespace lyx {
+namespace frontend {
typedef FormController<ControlPreamble, FormView<FD_preamble> > base_class;
{
fl_set_input(dialog_->input_preamble, controller().params().c_str());
}
+
+} // namespace frontend
+} // namespace lyx
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlPreamble;
struct FD_preamble;
virtual void update();
};
+} // namespace frontend
+} // namespace lyx
#endif // FORMPREAMBLE_H
#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;
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 {
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());
}
(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;
}
#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
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:
// buttons.
input(0);
}
+
+} // namespace frontend
+} // namespace lyx
#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;
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.
SpellOptions spelloptions_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMPREFERENCES_H
#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;
return activate;
}
+
+} // namespace frontend
+} // namespace lyx
#include "FormDialogView.h"
#include "RadioButtonGroup.h"
+namespace lyx {
+namespace frontend {
+
class ControlPrint;
struct FD_print;
RadioButtonGroup all_pages_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMPRINT_H
#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;
fl_set_button_shortcut(dialog_->button_go, "#G", 1);
fl_show_object(dialog_->button_go);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMREF_H
#define FORMREF_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlRef;
struct FD_ref;
std::vector<std::string> refs_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMREF_H
#include "lyx_forms.h"
-
using std::string;
+namespace lyx {
+namespace frontend {
typedef FormController<ControlSearch, FormView<FD_search> > base_class;
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlSearch;
struct FD_search;
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMSEARCH_H
#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;
controller().setFormat(all_formats_[line-1]);
controller().setCommand(cmd);
}
+
+} // namespace frontend
+} // namespace lyx
#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
std::vector<Format const *> all_formats_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMSENDTO_H
#include "lyx_forms.h"
-
using std::string;
+namespace lyx {
+namespace frontend {
FormShowFile::FormShowFile(Dialog & parent)
: FormController<ControlShowFile, FormBrowser>(parent, _("Show File"))
else
fl_add_browser_line(dialog_->browser, contents.c_str());
}
+
+} // namespace frontend
+} // namespace lyx
#include "FormBrowser.h"
+namespace lyx {
+namespace frontend {
+
class ControlShowFile;
/**
virtual void update();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMSHOWFILE_H
#include "lyx_forms.h"
-
using std::string;
+namespace lyx {
+namespace frontend {
typedef FormController<ControlSpellchecker, FormView<FD_spellchecker> > base_class;
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlSpellchecker;
struct FD_spellchecker;
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMSPELLCHECKER_H
#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 {
return LyXTabular::LAST_ACTION;
}
+
+} // namespace frontend
+} // namespace lyx
#include <boost/scoped_ptr.hpp>
class InsetTabular;
+
+namespace lyx {
+namespace frontend {
+
class ControlTabular;
struct FD_tabular;
struct FD_tabular_options;
int actCell_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMTABULAR_H
using std::make_pair;
using std::string;
+namespace lyx {
+namespace frontend {
typedef FormController<ControlTabularCreate, FormView<FD_tabular_create> > base_class;
controller().params() = make_pair(xsize, ysize);
}
+
+} // namespace frontend
+} // namespace lyx
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlTabularCreate;
struct FD_tabular_create;
virtual void update() {};
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMTABULARCREATE
#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;
activeStyle = whichStyle;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMTEXINFO_H
#define FORMTEXINFO_H
-
#include "FormDialogView.h"
#include "ControlTexinfo.h"
#include <map>
+namespace lyx {
+namespace frontend {
+
struct FD_texinfo;
class FormTexinfo
std::map<ControlTexinfo::texFileSuffix, ContentsType> texdata_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMTEXINFO_H
#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;
{
controller().params().setContents(fl_get_input(dialog_->input_text));
}
+
+} // namespace frontend
+} // namespace lyx
#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:
///
std::string const label_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMTEXT_H
#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;
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;
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlThesaurus;
struct FD_thesaurus;
std::string str_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMTHESAURUS_H
#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;
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());
}
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) {
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());
fl_set_browser_topline(dialog_->browser_toc, topline);
fl_select_browser_line(dialog_->browser_toc, line);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMTOC_H
#define FORMTOC_H
-
#include "FormDialogView.h"
#include "toc.h"
+namespace lyx {
+namespace frontend {
+
class ControlToc;
struct FD_toc;
void updateContents();
///
- lyx::toc::Toc toc_;
+ toc::Toc toc_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMTOC_H
* Full author contact details are available in file CREDITS.
*/
-
#include <config.h>
#include "FormUrl.h"
#include "lyx_forms.h"
+namespace lyx {
+namespace frontend {
typedef FormController<ControlCommand, FormView<FD_url> > base_class;
else
controller().params().setCmdName("url");
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMURL_H
#define FORMURL_H
-
#include "FormDialogView.h"
+namespace lyx {
+namespace frontend {
+
class ControlCommand;
struct FD_url;
virtual void update();
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMURL_H
#include <boost/bind.hpp>
-using lyx::support::contains;
-using lyx::support::getStringFromVector;
-using lyx::support::rtrim;
-
using boost::bind;
using std::remove_if;
using std::vector;
using std::string;
+namespace lyx {
+
+using support::contains;
+using support::getStringFromVector;
+using support::rtrim;
+
+namespace frontend {
namespace {
}
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORM_VSPACE_H
#define FORM_VSPACE_H
-
#include "FormDialogView.h"
#include "RadioButtonGroup.h"
+namespace lyx {
+namespace frontend {
+
struct FD_vspace;
class ControlVSpace;
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
};
+} // namespace frontend
+} // namespace lyx
+
#endif
#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;
else
placement_.set(params.placement.c_str()[0]);
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef FORMWRAP_H
#define FORMWRAP_H
-
#include "FormDialogView.h"
#include "RadioButtonGroup.h"
+namespace lyx {
+namespace frontend {
+
class ControlWrap;
struct FD_wrap;
RadioButtonGroup placement_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // FORMWRAP_H
LyXKeySym * create()
{
- return new XLyXKeySym;
+ return new lyx::frontend::XLyXKeySym;
}
}
LyXScreen * create(WorkArea & owner)
{
+ using lyx::frontend::XScreen;
+ using lyx::frontend::XWorkArea;
+
return new XScreen(static_cast<XWorkArea &>(owner));
}
using std::endl;
+namespace lyx {
+namespace frontend {
void RadioButtonGroup::init(FL_OBJECT * ob, size_type value)
{
}
-RadioButtonGroup::size_type RadioButtonGroup::get() const
+size_type RadioButtonGroup::get() const
{
// Find the active button.
ButtonValueMap::const_iterator it =
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
#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
*/
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);
ButtonValueMap map;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // RADIOBUTTONGROUP_H
#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;
char const * const c_str = enabled_ ? str.c_str() : 0;
fl_set_object_helper(ob, c_str);
}
+
+} // namespace frontend
+} // namespace lyx
#include <map>
+namespace lyx {
+namespace frontend {
class Tooltips : boost::noncopyable, public boost::signals::trackable {
public:
TooltipsMap tooltipsMap;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // TOOLTIPS_H
WorkArea * create(LyXView & owner, int w, int h)
{
- return new XWorkArea(owner, w, h);
+ return new lyx::frontend::XWorkArea(owner, w, h);
}
}
#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;
menubackend_(&mb),
menubar_(0)
{
- using lyx::frontend::WidgetMap;
owner_->metricsUpdated.connect(boost::bind(&WidgetMap::updateMetrics,
&widgets_));
XFormsMenubar::ItemInfo::~ItemInfo()
{}
+
+} // namespace frontend
+} // namespace lyx
#include <vector>
-
class LyXView;
-class XFormsView;
class Menu;
class MenuItem;
class MenuBackend;
+namespace lyx {
+namespace frontend {
+
+class XFormsView;
+
class XFormsMenubar : public Menubar {
public:
///
///
MenuBackend const * menubackend_;
///
- lyx::frontend::Box * menubar_;
+ Box * menubar_;
///
- lyx::frontend::WidgetMap widgets_;
+ WidgetMap widgets_;
///
struct ItemInfo {
///
///
ButtonList buttonlist_;
};
+
+} // namespace frontend
+} // namespace lyx
+
#endif
#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
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),
toolbar_->children().push_back(Box(padding, padding));
- using lyx::frontend::WidgetMap;
owner_.metricsUpdated.connect(boost::bind(&WidgetMap::updateMetrics,
&widgets_));
void XLayoutBox::setEnabled(bool enable)
{
- ::setEnabled(combox_, enable);
+ lyx::frontend::setEnabled(combox_, enable);
}
}
lyxerr << "ERROR (XLayoutBox::selected): layout not found!" << endl;
}
+
+} // namespace frontend
+} // namespace lyx
#include <boost/scoped_ptr.hpp>
#include <vector>
+namespace lyx {
+namespace frontend {
+class Tooltips;
class XFormsToolbar;
class XFormsView;
-class Tooltips;
class XLayoutBox: public LayoutBox {
///
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;
boost::scoped_ptr<XLayoutBox> layout_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
#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
fl_activate_all_forms();
}
}
+
+} // namespace frontend
+} // namespace lyx
#include <map>
+namespace lyx {
+namespace frontend {
+
class XMiniBuffer;
/**
~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
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_;
///
Pixmap icon_mask_;
};
+
+} // namespace frontend
+} // namespace lyx
+
#endif
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)
{
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
#include <X11/Xlib.h>
#include "frontends/LyXKeySym.h"
+namespace lyx {
+namespace frontend {
+
/**
* This is the XForms (X11) version of LyXKeySym.
*/
unsigned int keysym_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // XLYXKEYSYM_H
#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 {
}
} // namespace anon
+
+} // namespace frontend
+} // namespace lyx
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 {
/// 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
#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)
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;
underline(f, x, y, xfont_metrics::width(s, ls, f));
}
}
+
+} // namespace frontend
+} // namespace lyx
#include <X11/Xlib.h>
-
class LyXFont;
+
+namespace lyx {
+namespace frontend {
+
class XWorkArea;
/**
/// 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,
XWorkArea & owner_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // XPAINTER_H
#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 {
fl_stuff_clipboard(work_area, 0, hold.data(), hold.size(), 0);
}
+
+} // namespace frontend
+} // namespace lyx
class LyXView;
-///
+namespace lyx {
+namespace frontend {
+
class XWorkArea : public WorkArea {
public:
///
/// 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
#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)
return valid;
}
+
+} // namespace frontend
+} // namespace lyx
#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);
FL_OBJECT * label_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // CHECKEDWIDGETS_H
#include "fdesign_base.h"
#include "lyx_forms.h"
+namespace lyx {
+namespace frontend {
+
FD_base::~FD_base()
{
if (!form)
fl_free_form(form);
}
+
+} // namespace frontend
+} // namespace lyx
#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
-#!/bin/sh
+b#!/bin/sh
#
# file fdfix.sh
# This file is part of LyX, the document processor.
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
/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
}
#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)
support::split(str, identifier, '|');
return identifier;
}
+
+} // namespace frontend
+} // namespace lyx
#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
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
#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;
getFontinfo(f.family(), f.series(), f.realShape());
return fontinfo[f.family()][f.series()][f.realShape()]->exist();
}
+
+} // namespace frontend
+} // namespace lyx
#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
///
extern xfont_loader fontloader;
+} // namespace frontend
+} // namespace lyx
+
#endif
#include <boost/scoped_array.hpp>
-using lyx::support::uppercase;
-
using std::string;
+using lyx::support::uppercase;
+using lyx::frontend::fontloader;
namespace {
#ifndef XFONT_METRICS_H
#define XFONT_METRICS_H
-
-
-
#include <X11/Xlib.h>
class LyXFont;
using std::string;
+namespace lyx {
+namespace frontend {
xformsBC::xformsBC(ButtonController const & parent,
string const & cancel, string const & close)
{
fl_set_object_label(obj, label.c_str());
}
+
+} // namespace frontend
+} // namespace lyx
#include "BCView.h"
#include "gettext.h"
+namespace lyx {
+namespace frontend {
+
class xformsBC : public GuiBC<FL_OBJECT, FL_OBJECT> {
public:
///
void setButtonLabel(FL_OBJECT *, std::string const & label) const;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // XFORMSBC_H
#include <boost/tuple/tuple.hpp>
+using lyx::frontend::getRGBColor;
using lyx::support::float_equal;
using lyx::support::prefixIs;
#ifndef XFORMSIMAGE_H
#define XFORMSIMAGE_H
-
#include "graphics/GraphicsImage.h"
#include <X11/X.h>
#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"
{
timeout_id = -1;
}
+
+} // namespace frontend
+} // namespace lyx
#include "frontends/Timeout.h"
+namespace lyx {
+namespace frontend {
/**
* This class executes the callback when the timeout expires
int timeout_id;
};
+} // namespace frontend
+} // namespace lyx
+
#endif // XFORMSTIMEOUT_H
#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()
{
return true;
}
+
+} // namespace frontend
+} // namespace lyx
#ifndef XFORMSHELPERS_H
#define XFORMSHELPERS_H
-
#include "forms_fwd.h"
#include "Color.h"
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);
///
static std::string error_message;
};
+
+} // namespace frontend
+} // namespace lyx
+
#endif // XFORMSHELPERS_H
#include <algorithm> // std::max. Use FL_max in .c code...
#include "lyx_forms.h"
+namespace lyx {
+namespace frontend {
namespace {
scale_tabfolder_horizontally(ob, factor);
}
}
+
+} // namespace frontend
+} // namespace lyx
#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.
*/
void scale_form_horizontally(FL_FORM * form, double factor);
+} // namespace frontend
+} // namespace lyx
+
#endif // XFORMS_RESIZE_H
using std::endl;
+namespace lyx {
+namespace frontend {
namespace {
XSendEvent(fl_get_display(), owner_.getWin(), False, 0, &ev);
}
+
+} // namespace frontend
+} // namespace lyx
#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
GC gc_copy;
};
+} // namespace frontend
+} // namespace lyx
+
#endif
+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
using std::vector;
using std::map;
+namespace biblio = lyx::biblio;
+
namespace {
struct Cache {
///
- Cache() : engine(biblio::ENGINE_BASIC) {}
+ Cache() : engine(lyx::biblio::ENGINE_BASIC) {}
///
- biblio::CiteEngine engine;
+ lyx::biblio::CiteEngine engine;
///
InsetCommandParams params;
///
using std::string;
using std::istringstream;
+namespace biblio = lyx::biblio;
+
extern BufferList bufferlist;
extern LyXServer * lyxserver;