ClassificationLayer.h

Go to the documentation of this file.
00001 /*
00002  * The information in this file is
00003  * Copyright(c) 2007 Ball Aerospace & Technologies Corporation
00004  * and is subject to the terms and conditions of the
00005  * GNU Lesser General Public License Version 2.1
00006  * The license text is available from   
00007  * http://www.gnu.org/licenses/lgpl.html
00008  */
00009 
00010 #ifndef CLASSIFICATIONLAYER_H
00011 #define CLASSIFICATIONLAYER_H
00012 
00013 #include "AnnotationLayer.h"
00014 #include "ColorType.h"
00015 
00016 class Font;
00017 
00018 /**
00019  *  Provides access to display properties for the classification layer
00020  *  in a product view.
00021  *
00022  *  The classification layer is a special kind of graphic layer that
00023  *  contains two text objects.  The layer is used in a product view to
00024  *  display the overall classification markings for the product.  Only
00025  *  the font, color, and position of the text objects can be changed.
00026  *
00027  *  This subclass of Subject will notify upon the following conditions:
00028  *  - The following methods are called: setClassificationFont() and
00029  *    setClassificationColor().
00030  *  - Everything else documented in AnnotationLayer.
00031  *
00032  *  @see     AnnotationLayer, ProductView
00033  */
00034 class ClassificationLayer : public AnnotationLayer
00035 {
00036 public:
00037    /**
00038     *  Emitted when the font is changed with boost::any<const Font&> containing
00039     *  the new classification text font.
00040     */
00041    SIGNAL_METHOD(ClassificationLayer, FontChanged)
00042 
00043    /**
00044     *  Emitted when the color is changed with boost::any<ColorType> containing
00045     *  the new classification text color.
00046     */
00047    SIGNAL_METHOD(ClassificationLayer, ColorChanged)
00048 
00049    /**
00050     *  Sets the classification text font.
00051     *
00052     *  @param   classificationFont
00053     *           The new classification text font.
00054     *
00055     *  @notify  This method will notify signalFontChanged() with
00056     *           boost::any<const Font&> containing the new classification text
00057     *           font.
00058     */
00059    virtual void setClassificationFont(const Font& classificationFont) = 0;
00060 
00061    /**
00062     *  Returns the classification text font.
00063     *
00064     *  @return  The current classification text font.
00065     */
00066    virtual const Font& getClassificationFont() const = 0;
00067 
00068    /**
00069     *  Sets the classification text color.
00070     *
00071     *  @param   classificationColor
00072     *           The new classification text color.  This method does nothing if
00073     *           \e classificationColor is invalid.
00074     *
00075     *  @notify  This method will notify signalColorChanged() with
00076     *           boost::any<ColorType> containing the new classification text
00077     *           color.
00078     *
00079     *  @see     ColorType::isValid()
00080     */
00081    virtual void setClassificationColor(ColorType classificationColor) = 0;
00082 
00083    /**
00084     *  Returns the text color of the classification text.
00085     *
00086     *  @return  The classification text color.
00087     */
00088    virtual ColorType getClassificationColor() const = 0;
00089 
00090 protected:
00091    /**
00092     * A plug-in cannot create this object, it can only retrieve an already existing
00093     * object from ProductView::getClassificationLayer.  The ProductView will manage
00094     * any instances of this object.
00095     */
00096    virtual ~ClassificationLayer() {}
00097 };
00098 
00099 #endif

Software Development Kit - Opticks 4.9.0 Build 16218