AoiToolBar.h

Go to the documentation of this file.
00001 /*
00002  * The information in this file is
00003  * Copyright(c) 2011 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 AOITOOLBAR_H
00011 #define AOITOOLBAR_H
00012 
00013 #include "ConfigurationSettings.h"
00014 #include "ToolBar.h"
00015 #include "TypesFile.h"
00016 
00017 /**
00018  *  Provides a user interface to edit the selected pixels in an AOI layer.
00019  *
00020  *  The AOI toolbar is a toolbar that allows users to edit the active AOI layer
00021  *  in the active view.  This class provides the capability to set the pixel
00022  *  selection tools and to modify the way in which new pixels are added to the
00023  *  AOI layer.
00024  *
00025  *  A pointer to the AOI toolbar can be obtained by calling
00026  *  DesktopServices::getWindow() using "AOI" as the window name and ::TOOLBAR as
00027  *  the window type.
00028  *
00029  *  This subclass of Subject will notify upon the following conditions:
00030  *    - The toolbar is deleted, which will only occur on application shutdown.
00031  *    - Other notifications documented in the ToolBar class.
00032  *
00033  *  @see     ToolBar, AoiLayer
00034  */
00035 class AoiToolBar : public ToolBar
00036 {
00037 public:
00038    SETTING(SelectionTool, AoiToolBar, GraphicObjectType, MULTIPOINT_OBJECT);
00039 
00040    /**
00041     *  Sets the current AOI pixel selection tool on the toolbar.
00042     *
00043     *  This method sets the current object that is created when the user adds a
00044     *  new object to an AOI layer and the drawing mode that is used when the
00045     *  user edits the layer with the mouse.  The given object type and drawing
00046     *  mode are set into the current AOI layer of the current view and into
00047     *  each AOI layer that is activated in any view.  To set the graphic object
00048     *  type and drawing mode in the layer separately from the AOI toolbar, call
00049     *  GraphicLayer::setCurrentGraphicObjectType() or AoiLayer::setMode()
00050     *  instead.
00051     *
00052     *  @param   toolType
00053     *           The new pixel selection tool.
00054     *  @param   modeType
00055     *           The new pixel selection mode.
00056     */
00057    virtual void setSelectionTool(GraphicObjectType toolType, ModeType modeType) = 0;
00058 
00059    /**
00060     *  Returns the current AOI pixel selection tool on the toolbar.
00061     *
00062     *  @return  The current pixel selection tool.
00063     */
00064    virtual GraphicObjectType getSelectionTool() const = 0;
00065 
00066    /**
00067     *  Returns the current AOI pixel selection mode on the toolbar.
00068     *
00069     *  @return  The current pixel selection mode.
00070     */
00071    virtual ModeType getSelectionMode() const = 0;
00072 
00073    /**
00074     *  Sets the current AOI add mode on the toolbar.
00075     *
00076     *  @param   mode
00077     *           The new add mode.
00078     */
00079    virtual void setAddMode(AoiAddMode mode) = 0;
00080 
00081    /**
00082     *  Returns the current AOI add mode on the toolbar.
00083     *
00084     *  @return  The current add mode.
00085     */
00086    virtual AoiAddMode getAddMode() const = 0;
00087 
00088 protected:
00089    /**
00090     *  This toolbar will be destroyed automatically when the application closes.
00091     *  Plug-ins do not need to destroy it.
00092     */
00093    virtual ~AoiToolBar()
00094    {}
00095 };
00096 
00097 #endif

Software Development Kit - Opticks 4.9.0 Build 16218