mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
namespace grfx -> lyx::graphics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7239 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
961883ed6d
commit
fe390e9da1
@ -1,3 +1,6 @@
|
||||
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* introduce namespace lyx::graphics
|
||||
|
||||
2003-07-02 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
|
@ -110,6 +110,8 @@ using std::for_each;
|
||||
using lyx::pos_type;
|
||||
using lyx::textclass_type;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
// all these externs should eventually be removed.
|
||||
extern BufferList bufferlist;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* introduce namespace lyx::graphics
|
||||
|
||||
2003-06-27 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
|
@ -19,9 +19,12 @@
|
||||
|
||||
class LyXFont;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
class Image;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Painter - A painter class to encapsulate all graphics parameters and operations
|
||||
@ -132,7 +135,7 @@ public:
|
||||
/// draw an image from the image cache
|
||||
virtual Painter & image(int x, int y,
|
||||
int w, int h,
|
||||
grfx::Image const & image) = 0;
|
||||
lyx::graphics::Image const & image) = 0;
|
||||
|
||||
/// draw a string at position x, y (y is the baseline)
|
||||
virtual Painter & text(int x, int y,
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* introduce namespace lyx::graphics
|
||||
|
||||
2003-07-03 John Levon <levon@movementarian.org>
|
||||
|
||||
* ui/QTexinfoDialog.ui: enable View properly
|
||||
|
@ -33,6 +33,8 @@
|
||||
|
||||
using namespace lyx::support;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
typedef QController<ControlExternal, QView<QExternalDialog> > base_class;
|
||||
|
||||
|
||||
|
@ -32,7 +32,8 @@ using namespace lyx::support;
|
||||
using std::find_if;
|
||||
using std::endl;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
/// Access to this class is through this static method.
|
||||
Image::ImagePtr QLImage::newImage()
|
||||
@ -253,4 +254,5 @@ void QLImage::scale(Params const & params)
|
||||
xformed_pixmap_ = xformed_pixmap_.xForm(m);
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // lyx
|
||||
|
@ -18,7 +18,8 @@
|
||||
|
||||
#include <qpixmap.h>
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
class QLImage : public Image {
|
||||
public:
|
||||
@ -80,6 +81,7 @@ private:
|
||||
QPixmap xformed_pixmap_;
|
||||
};
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // QLIMAGE_H
|
||||
|
@ -36,6 +36,7 @@
|
||||
|
||||
using std::endl;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
QLPainter::QLPainter(QWorkArea & qwa)
|
||||
: Painter(), owner_(qwa), paint_check_(0)
|
||||
|
@ -100,7 +100,7 @@ public:
|
||||
/// draw an image from the image cache
|
||||
virtual Painter & image(int x, int y,
|
||||
int w, int h,
|
||||
grfx::Image const & image);
|
||||
lyx::graphics::Image const & image);
|
||||
|
||||
/// draw a string at position x, y (y is the baseline)
|
||||
virtual Painter & text(int x, int y,
|
||||
|
@ -63,6 +63,8 @@ using std::setfill;
|
||||
using std::setw;
|
||||
using std::endl;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
typedef Qt2CB<ControlPrefs, Qt2DB<QPrefsDialog> > base_class;
|
||||
|
||||
|
||||
|
@ -119,7 +119,7 @@ void parse_init(int & argc, char * argv[])
|
||||
{
|
||||
static LQApplication a(argc, argv);
|
||||
|
||||
using namespace grfx;
|
||||
using namespace lyx::graphics;
|
||||
|
||||
Image::newImage = boost::bind(&QLImage::newImage);
|
||||
Image::loadableFormats = boost::bind(&QLImage::loadableFormats);
|
||||
|
@ -48,6 +48,8 @@ using std::min;
|
||||
using std::max;
|
||||
using std::endl;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
namespace {
|
||||
|
||||
class SplashScreen : boost::noncopyable, boost::signals::trackable {
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* introduce namespace lyx::graphics
|
||||
|
||||
2003-07-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* introcude namespace lyx::support
|
||||
|
@ -32,6 +32,8 @@
|
||||
|
||||
using namespace lyx::support;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
typedef FormController<ControlExternal, FormView<FD_external> > base_class;
|
||||
|
||||
FormExternal::FormExternal(Dialog & parent)
|
||||
|
@ -68,6 +68,8 @@ extern string user_lyxdir;
|
||||
|
||||
using namespace lyx::support;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
namespace {
|
||||
|
||||
// These should probably go inside the class definition...
|
||||
|
@ -35,6 +35,7 @@ using namespace lyx::support;
|
||||
using std::endl;
|
||||
using std::max;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
XPainter::XPainter(XWorkArea & xwa)
|
||||
: Painter(), owner_(xwa)
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
/// draw an image from the image cache
|
||||
virtual Painter & image(int x, int y,
|
||||
int w, int h,
|
||||
grfx::Image const & image);
|
||||
lyx::graphics::Image const & image);
|
||||
|
||||
/// draw a string at position x, y (y is the baseline)
|
||||
virtual Painter & text(int x, int y,
|
||||
|
@ -172,7 +172,7 @@ void parse_init(int & argc, char * argv[])
|
||||
|
||||
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);
|
||||
|
@ -45,7 +45,8 @@ unsigned int packedcolor(LColor::color c);
|
||||
} // namespace anon
|
||||
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
/// Access to this class is through this static method.
|
||||
Image::ImagePtr xformsImage::newImage()
|
||||
@ -364,11 +365,14 @@ void xformsImage::errorCB(string const & error_message)
|
||||
finishedLoading(false);
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
extern "C" {
|
||||
|
||||
int status_report(FL_IMAGE * ob, const char *s)
|
||||
|
@ -24,7 +24,8 @@
|
||||
struct flimage_;
|
||||
typedef flimage_ FL_IMAGE;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
class xformsImage : public Image
|
||||
{
|
||||
@ -104,6 +105,7 @@ private:
|
||||
PixmapStatus pixmap_status_;
|
||||
};
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // XFORMSIMAGE_H
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* Change namespace grfx to lyx::graphics.
|
||||
|
||||
2003-07-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* introcude namespace lyx::support
|
||||
|
@ -25,7 +25,8 @@
|
||||
|
||||
using namespace lyx::support;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
/** The cache contains one item per file, so use a map to find the
|
||||
* cache item quickly by filename.
|
||||
@ -113,4 +114,5 @@ Cache::ItemPtr const Cache::item(string const & file) const
|
||||
return it->second;
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
@ -26,7 +26,8 @@
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
class CacheItem;
|
||||
|
||||
@ -79,6 +80,7 @@ private:
|
||||
boost::scoped_ptr<Impl> const pimpl_;
|
||||
};
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // GRAPHICSCACHE_H
|
||||
|
@ -32,7 +32,8 @@ using namespace lyx::support;
|
||||
|
||||
using std::endl;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
struct CacheItem::Impl : public boost::signals::trackable {
|
||||
|
||||
@ -311,11 +312,14 @@ void CacheItem::Impl::imageLoaded(bool success)
|
||||
}
|
||||
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
string const findTargetFormat(string const & from)
|
||||
{
|
||||
typedef grfx::Image::FormatList FormatList;
|
||||
@ -351,7 +355,8 @@ string const findTargetFormat(string const & from)
|
||||
} // anon namespace
|
||||
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
void CacheItem::Impl::convertToDisplayFormat()
|
||||
{
|
||||
@ -409,4 +414,5 @@ void CacheItem::Impl::convertToDisplayFormat()
|
||||
converter_->startConversion();
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
@ -37,7 +37,8 @@
|
||||
|
||||
class InsetGraphics;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
class Image;
|
||||
class Converter;
|
||||
@ -95,6 +96,7 @@ private:
|
||||
boost::scoped_ptr<Impl> const pimpl_;
|
||||
};
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // GRAPHICSCACHEITEM_H
|
||||
|
@ -36,7 +36,8 @@ using namespace lyx::support;
|
||||
using std::endl;
|
||||
using std::ostream;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
struct Converter::Impl : public boost::signals::trackable {
|
||||
///
|
||||
@ -108,7 +109,9 @@ string const & Converter::convertedFile() const
|
||||
return pimpl_->finished_ ? pimpl_->to_file_ : empty;
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
|
||||
//------------------------------
|
||||
// Implementation details follow
|
||||
@ -126,7 +129,8 @@ bool build_script(string const & from_file, string const & to_file_base,
|
||||
} // namespace anon
|
||||
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
Converter::Impl::Impl(string const & from_file, string const & to_file_base,
|
||||
string const & from_format, string const & to_format)
|
||||
@ -223,7 +227,8 @@ void Converter::Impl::converted(pid_t /* pid */, int retval)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -22,7 +22,8 @@
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
class Converter : boost::noncopyable {
|
||||
public:
|
||||
@ -65,6 +66,7 @@ private:
|
||||
boost::scoped_ptr<Impl> const pimpl_;
|
||||
};
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // GRAPHICSCONVERTER_H
|
||||
|
@ -19,7 +19,8 @@
|
||||
using std::endl;
|
||||
using std::abs;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
// This is to be connected to a function that will return a new
|
||||
// instance of a viable derived class.
|
||||
@ -53,4 +54,5 @@ Image::getScaledDimensions(Params const & params) const
|
||||
return std::make_pair(width, height);
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
@ -33,7 +33,8 @@
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
class Params;
|
||||
|
||||
@ -107,6 +108,7 @@ protected:
|
||||
getScaledDimensions(Params const & params) const;
|
||||
};
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // GRAPHICSIMAGE_H
|
||||
|
@ -25,7 +25,8 @@
|
||||
|
||||
#include <list>
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
struct Loader::Impl : boost::signals::trackable {
|
||||
///
|
||||
@ -296,4 +297,5 @@ void Loader::Impl::startLoading()
|
||||
}
|
||||
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
@ -32,7 +32,8 @@
|
||||
|
||||
class Inset;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
class Image;
|
||||
class Params;
|
||||
@ -106,6 +107,7 @@ private:
|
||||
boost::scoped_ptr<Impl> const pimpl_;
|
||||
};
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // GRAPHICSLOADER_H
|
||||
|
@ -18,7 +18,8 @@
|
||||
|
||||
using std::abs;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
Params::Params()
|
||||
: display(ColorDisplay),
|
||||
@ -95,4 +96,5 @@ bool operator!=(BoundingBox const & a, BoundingBox const & b)
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
@ -18,7 +18,8 @@
|
||||
#include "LString.h"
|
||||
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
/** Parse a string of the form "200pt 500pt 300mm 5in" into a
|
||||
* usable bounding box.
|
||||
@ -67,6 +68,7 @@ struct Params
|
||||
bool operator==(Params const &, Params const &);
|
||||
bool operator!=(Params const &, Params const &);
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // GRAPHICSPARAMS_H
|
||||
|
@ -14,7 +14,8 @@
|
||||
#include "graphics/GraphicsTypes.h"
|
||||
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
/// The translator between the Display enum and corresponding lyx string.
|
||||
Translator<DisplayType, string> displayTranslator(DefaultDisplay, "default");
|
||||
@ -41,4 +42,5 @@ void setDisplayTranslator()
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
@ -18,7 +18,8 @@
|
||||
#include "LString.h"
|
||||
#include "support/translator.h"
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
/// The status of the loading process
|
||||
enum ImageStatus {
|
||||
@ -68,6 +69,7 @@ extern Translator<DisplayType, string> displayTranslator;
|
||||
///
|
||||
void setDisplayTranslator();
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // GRAPHICSTYPES_H
|
||||
|
@ -19,8 +19,8 @@
|
||||
using std::endl;
|
||||
using std::list;
|
||||
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
int LoaderQueue::s_numimages_ = 5;
|
||||
int LoaderQueue::s_millisecs_ = 500;
|
||||
@ -113,4 +113,5 @@ void LoaderQueue::touch(Cache::ItemPtr const & item)
|
||||
}
|
||||
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
@ -29,7 +29,8 @@
|
||||
#include <set>
|
||||
#include <queue>
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
class LoaderQueue {
|
||||
public:
|
||||
@ -74,6 +75,7 @@ private:
|
||||
void stopLoader();
|
||||
};
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // LOADERQUEUE_H
|
||||
|
@ -22,7 +22,8 @@
|
||||
|
||||
using namespace lyx::support;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
struct PreviewImage::Impl : public boost::signals::trackable {
|
||||
///
|
||||
@ -152,4 +153,5 @@ void PreviewImage::Impl::statusChanged()
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
@ -17,7 +17,8 @@
|
||||
|
||||
class Inset;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
class PreviewLoader;
|
||||
class Image;
|
||||
@ -55,6 +56,7 @@ private:
|
||||
boost::scoped_ptr<Impl> const pimpl_;
|
||||
};
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // PREVIEWIMAGE_H
|
||||
|
@ -117,7 +117,8 @@ typedef InProgressProcesses::value_type InProgressProcess;
|
||||
} // namespace anon
|
||||
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
struct PreviewLoader::Impl : public boost::signals::trackable {
|
||||
///
|
||||
@ -241,7 +242,8 @@ Buffer const & PreviewLoader::buffer() const
|
||||
return pimpl_->buffer();
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
|
||||
// The details of the Impl
|
||||
@ -306,7 +308,8 @@ void InProgress::stop() const
|
||||
} // namespace anon
|
||||
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
PreviewLoader::Impl::Impl(PreviewLoader & p, Buffer const & b)
|
||||
: parent_(p), buffer_(b), font_scaling_factor_(0.0)
|
||||
@ -637,8 +640,8 @@ void PreviewLoader::Impl::dumpData(ostream & os,
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -25,7 +25,8 @@
|
||||
|
||||
class Buffer;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
class PreviewImage;
|
||||
|
||||
@ -92,6 +93,7 @@ private:
|
||||
boost::scoped_ptr<Impl> const pimpl_;
|
||||
};
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // PREVIEWLOADER_H
|
||||
|
@ -30,7 +30,8 @@
|
||||
|
||||
using namespace lyx::support;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
bool PreviewedInset::activated()
|
||||
{
|
||||
@ -50,15 +51,15 @@ void PreviewedInset::generatePreview()
|
||||
!view() || !view()->buffer())
|
||||
return;
|
||||
|
||||
grfx::Previews & previews = grfx::Previews::get();
|
||||
grfx::PreviewLoader & loader = previews.loader(view()->buffer());
|
||||
Previews & previews = Previews::get();
|
||||
PreviewLoader & loader = previews.loader(view()->buffer());
|
||||
addPreview(loader);
|
||||
if (!snippet_.empty())
|
||||
loader.startLoading();
|
||||
}
|
||||
|
||||
|
||||
void PreviewedInset::addPreview(grfx::PreviewLoader & ploader)
|
||||
void PreviewedInset::addPreview(PreviewLoader & ploader)
|
||||
{
|
||||
if (!Previews::activated() || !previewWanted())
|
||||
return;
|
||||
@ -88,8 +89,8 @@ void PreviewedInset::removePreview()
|
||||
if (!view() || !view()->buffer() || snippet_.empty())
|
||||
return;
|
||||
|
||||
grfx::Previews & previews = grfx::Previews::get();
|
||||
grfx::PreviewLoader & loader = previews.loader(view()->buffer());
|
||||
Previews & previews = Previews::get();
|
||||
PreviewLoader & loader = previews.loader(view()->buffer());
|
||||
loader.remove(snippet_);
|
||||
snippet_.erase();
|
||||
pimage_ = 0;
|
||||
@ -103,8 +104,8 @@ bool PreviewedInset::previewReady() const
|
||||
return false;
|
||||
|
||||
if (!pimage_ || snippet_ != pimage_->snippet()) {
|
||||
grfx::PreviewLoader & ploader =
|
||||
grfx::Previews::get().loader(view()->buffer());
|
||||
PreviewLoader & ploader =
|
||||
Previews::get().loader(view()->buffer());
|
||||
pimage_ = ploader.preview(snippet_);
|
||||
}
|
||||
|
||||
@ -115,7 +116,7 @@ bool PreviewedInset::previewReady() const
|
||||
}
|
||||
|
||||
|
||||
void PreviewedInset::imageReady(grfx::PreviewImage const & pimage) const
|
||||
void PreviewedInset::imageReady(PreviewImage const & pimage) const
|
||||
{
|
||||
// Check snippet against the Inset's current contents
|
||||
if (snippet_ != pimage.snippet())
|
||||
@ -127,4 +128,5 @@ void PreviewedInset::imageReady(grfx::PreviewImage const & pimage) const
|
||||
view()->updateInset(&inset_);
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
@ -23,7 +23,8 @@
|
||||
class Inset;
|
||||
class BufferView;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
class PreviewImage;
|
||||
class PreviewLoader;
|
||||
@ -87,7 +88,7 @@ private:
|
||||
boost::signals::connection connection_;
|
||||
};
|
||||
|
||||
} // namespace grfx
|
||||
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // PREVIEWEDINSET_H
|
||||
|
@ -22,9 +22,11 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace lyx {
|
||||
|
||||
using namespace lyx::support;
|
||||
|
||||
namespace grfx {
|
||||
namespace graphics {
|
||||
|
||||
bool Previews::activated()
|
||||
{
|
||||
@ -99,4 +101,5 @@ void Previews::generateBufferPreviews(Buffer const & buffer) const
|
||||
ploader.startLoading();
|
||||
}
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
@ -21,7 +21,8 @@
|
||||
|
||||
class Buffer;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
|
||||
class PreviewLoader;
|
||||
|
||||
@ -66,6 +67,7 @@ private:
|
||||
boost::scoped_ptr<Impl> const pimpl_;
|
||||
};
|
||||
|
||||
} // namespace grfx
|
||||
} // namespace graphics
|
||||
} // namespace lyx
|
||||
|
||||
#endif // PREVIEWS_H
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* introduce namespace lyx::graphics
|
||||
|
||||
2003-07-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* introduce namespace lyx::support
|
||||
|
@ -34,9 +34,11 @@ class WordLangTuple;
|
||||
class ParagraphList;
|
||||
class UpdatableInset;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
class PreviewLoader;
|
||||
}
|
||||
}
|
||||
|
||||
/// Insets
|
||||
class Inset : public InsetBase {
|
||||
@ -311,7 +313,7 @@ public:
|
||||
* Most insets have no interest in this capability, so the method
|
||||
* defaults to empty.
|
||||
*/
|
||||
virtual void addPreview(grfx::PreviewLoader &) const {}
|
||||
virtual void addPreview(lyx::graphics::PreviewLoader &) const {}
|
||||
|
||||
/** Find the PreviewLoader, add a LaTeX snippet to it and
|
||||
* start the loading process.
|
||||
|
@ -41,6 +41,7 @@ using std::ostream;
|
||||
using std::endl;
|
||||
using std::max;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
InsetCollapsable::InsetCollapsable(BufferParams const & bp, bool collapsed)
|
||||
: UpdatableInset(), collapsed_(collapsed), inset(bp),
|
||||
|
@ -167,7 +167,7 @@ public:
|
||||
bool = true, bool = false);
|
||||
|
||||
///
|
||||
void addPreview(grfx::PreviewLoader &) const;
|
||||
void addPreview(lyx::graphics::PreviewLoader &) const;
|
||||
|
||||
protected:
|
||||
///
|
||||
|
@ -49,6 +49,7 @@ using namespace lyx::support;
|
||||
using std::ostream;
|
||||
using std::endl;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
/// The name of the tempfile used for manipulations.
|
||||
string tempname;
|
||||
/// how the inset is displayed by LyX
|
||||
grfx::DisplayType display;
|
||||
lyx::graphics::DisplayType display;
|
||||
/// The scale of the displayed graphic (If shown).
|
||||
unsigned int lyxscale;
|
||||
};
|
||||
|
@ -18,11 +18,16 @@
|
||||
#include "LString.h"
|
||||
#include "lyxlength.h"
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
class LyXLex;
|
||||
|
||||
namespace grfx {
|
||||
namespace lyx {
|
||||
namespace graphics {
|
||||
class Params;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// This struct holds all the parameters needed by insetGraphics.
|
||||
struct InsetGraphicsParams
|
||||
|
@ -50,6 +50,8 @@ using std::endl;
|
||||
using std::vector;
|
||||
using std::pair;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
extern BufferList bufferlist;
|
||||
|
||||
|
||||
|
@ -109,7 +109,7 @@ public:
|
||||
bool loadIfNeeded() const;
|
||||
|
||||
///
|
||||
void addPreview(grfx::PreviewLoader &) const;
|
||||
void addPreview(lyx::graphics::PreviewLoader &) const;
|
||||
|
||||
private:
|
||||
/// get the text displayed on the button
|
||||
|
@ -59,6 +59,8 @@ using std::endl;
|
||||
using std::swap;
|
||||
using std::max;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
namespace {
|
||||
|
||||
int const ADD_TO_HEIGHT = 2;
|
||||
|
@ -211,7 +211,7 @@ public:
|
||||
bool forceDefaultParagraphs(Inset const * in) const;
|
||||
|
||||
///
|
||||
void addPreview(grfx::PreviewLoader &) const;
|
||||
void addPreview(lyx::graphics::PreviewLoader &) const;
|
||||
|
||||
//
|
||||
// Public structures and variables
|
||||
|
@ -76,6 +76,7 @@ using namespace lyx::support;
|
||||
using lyx::pos_type;
|
||||
using lyx::textclass_type;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
// These functions should probably go into bufferview_funcs somehow (Jug)
|
||||
|
||||
|
@ -230,7 +230,7 @@ public:
|
||||
void appendParagraphs(Buffer * bp, ParagraphList &);
|
||||
|
||||
///
|
||||
void addPreview(grfx::PreviewLoader &) const;
|
||||
void addPreview(lyx::graphics::PreviewLoader &) const;
|
||||
|
||||
//
|
||||
// Public structures and variables
|
||||
|
@ -28,6 +28,8 @@
|
||||
|
||||
using namespace lyx::support;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
RenderInset::RenderInset()
|
||||
{}
|
||||
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
virtual RenderInset * clone() const;
|
||||
|
||||
/// Refresh the info about which file to display and how to display it.
|
||||
void update(grfx::Params const & params);
|
||||
void update(lyx::graphics::Params const & params);
|
||||
|
||||
/// compute the size of the object returned in dim
|
||||
virtual void metrics(MetricsInfo & mi, Dimension & dim) const;
|
||||
@ -111,8 +111,8 @@ private:
|
||||
bool readyToDisplay() const;
|
||||
|
||||
/// The stored data.
|
||||
grfx::Loader loader_;
|
||||
grfx::Params params_;
|
||||
lyx::graphics::Loader loader_;
|
||||
lyx::graphics::Params params_;
|
||||
|
||||
/// Cached variable (not copied).
|
||||
mutable unsigned long checksum_;
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright 1995-2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* \author unknown
|
||||
* \author Lars Gullik Bjønnes
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@ -59,6 +59,8 @@ using std::signal;
|
||||
using std::system;
|
||||
#endif
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
extern void LoadLyXFile(string const &);
|
||||
extern void QuitLyX();
|
||||
|
||||
|
@ -40,6 +40,8 @@ using std::ios;
|
||||
using std::endl;
|
||||
using std::vector;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
class kb_keymap;
|
||||
|
||||
extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
|
||||
|
@ -337,7 +337,7 @@ enum LyXRCTags {
|
||||
///
|
||||
int label_init_length;
|
||||
///
|
||||
grfx::DisplayType display_graphics;
|
||||
lyx::graphics::DisplayType display_graphics;
|
||||
///
|
||||
bool show_banner;
|
||||
///
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* introduce namespace lyx::graphics
|
||||
|
||||
2003-07-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* introduce namespace lyx::support
|
||||
|
@ -52,6 +52,7 @@
|
||||
using std::ostream;
|
||||
using std::vector;
|
||||
|
||||
namespace grfx = lyx::graphics;
|
||||
|
||||
class InsetFormula::PreviewImpl : public grfx::PreviewedInset {
|
||||
public:
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
///
|
||||
void generatePreview() const;
|
||||
///
|
||||
void addPreview(grfx::PreviewLoader &) const;
|
||||
void addPreview(lyx::graphics::PreviewLoader &) const;
|
||||
///
|
||||
void mutate(string const & type);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user