owner_->setLayout(layoutname);
}
- if (grfx::Previews::activated() && buffer_)
- grfx::Previews::get().generateBufferPreviews(*buffer_);
+ if (lyx::graphics::Previews::activated() && buffer_)
+ lyx::graphics::Previews::get().generateBufferPreviews(*buffer_);
}
+2003-07-21 Angus Leeming <leeming@lyx.org>
+
+ * BufferView_pimpl.C (buffer):
+ * buffer.C (d-tor):
+ * lyx_main.C (LyX):
+ * lyxfunc.C (dispatch):
+ * lyxrc.C (setDefaults, read, output): use namespace lyx::graphics
+ rather than the grfx shortcut.
2003-07-21 André Pönitz <poenitz@gmx.net>
using lyx::pos_type;
using lyx::textclass_type;
-namespace grfx = lyx::graphics;
-
// all these externs should eventually be removed.
extern BufferList bufferlist;
paragraphs.clear();
// Remove any previewed LaTeX snippets assocoated with this buffer.
- grfx::Previews::get().removeLoader(this);
+ lyx::graphics::Previews::get().removeLoader(this);
}
+2003-07-21 Angus Leeming <leeming@lyx.org>
+
+ * screen.C (c-tor, greyOut): use namespace lyx::graphics
+ rather than the grfx shortcut.
2003-07-15 André Pönitz <poenitz@gmx.net>
+2003-07-21 Angus Leeming <leeming@lyx.org>
+
+ * ControlGraphics.C (readBB): use namespace lyx::graphics rather than grfx shortcut.
+
2003-07-18 Lars Gullik Bjønnes <larsbj@gullik.net>
* ControlGraphics.C (dispatchParams): avoid some variable/function
int width = 0;
int height = 0;
- grfx::Cache & gc = grfx::Cache::get();
+ lyx::graphics::Cache & gc = lyx::graphics::Cache::get();
if (gc.inCache(abs_file)) {
- grfx::Image const * image = gc.item(abs_file)->image();
+ lyx::graphics::Image const * image = gc.item(abs_file)->image();
if (image) {
width = image->getWidth();
+2003-07-21 Angus Leeming <leeming@lyx.org>
+
+ * lyx_gui.C (reset): use namespace lyx::graphics rather than grfx
+ shortcut.
+
2003-06-28 Lars Gullik Bjønnes <larsbj@gullik.net>
* FileDialog.C: fix const type order
lyxColorHandler.reset(new LyXColorHandler());
- using namespace grfx;
+ using namespace lyx::graphics;
// connect the image loader based on the xforms library
Image::newImage = boost::bind(&xformsImage::newImage);
+2003-07-21 Angus Leeming <leeming@lyx.org>
+
+ * QExternal.C (update_contents, apply):
+ * QGraphics.C (update_contents, apply):
+ * QLPainter.C (image):
+ * QPrefs.C (update_contents, apply): use namespace lyx::graphics rather
+ than grfx shortcut.
+
2003-07-21 Juergen Spitzmueller <j.spitzmueller@gmx.de>
* QBibTeXDialog.C:
using namespace lyx::support;
-namespace grfx = lyx::graphics;
typedef QController<ControlExternal, QView<QExternalDialog> > base_class;
int item = 0;
switch (params.display) {
- case grfx::DefaultDisplay: item = 0; break;
- case grfx::MonochromeDisplay: item = 1; break;
- case grfx::GrayscaleDisplay: item = 2; break;
- case grfx::ColorDisplay: item = 3; break;
- case grfx::NoDisplay: item = 0; break;
+ case lyx::graphics::DefaultDisplay: item = 0; break;
+ case lyx::graphics::MonochromeDisplay: item = 1; break;
+ case lyx::graphics::GrayscaleDisplay: item = 2; break;
+ case lyx::graphics::ColorDisplay: item = 3; break;
+ case lyx::graphics::NoDisplay: item = 0; break;
}
dialog_->showCB->setCurrentItem(item);
- dialog_->showCB->setEnabled(params.display != grfx::NoDisplay &&
+ dialog_->showCB->setEnabled(params.display != lyx::graphics::NoDisplay &&
!readOnly());
- dialog_->displayCB->setChecked(params.display != grfx::NoDisplay);
- dialog_->displayscale->setEnabled(params.display != grfx::NoDisplay &&
+ dialog_->displayCB->setChecked(params.display != lyx::graphics::NoDisplay);
+ dialog_->displayscale->setEnabled(params.display != lyx::graphics::NoDisplay &&
!readOnly());
dialog_->displayscale->setText(toqstr(tostr(params.lyxscale)));
controller().getTemplate(dialog_->externalCO->currentItem()).lyxName;
switch (dialog_->showCB->currentItem()) {
- case 0: params.display = grfx::DefaultDisplay; break;
- case 1: params.display = grfx::MonochromeDisplay; break;
- case 2: params.display = grfx::GrayscaleDisplay; break;
- case 3: params.display = grfx::ColorDisplay; break;
+ case 0: params.display = lyx::graphics::DefaultDisplay; break;
+ case 1: params.display = lyx::graphics::MonochromeDisplay; break;
+ case 2: params.display = lyx::graphics::GrayscaleDisplay; break;
+ case 3: params.display = lyx::graphics::ColorDisplay; break;
default:;
}
if (!dialog_->displayCB->isChecked())
- params.display = grfx::NoDisplay;
+ params.display = lyx::graphics::NoDisplay;
params.lyxscale = strToInt(fromqstr(dialog_->displayscale->text()));
int item = 0;
switch (igp.display) {
- case grfx::DefaultDisplay: item = 0; break;
- case grfx::MonochromeDisplay: item = 1; break;
- case grfx::GrayscaleDisplay: item = 2; break;
- case grfx::ColorDisplay: item = 3; break;
- case grfx::NoDisplay: item = 0; break;
+ case lyx::graphics::DefaultDisplay: item = 0; break;
+ case lyx::graphics::MonochromeDisplay: item = 1; break;
+ case lyx::graphics::GrayscaleDisplay: item = 2; break;
+ case lyx::graphics::ColorDisplay: item = 3; break;
+ case lyx::graphics::NoDisplay: item = 0; break;
}
dialog_->showCB->setCurrentItem(item);
- dialog_->showCB->setEnabled(igp.display != grfx::NoDisplay && !readOnly());
- dialog_->displayCB->setChecked(igp.display != grfx::NoDisplay);
- dialog_->displayscale->setEnabled(igp.display != grfx::NoDisplay && !readOnly());
+ dialog_->showCB->setEnabled(igp.display != lyx::graphics::NoDisplay && !readOnly());
+ dialog_->displayCB->setChecked(igp.display != lyx::graphics::NoDisplay);
+ dialog_->displayscale->setEnabled(igp.display != lyx::graphics::NoDisplay && !readOnly());
dialog_->displayscale->setText(toqstr(tostr(igp.lyxscale)));
//// the output section (width/height)
igp.subcaptionText = fromqstr(dialog_->subcaption->text());
switch (dialog_->showCB->currentItem()) {
- case 0: igp.display = grfx::DefaultDisplay; break;
- case 1: igp.display = grfx::MonochromeDisplay; break;
- case 2: igp.display = grfx::GrayscaleDisplay; break;
- case 3: igp.display = grfx::ColorDisplay; break;
+ case 0: igp.display = lyx::graphics::DefaultDisplay; break;
+ case 1: igp.display = lyx::graphics::MonochromeDisplay; break;
+ case 2: igp.display = lyx::graphics::GrayscaleDisplay; break;
+ case 3: igp.display = lyx::graphics::ColorDisplay; break;
default:;
}
if (!dialog_->displayCB->isChecked())
- igp.display = grfx::NoDisplay;
+ igp.display = lyx::graphics::NoDisplay;
string value(fromqstr(dialog_->width->text()));
if (dialog_->widthUnit->currentItem() > 0) {
using std::endl;
-namespace grfx = lyx::graphics;
QLPainter::QLPainter(QWorkArea & qwa)
: Painter(), owner_(qwa), paint_check_(0)
Painter & QLPainter::image(int x, int y,
int w, int h,
- grfx::Image const & i)
+ lyx::graphics::Image const & i)
{
- qp_->drawPixmap(x, y, static_cast<grfx::QLImage const &>(i).qpixmap(), 0, 0, w, h);
+ qp_->drawPixmap(x, y, static_cast<lyx::graphics::QLImage const &>(i).qpixmap(), 0, 0, w, h);
return *this;
}
using std::setw;
using std::endl;
-namespace grfx = lyx::graphics;
typedef Qt2CB<ControlPrefs, Qt2DB<QPrefsDialog> > base_class;
rc.preview = displaymod->previewCB->isChecked();
- grfx::DisplayType dtype(grfx::ColorDisplay);
+ lyx::graphics::DisplayType dtype(lyx::graphics::ColorDisplay);
switch (displaymod->displayGraphicsCO->currentItem()) {
- case 3: dtype = grfx::NoDisplay; break;
- case 2: dtype = grfx::ColorDisplay; break;
- case 1: dtype = grfx::GrayscaleDisplay; break;
- case 0: dtype = grfx::MonochromeDisplay; break;
+ case 3: dtype = lyx::graphics::NoDisplay; break;
+ case 2: dtype = lyx::graphics::ColorDisplay; break;
+ case 1: dtype = lyx::graphics::GrayscaleDisplay; break;
+ case 0: dtype = lyx::graphics::MonochromeDisplay; break;
}
rc.display_graphics = dtype;
#endif
#if 0
if (old_value != rc.display_graphics) {
- grfx::GCache & gc = grfx::GCache::get();
+ lyx::graphics::GCache & gc = lyx::graphics::GCache::get();
gc.changeDisplay();
}
#endif
int item = 2;
switch (rc.display_graphics) {
- case grfx::NoDisplay: item = 3; break;
- case grfx::ColorDisplay: item = 2; break;
- case grfx::GrayscaleDisplay: item = 1; break;
- case grfx::MonochromeDisplay: item = 0; break;
+ case lyx::graphics::NoDisplay: item = 3; break;
+ case lyx::graphics::ColorDisplay: item = 2; break;
+ case lyx::graphics::GrayscaleDisplay: item = 1; break;
+ case lyx::graphics::MonochromeDisplay: item = 0; break;
default: break;
}
displaymod->displayGraphicsCO->setCurrentItem(item);
using std::max;
using std::endl;
-namespace grfx = lyx::graphics;
-
namespace {
class SplashScreen : boost::noncopyable, boost::signals::trackable {
/// This is a singleton class. Get the instance.
static SplashScreen const & get();
///
- grfx::Image const * image() const { return loader_.image(); }
+ lyx::graphics::Image const * image() const { return loader_.image(); }
///
string const & text() const { return text_; }
///
LyXFont const & font() const { return font_; }
///
- void connect(grfx::Loader::slot_type const & slot) const {
+ void connect(lyx::graphics::Loader::slot_type const & slot) const {
loader_.connect(slot);
}
///
void startLoading() const {
- if (loader_.status() == grfx::WaitingToLoad)
+ if (loader_.status() == lyx::graphics::WaitingToLoad)
loader_.startLoading();
}
SplashScreen();
///
- grfx::Loader loader_;
+ lyx::graphics::Loader loader_;
/// The text to be written on top of the pixmap
string const text_;
/// in this font...
// Add a splash screen to the centre of the work area
SplashScreen const & splash = SplashScreen::get();
- grfx::Image const * const splash_image = splash.image();
+ lyx::graphics::Image const * const splash_image = splash.image();
if (splash_image) {
int const w = splash_image->getWidth();
int const h = splash_image->getHeight();
+2003-07-21 Angus Leeming <leeming@lyx.org>
+
+ * FormExternal.C (update, apply):
+ * FormGraphics.C (update, apply):
+ * FormPrefences.C (LnFmisc::update, LnFmisc::apply):
+ * XPainter.C (image):
+ * xformsImage.C (status_report, error_report): use namespace
+ lyx::graphics rather than grfx shortcut.
+
2003-07-18 Angus Leeming <leeming@lyx.org>
* FormNote.C (build): add a tooltip.
using namespace lyx::support;
-namespace grfx = lyx::graphics;
-
typedef FormController<ControlExternal, FormView<FD_external> > base_class;
FormExternal::FormExternal(Dialog & parent)
switch (fl_get_choice(dialog_->choice_display)) {
case 5:
- params.display = grfx::NoDisplay;
+ params.display = lyx::graphics::NoDisplay;
break;
case 4:
- params.display = grfx::ColorDisplay;
+ params.display = lyx::graphics::ColorDisplay;
break;
case 3:
- params.display = grfx::GrayscaleDisplay;
+ params.display = lyx::graphics::GrayscaleDisplay;
break;
case 2:
- params.display = grfx::MonochromeDisplay;
+ params.display = lyx::graphics::MonochromeDisplay;
break;
case 1:
- params.display = grfx::DefaultDisplay;
+ params.display = lyx::graphics::DefaultDisplay;
}
controller().setParams(params);
fl_set_input(dialog_->input_lyxscale, tostr(params.lyxscale).c_str());
switch (params.display) {
- case grfx::NoDisplay:
+ case lyx::graphics::NoDisplay:
fl_set_choice(dialog_->choice_display, 5);
break;
- case grfx::ColorDisplay:
+ case lyx::graphics::ColorDisplay:
fl_set_choice(dialog_->choice_display, 4);
break;
- case grfx::GrayscaleDisplay:
+ case lyx::graphics::GrayscaleDisplay:
fl_set_choice(dialog_->choice_display, 3);
break;
- case grfx::MonochromeDisplay:
+ case lyx::graphics::MonochromeDisplay:
fl_set_choice(dialog_->choice_display, 2);
break;
- case grfx::DefaultDisplay:
+ case lyx::graphics::DefaultDisplay:
fl_set_choice(dialog_->choice_display, 1);
}
}
switch (fl_get_choice(file_->choice_display)) {
case 5:
- igp.display = grfx::NoDisplay;
+ igp.display = lyx::graphics::NoDisplay;
break;
case 4:
- igp.display = grfx::ColorDisplay;
+ igp.display = lyx::graphics::ColorDisplay;
break;
case 3:
- igp.display = grfx::GrayscaleDisplay;
+ igp.display = lyx::graphics::GrayscaleDisplay;
break;
case 2:
- igp.display = grfx::MonochromeDisplay;
+ igp.display = lyx::graphics::MonochromeDisplay;
break;
case 1:
- igp.display = grfx::DefaultDisplay;
+ igp.display = lyx::graphics::DefaultDisplay;
}
// first item in choice_width means scaling
fl_set_input(file_->input_lyxscale, tostr(igp.lyxscale).c_str());
switch (igp.display) {
- case grfx::NoDisplay:
+ case lyx::graphics::NoDisplay:
fl_set_choice(file_->choice_display, 5);
break;
- case grfx::ColorDisplay:
+ case lyx::graphics::ColorDisplay:
fl_set_choice(file_->choice_display, 4);
break;
- case grfx::GrayscaleDisplay:
+ case lyx::graphics::GrayscaleDisplay:
fl_set_choice(file_->choice_display, 3);
break;
- case grfx::MonochromeDisplay:
+ case lyx::graphics::MonochromeDisplay:
fl_set_choice(file_->choice_display, 2);
break;
- case grfx::DefaultDisplay:
+ case lyx::graphics::DefaultDisplay:
fl_set_choice(file_->choice_display, 1);
}
using namespace lyx::support;
-namespace grfx = lyx::graphics;
-
namespace {
// These should probably go inside the class definition...
(fl_get_counter_value(dialog_->counter_wm_jump));
// See FIXME below
- // grfx::DisplayType old_value = rc.display_graphics;
+ // lyx::graphics::DisplayType old_value = rc.display_graphics;
switch (fl_get_choice(dialog_->choice_display)) {
case 4:
- rc.display_graphics = grfx::NoDisplay;
+ rc.display_graphics = lyx::graphics::NoDisplay;
break;
case 3:
- rc.display_graphics = grfx::ColorDisplay;
+ rc.display_graphics = lyx::graphics::ColorDisplay;
break;
case 2:
- rc.display_graphics = grfx::GrayscaleDisplay;
+ rc.display_graphics = lyx::graphics::GrayscaleDisplay;
break;
case 1:
- rc.display_graphics = grfx::MonochromeDisplay;
+ rc.display_graphics = lyx::graphics::MonochromeDisplay;
break;
default:
- rc.display_graphics = grfx::ColorDisplay;
+ rc.display_graphics = lyx::graphics::ColorDisplay;
break;
}
#endif
#if 0
if (old_value != rc.display_graphics) {
- grfx::GCache & gc = grfx::GCache::get();
+ lyx::graphics::GCache & gc = lyx::graphics::GCache::get();
gc.changeDisplay();
}
#endif
fl_set_counter_value(dialog_->counter_wm_jump, rc.wheel_jump);
switch (rc.display_graphics) {
- case grfx::NoDisplay:
+ case lyx::graphics::NoDisplay:
fl_set_choice(dialog_->choice_display, 4);
break;
- case grfx::ColorDisplay:
+ case lyx::graphics::ColorDisplay:
fl_set_choice(dialog_->choice_display, 3);
break;
- case grfx::GrayscaleDisplay:
+ case lyx::graphics::GrayscaleDisplay:
fl_set_choice(dialog_->choice_display, 2);
break;
- case grfx::MonochromeDisplay:
+ case lyx::graphics::MonochromeDisplay:
fl_set_choice(dialog_->choice_display, 1);
break;
default:
using std::endl;
using std::max;
-namespace grfx = lyx::graphics;
XPainter::XPainter(XWorkArea & xwa)
: Painter(), owner_(xwa)
Painter & XPainter::image(int x, int y,
- int w, int h,
- grfx::Image const & i)
+ int w, int h,
+ lyx::graphics::Image const & i)
{
- grfx::xformsImage const & image =
- static_cast<grfx::xformsImage const &>(i);
+ lyx::graphics::xformsImage const & image =
+ static_cast<lyx::graphics::xformsImage const &>(i);
XGCValues val;
val.function = GXcopy;
namespace {
-namespace grfx = lyx::graphics;
-
extern "C" {
int status_report(FL_IMAGE * ob, const char *s)
lyxerr[Debug::GRAPHICS]
<< "xforms image loader. Status: " << str << std::endl;
- grfx::xformsImage * ptr =
- static_cast<grfx::xformsImage *>(ob->u_vdata);
+ lyx::graphics::xformsImage * ptr =
+ static_cast<lyx::graphics::xformsImage *>(ob->u_vdata);
ptr->statusCB(str);
return 0;
lyxerr[Debug::GRAPHICS]
<< "xforms image loader. Error: " << str << std::endl;
- grfx::xformsImage * ptr =
- static_cast<grfx::xformsImage *>(ob->u_vdata);
+ lyx::graphics::xformsImage * ptr =
+ static_cast<lyx::graphics::xformsImage *>(ob->u_vdata);
ptr->errorCB(str);
}
+2003-07-21 Angus Leeming <leeming@lyx.org>
+
+ * GraphicsCache.h:
+ * GraphicsCacheItem.[Ch]:
+ * GraphicsParams.h:
+ * PreviewLoader.h:
+ * PreviewedInset.[Ch]:
+ * Previews.h: use namespace lyx::graphics rather than grfx shortcut.
+
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
* Change namespace grfx to lyx::graphics.
*
* Full author contact details are available in file CREDITS
*
- * grfx::Cache is the manager of the image cache.
- * It is responsible for creating the grfx::CacheItem's and maintaining them.
+ * lyx::graphics::Cache is the manager of the image cache.
+ * It is responsible for creating the lyx::graphics::CacheItem's
+ * and maintaining them.
*
- * grfx::Cache is a singleton class. It is possible to have only one
+ * lyx::graphics::Cache is a singleton class. It is possible to have only one
* instance of it at any moment.
*/
/** Get a notification when the image loading is done.
* Connected to a signal on_finish_ which is passed to
- * grfx::Image::loadImage.
+ * lyx::graphics::Image::loadImage.
*/
void imageLoaded(bool);
namespace {
-namespace grfx = lyx::graphics;
-
string const findTargetFormat(string const & from)
{
- typedef grfx::Image::FormatList FormatList;
- FormatList const formats = grfx::Image::loadableFormats();
+ typedef lyx::graphics::Image::FormatList FormatList;
+ FormatList const formats = lyx::graphics::Image::loadableFormats();
// There must be a format to load from.
Assert(!formats.empty());
// So, we have to convert to a loadable format. Can we?
it = formats.begin();
for (; it != end; ++it) {
- if (grfx::Converter::isReachable(from, *it))
+ if (lyx::graphics::Converter::isReachable(from, *it))
return *it;
else
lyxerr[Debug::GRAPHICS]
*
* Full author contact details are available in file CREDITS
*
- * The graphics cache is a container of grfx::CacheItems.
- * Each grfx::CacheItem, defined here represents a separate image file.
+ * The graphics cache is a container of lyx::graphics::CacheItems.
+ * Each lyx::graphics::CacheItem, defined here represents a separate image file.
*
* The routines here can be used to load the graphics file into memory at
- * which point (status() == grfx::Loaded).
+ * which point (status() == lyx::graphics::Loaded).
* The user is then free to access image() in order to copy it and to then
* transform the copy (rotate, scale, clip) and to generate the pixmap.
*
* file conversion to a loadable format;
* file loading.
*
- * Whether you get that, of course, depends on grfx::Converter and on the
- * grfx::Image-derived image class.
+ * Whether you get that, of course, depends on lyx::graphics::Converter and
+ * on the lyx::graphics::Image-derived image class.
*/
#ifndef GRAPHICSCACHEITEM_H
class Image;
class Converter;
-/// A grfx::Cache item holder.
+/// A lyx::graphics::Cache item holder.
class CacheItem : boost::noncopyable {
public:
///
*
* Full author contact details are available in file CREDITS
*
- * Used internally by the grfx::Image.
+ * Used internally by the lyx::graphics::Image.
*/
#ifndef GRAPHICSPARAMS_H
*
* Full author contact details are available in file CREDITS
*
- * grfx::PreviewLoader collects latex snippets together. Then, on a
+ * lyx::graphics::PreviewLoader collects latex snippets together. Then, on a
* startLoading() call, these are dumped to file and processed, converting
* each snippet to a separate bitmap image file. Once a bitmap file is ready
* to be loaded back into LyX, the PreviewLoader emits a signal to inform
/** Connect and you'll be informed when the bitmap image file
* has been created and is ready for loading through
- * grfx::PreviewImage::image().
+ * lyx::graphics::PreviewImage::image().
*/
typedef boost::signal1<void, PreviewImage const &>::slot_type slot_type;
///
return;
// If this is the first time of calling, connect to the
- // grfx::PreviewLoader signal that'll inform us when the preview image
+ // PreviewLoader signal that'll inform us when the preview image
// is ready for loading.
if (!connection_.connected()) {
connection_ = ploader.connect(
// -*- C++ -*-
/**
- * \file PreviewedInset.h
+ * \file PreviewedInset.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
*
* Full author contact details are available in file CREDITS
*
- * grfx::PreviewedInset is an abstract base class that can help insets to
- * generate previews. The daughter class must instantiate three small
- * methods. The Inset would own an instance of this daughter class.
+ * lyx::graphics::PreviewedInset is an abstract base class that can help
+ * insets to generate previews. The daughter class must instantiate three small
+ * methods. The Inset would own an instance of this daughter class.
*/
#ifndef PREVIEWEDINSET_H
BufferView * view() const;
private:
- /** This method is connected to the grfx::PreviewLoader::imageReady
- * signal.
- */
+ /// This method is connected to the PreviewLoader::imageReady signal.
void imageReady(PreviewImage const &) const;
/// Does the owning inset want a preview?
// -*- C++ -*-
/**
- * \file Previews.h
+ * \file Previews.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
*
* Full author contact details are available in file CREDITS
*
- * grfx::Previews is a singleton class that stores the grfx::PreviewLoader
- * for each buffer requiring one.
+ * lyx::graphics::Previews is a singleton class that stores the
+ * lyx::graphics::PreviewLoader for each buffer requiring one.
*/
#ifndef PREVIEWS_H
+2003-07-21 Angus Leeming <leeming@lyx.org>
+
+ * insetexternal.C:
+ * insetgraphicsParams.[Ch]:
+ * insetinclude.C:
+ * renderers.C: use namespace lyx::graphics rather than grfx shortcut.
+
2003-07-21 Martin Vermeer <martin.vermeer@hut.fi>
* insetnote.C: fixed greyout and conditionals layout foul-ups.
using std::ostream;
using std::endl;
-namespace grfx = lyx::graphics;
-
namespace {
-grfx::DisplayType const defaultDisplayType = grfx::NoDisplay;
+lyx::graphics::DisplayType const defaultDisplayType = lyx::graphics::NoDisplay;
unsigned int defaultLyxScale = 100;
namespace {
-grfx::Params get_grfx_params(InsetExternal::Params const & eparams,
+lyx::graphics::Params get_grfx_params(InsetExternal::Params const & eparams,
string const & filepath)
{
- grfx::Params gparams;
+ lyx::graphics::Params gparams;
if (!eparams.filename.empty()) {
Assert(AbsolutePath(filepath));
gparams.scale = eparams.lyxscale;
gparams.display = eparams.display;
- if (gparams.display == grfx::DefaultDisplay)
+ if (gparams.display == lyx::graphics::DefaultDisplay)
gparams.display = lyxrc.display_graphics;
// Override the above if we're not using a gui
if (!lyx_gui::use_gui)
- gparams.display = grfx::NoDisplay;
+ gparams.display = lyx::graphics::NoDisplay;
return gparams;
}
bool display_button = (!getTemplatePtr(params_) ||
params_.filename.empty() ||
filepath.empty() ||
- params_.display == grfx::NoDisplay);
+ params_.display == lyx::graphics::NoDisplay);
if (display_button) {
ButtonRenderer * button_ptr =
os << "\tfilename " << params_.filename << '\n';
if (params_.display != defaultDisplayType)
- os << "\tdisplay " << grfx::displayTranslator.find(params_.display)
+ os << "\tdisplay " << lyx::graphics::displayTranslator.find(params_.display)
<< '\n';
if (params_.lyxscale != defaultLyxScale)
case EX_DISPLAY: {
lex.next();
string const name = lex.getString();
- params.display = grfx::displayTranslator.find(name);
+ params.display = lyx::graphics::displayTranslator.find(name);
break;
}
{
filename.erase();
lyxscale = 100; // lyx scaling in percentage
- display = grfx::DefaultDisplay; // display mode; see preferences
+ display = lyx::graphics::DefaultDisplay; // display mode; see preferences
scale = 100.0; // output scaling in percentage
width = LyXLength();
height = LyXLength();
}
if (lyxscale != 100)
os << "\tlyxscale " << lyxscale << '\n';
- if (display != grfx::DefaultDisplay)
- os << "\tdisplay " << grfx::displayTranslator.find(display) << '\n';
+ if (display != lyx::graphics::DefaultDisplay)
+ os << "\tdisplay " << lyx::graphics::displayTranslator.find(display) << '\n';
if (!float_equal(scale, 0.0, 0.05)) {
if (!float_equal(scale, 100.0, 0.05))
os << "\tscale " << scale << '\n';
} else if (token == "display") {
lex.next();
string const type = lex.getString();
- display = grfx::displayTranslator.find(type);
+ display = lyx::graphics::displayTranslator.find(type);
} else if (token == "scale") {
lex.next();
scale = lex.getFloat();
}
-grfx::Params InsetGraphicsParams::as_grfxParams() const
+lyx::graphics::Params InsetGraphicsParams::as_grfxParams() const
{
- grfx::Params pars;
+ lyx::graphics::Params pars;
pars.filename = filename;
pars.scale = lyxscale;
pars.angle = rotateAngle;
}
}
- if (display == grfx::DefaultDisplay) {
+ if (display == lyx::graphics::DefaultDisplay) {
pars.display = lyxrc.display_graphics;
} else {
pars.display = display;
// Override the above if we're not using a gui
if (!lyx_gui::use_gui) {
- pars.display = grfx::NoDisplay;
+ pars.display = lyx::graphics::NoDisplay;
}
return pars;
#include "LString.h"
#include "lyxlength.h"
-namespace grfx = lyx::graphics;
-
class LyXLex;
namespace lyx {
/// Scaling the Screen inside Lyx
unsigned int lyxscale;
/// How to display the image inside LyX
- grfx::DisplayType display;
+ lyx::graphics::DisplayType display;
/// Scaling for output (LaTeX)
float scale;
/// sizes for output (LaTeX)
// Only a subset of InsetGraphicsParams is needed for display purposes.
// This function also interrogates lyxrc to ascertain whether
// to display or not.
- grfx::Params as_grfxParams() const;
+ lyx::graphics::Params as_grfxParams() const;
private:
/// Initialize the object to a default status.
using std::vector;
using std::pair;
-namespace grfx = lyx::graphics;
-
extern BufferList bufferlist;
-class InsetInclude::PreviewImpl : public grfx::PreviewedInset {
+class InsetInclude::PreviewImpl : public lyx::graphics::PreviewedInset {
public:
///
PreviewImpl(InsetInclude & p) : PreviewedInset(p) {}
if (preview_->monitoring())
preview_->stopMonitoring();
- if (grfx::PreviewedInset::activated() && params_.flag == INPUT)
+ if (lyx::graphics::PreviewedInset::activated() && params_.flag == INPUT)
preview_->generatePreview();
}
// preview stuff
//
-void InsetInclude::addPreview(grfx::PreviewLoader & ploader) const
+void InsetInclude::addPreview(lyx::graphics::PreviewLoader & ploader) const
{
preview_->addPreview(ploader);
}
using namespace lyx::support;
-namespace grfx = lyx::graphics;
RenderInset::RenderInset()
{}
}
-void GraphicRenderer::update(grfx::Params const & params)
+void GraphicRenderer::update(lyx::graphics::Params const & params)
{
params_ = params;
string const GraphicRenderer::statusMessage() const
{
switch (loader_.status()) {
- case grfx::WaitingToLoad:
+ case lyx::graphics::WaitingToLoad:
return _("Not shown.");
- case grfx::Loading:
+ case lyx::graphics::Loading:
return _("Loading...");
- case grfx::Converting:
+ case lyx::graphics::Converting:
return _("Converting to loadable format...");
- case grfx::Loaded:
+ case lyx::graphics::Loaded:
return _("Loaded into memory. Must now generate pixmap.");
- case grfx::ScalingEtc:
+ case lyx::graphics::ScalingEtc:
return _("Scaling etc...");
- case grfx::Ready:
+ case lyx::graphics::Ready:
return _("Ready to display");
- case grfx::ErrorNoFile:
+ case lyx::graphics::ErrorNoFile:
return _("No file found!");
- case grfx::ErrorConverting:
+ case lyx::graphics::ErrorConverting:
return _("Error converting to loadable format");
- case grfx::ErrorLoading:
+ case lyx::graphics::ErrorLoading:
return _("Error loading file into memory");
- case grfx::ErrorGeneratingPixmap:
+ case lyx::graphics::ErrorGeneratingPixmap:
return _("Error generating the pixmap");
- case grfx::ErrorUnknown:
+ case lyx::graphics::ErrorUnknown:
return _("No image");
}
return string();
bool GraphicRenderer::readyToDisplay() const
{
- if (!loader_.image() || loader_.status() != grfx::Ready)
+ if (!loader_.image() || loader_.status() != lyx::graphics::Ready)
return false;
return loader_.image()->isDrawable();
}
}
#endif
- if (params_.display != grfx::NoDisplay &&
- loader_.status() == grfx::WaitingToLoad)
+ if (params_.display != lyx::graphics::NoDisplay &&
+ loader_.status() == lyx::graphics::WaitingToLoad)
loader_.startLoading();
- if (params_.display != grfx::NoDisplay && !loader_.monitoring())
+ if (params_.display != lyx::graphics::NoDisplay &&
+ !loader_.monitoring())
loader_.startMonitoring();
// This will draw the graphics. If the graphics has not been loaded yet,
using std::system;
#endif
-namespace grfx = lyx::graphics;
-
extern void LoadLyXFile(string const &);
extern void QuitLyX();
// set the DisplayTranslator only once; should that be done here??
// if this should not be in this file, please also remove
// #include "graphics/GraphicsTypes.h" at the top -- Rob Lahaye.
- grfx::setDisplayTranslator();
+ lyx::graphics::setDisplayTranslator();
if (want_gui) {
lyx_gui::parse_init(argc, argv);
#warning FIXME!! The graphics cache no longer has a changeDisplay method.
#endif
#if 0
- grfx::GCache & gc = grfx::GCache::get();
+ lyx::graphics::GCache & gc =
+ lyx::graphics::GCache::get();
gc.changeDisplay(true);
#endif
}
using std::endl;
using std::vector;
-namespace grfx = lyx::graphics;
-
class kb_keymap;
extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
check_lastfiles = true;
make_backup = true;
backupdir_path.erase();
- display_graphics = grfx::ColorDisplay;
+ display_graphics = lyx::graphics::ColorDisplay;
// Spellchecker settings:
use_spell_lib = true;
isp_command = "ispell";
case RC_DISPLAY_GRAPHICS:
if (lexrc.next()) {
- display_graphics = grfx::displayTranslator.find(lexrc.getString());
+ display_graphics = lyx::graphics::displayTranslator.find(lexrc.getString());
}
break;
if (display_graphics != system_lyxrc.display_graphics) {
os << "# Display graphics within LyX\n"
<< "# monochrome|grayscale|color|none\n"
- << "\\display_graphics " << grfx::displayTranslator.find(display_graphics)
+ << "\\display_graphics "
+ << lyx::graphics::displayTranslator.find(display_graphics)
<< '\n';
}
+2003-07-21 Angus Leeming <leeming@lyx.org>
+
+ * formula.C (c-tor, addPreview): use namespace lyx::graphics rather
+ than grfx shortcut.
+
2003-07-18 Lars Gullik Bjønnes <larsbj@gullik.net>
* math_parser.C (catInit): dont use unprintable control chars in
using std::ostream;
using std::vector;
-namespace grfx = lyx::graphics;
-class InsetFormula::PreviewImpl : public grfx::PreviewedInset {
+class InsetFormula::PreviewImpl : public lyx::graphics::PreviewedInset {
public:
///
PreviewImpl(InsetFormula & p) : PreviewedInset(p) {}
// preview stuff
//
-void InsetFormula::addPreview(grfx::PreviewLoader & ploader) const
+void InsetFormula::addPreview(lyx::graphics::PreviewLoader & ploader) const
{
preview_->addPreview(ploader);
}
+2003-07-21 Angus Leeming <leeming@lyx.org>
+
+ * filename.[Ch]: new files implementing class FileName.
+ * Makefile.am: add filename.[Ch].
+
2003-07-18 Lars Gullik Bjønnes <larsbj@gullik.net>
* BoostFormat.h (boost): remove one extern template. Gcc 3.4. does