serves as a way to retreive basic system information and as a factory for creating various graphics peers, like the
class.
|
Public Types |
typedef std::map< String,
Color * > | MapStringColor |
| typedef std::map< Color, VCF::String > | MapStringColorName |
Public Member Functions |
| | GraphicsToolkit () |
| virtual | ~GraphicsToolkit () |
Static Public Member Functions |
| static ContextPeer * | createContextPeer (const uint32 &width, const uint32 &height) |
| static ContextPeer * | createContextPeer (OSHandleID contextID) |
| static FontPeer * | createFontPeer (const String &fontName) |
| static FontPeer * | createFontPeer (const String &fontName, const double &pointSize) |
| static Image * | createImage (const uint32 &width, const uint32 &height, const Image::ImageType &imageType=Image::itColor) |
| static Image * | createImage (GraphicsContext *context, Rect *rect, const Image::ImageType &imageType=Image::itColor) |
| static PrintSessionPeer * | createPrintSessionPeer () |
| static GraphicsResourceBundlePeer * | createGraphicsResourceBundlePeer () |
| static GraphicsResourceBundle * | getResourceBundle () |
| static Image * | createImage (const String &fileName) |
| | Create a image from a filename.
|
| static Image * | createImage (const MIMEType &type, const unsigned char *imageData, const uint64 &dataLength) |
| static Image * | createImage (const MIMEType &type, InputStream *stream) |
| static void | saveImage (const String &fileName, Image *image) |
| static void | registerImageLoader (const String &name, ImageLoader *imageLoader) |
| static ImageLoader * | getImageLoader (const String &contentType) |
| static ImageLoader * | getImageLoaderForFileName (const String &fileName) |
| static Color * | getSystemColor (const uint32 &systemColor) |
| static String | getSystemColorNameFromMap (Color &color) |
| static String | getColorNameFromMap (const Color &color) |
| static Color * | getColorFromColormap (const int &gray) |
| static Color * | getColorFromColormap (const String &colorName) |
| static Color * | getColorMatchFromColormap (const Color &color) |
| | finds the named color closest to another given one.
|
| static void | printColorNameMap () |
| static Enumerator< FontInfo > * | getAvailableSystemFonts () |
| static Font * | getDefaultSystemFont () |
| static double | getDPI (GraphicsContext *context=NULL) |
| | Returns the crurent DPI for the screen if the context parameter is NULL, otherwise returns the dpi that is used by the graphics context.
|
| static void | initGraphicsToolkit () |
| static void | terminate () |
| static bool | getAvailableImageTypes (std::vector< std::pair< String, String > > &contentTypes) |
| static GraphicsToolkit * | internal_getDefaultGraphicsToolkit () |
| static void | systemSettingsChanged () |
| | Call this function if you need to reload various toolkit resoruces due to a systems settings changes, for example teh user enabling or disabling themes.
|
Protected Member Functions |
| virtual ContextPeer * | internal_createContextPeer (const uint32 &width, const uint32 &height)=0 |
| virtual ContextPeer * | internal_createContextPeer (OSHandleID contextID)=0 |
| virtual FontPeer * | internal_createFontPeer (const String &fontName)=0 |
| virtual FontPeer * | internal_createFontPeer (const String &fontName, const double &pointSize)=0 |
| virtual Image * | internal_createImage (const uint32 &width, const uint32 &height, const Image::ImageType &imageType)=0 |
| virtual Image * | internal_createImage (GraphicsContext *context, Rect *rect, const Image::ImageType &imageType)=0 |
| virtual PrintSessionPeer * | internal_createPrintSessionPeer ()=0 |
| virtual GraphicsResourceBundlePeer * | internal_createGraphicsResourceBundlePeer ()=0 |
| virtual double | internal_getDPI (GraphicsContext *context)=0 |
| virtual void | internal_systemSettingsChanged ()=0 |
| virtual Image * | internal_createImage (const String &fileName) |
| | Create a image from a filename.
|
| virtual Image * | internal_createImage (const MIMEType &type, const unsigned char *imageData, const uint64 &dataLength) |
| virtual Image * | internal_createImage (const MIMEType &type, InputStream *stream) |
| virtual void | internal_saveImage (const String &fileName, Image *image) |
| void | internal_registerImageLoader (const String &name, ImageLoader *imageLoader) |
| virtual Color * | internal_getSystemColor (const uint32 &systemColor) |
| virtual String | internal_getSystemColorNameFromMap (Color &color) const |
| virtual String | internal_getColorNameFromMap (const Color &color) const |
| virtual Font * | internal_getDefaultSystemFont () |
| ImageLoader * | internal_getImageLoader (const String &contentType) |
| ImageLoader * | internal_getImageLoaderForFileName (const String &fileName) |
| Color * | internal_getColorFromColormap (const int &gray) |
| Color * | internal_getColorFromColormap (const String &colorName) |
| Color * | internal_getColorMatchFromColormap (const Color &color) |
| | finds the named color closest to a color with a given RGB value
|
| void | internal_printColorNameMap () const |
| | helper function to print the color map.
|
| Enumerator< FontInfo > * | internal_getAvailableSystemFonts () |
| void | initColorMap () |
| void | initColorNameMapItem (const VCF::String &colorName, const uint8 &r, const uint8 &g, const uint8 &b) |
| void | destroyColorMaps () |
| void | destroySystemColorNameMap () |
| virtual void | initSystemFontNames () |
| | this method should be overridden by implementers of the graphics toolkit and should initialize the availableSystemFonts_ vector with a series of FontInfo instances.
|
| void | initContentTypes () |
Protected Attributes |
| MapStringColor | colorMap_ |
| | maps for colors
|
| MapStringColorName * | colorNameMap_ |
| std::map< uint32, Color * > | systemColors_ |
| MapStringColorName * | systemColorNameMap_ |
| std::vector< FontInfo > | availableSystemFonts_ |
EnumeratorContainer< std::vector<
FontInfo >, FontInfo > | fontInfoContainer_ |
| std::map< String, String > | contentTypes_ |
| std::map< String, ImageLoader * > | imageLoaders_ |
| | ImageLoaders are stored in a map, keyed by the MIME content type Thus JPEG loaders are stored under the key:.
|
Static Protected Attributes |
| static GraphicsToolkit * | graphicsToolkitInstance |
serves as a way to retreive basic system information and as a factory for creating various graphics peers, like the
class.