X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FGraphicsTypes.h;h=50533eb64a222d1b87d4f7d2f83edd53daec9f97;hb=9d00e2ec0a26dba68b90252b7fe8c02e2e448b28;hp=c99187f8cbe306dd39a4e0d0e8f8f1a48279f4fd;hpb=482c04ecca95e00aaa649dc74f33ca33ad864e89;p=lyx.git diff --git a/src/graphics/GraphicsTypes.h b/src/graphics/GraphicsTypes.h index c99187f8cb..50533eb64a 100644 --- a/src/graphics/GraphicsTypes.h +++ b/src/graphics/GraphicsTypes.h @@ -1,57 +1,74 @@ // -*- C++ -*- /** - * \file GraphicsTypes.h - * Copyright 2002 the LyX Team - * Read the file COPYING + * \file GraphicsTypes.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * \author Angus Leeming + * \author Angus Leeming * - * All that header files outside the graphics subdirectory should need to - * access. That just leaves insetgraphics.C to access GraphicsCache.h. - * It also makes life easier for files inside the graphics subdirectory! + * Full author contact details are available in file CREDITS. + * + * All that header files outside the graphics subdirectory should need to + * access. */ #ifndef GRAPHICSTYPES_H #define GRAPHICSTYPES_H -#include - -#ifdef __GNUG__ -#pragma interface -#endif - -namespace grfx { - - /// - class GImage; - /// - typedef boost::shared_ptr ImagePtr; - - /// The status of the loading process - enum ImageStatus { - /** The data is in the cache, but no request to display it - * has been received. - */ - WaitingToLoad, - /// The image is in a loadable format and is being loaded. - Loading, - /// The image is being converted to a loadable format. - Converting, - /// The image is in memory and is being scaled, rotated, etc. - ScalingEtc, - /// All finished. Can display the image. - Loaded, - /// - ErrorNoFile, - /// - ErrorConverting, - /// - ErrorLoading, - /// Fall back on the unmodified image? - ErrorScalingEtc, - /// The data is not in the cache at all! - ErrorUnknown - }; -} +#include "support/Translator.h" +#include "support/strfwd.h" + + +namespace lyx { +namespace graphics { + +/// The status of the loading process +enum ImageStatus { + /** The data is in the cache, but no request to display it + * has been received. + */ + WaitingToLoad, + /// The image is in a loadable format and is being loaded. + Loading, + /// The image is being converted to a loadable format. + Converting, + /// The image has been loaded into memory. + Loaded, + /// The image is in memory and is being scaled, rotated, etc. + ScalingEtc, + /// All finished. Can display the image. + Ready, + /// + ErrorNoFile, + /// + ErrorConverting, + /// + ErrorLoading, + /// + ErrorGeneratingPixmap, + /// The data is not in the cache at all! + ErrorUnknown +}; + +/// How is the image to be displayed on the LyX screen? +enum DisplayType { + /// + DefaultDisplay, + /// + MonochromeDisplay, + /// + GrayscaleDisplay, + /// + ColorDisplay, + /// + NoDisplay +}; + + +/// The translator between the Display enum and corresponding lyx string. +Translator const & displayTranslator(); + +} // namespace graphics +} // namespace lyx #endif // GRAPHICSTYPES_H