feat_color.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:4k
- /*
- * ===========================================================================
- * PRODUCTION $Log: feat_color.hpp,v $
- * PRODUCTION Revision 1000.1 2004/06/01 19:46:16 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.3
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_CONFIG___FEAT_COLOR__HPP
- #define GUI_CONFIG___FEAT_COLOR__HPP
- /* $Id: feat_color.hpp,v 1000.1 2004/06/01 19:46:16 gouriano Exp $
- * ===========================================================================
- *
- * PUBLIC DOMAIN NOTICE
- * National Center for Biotechnology Information
- *
- * This software/database is a "United States Government Work" under the
- * terms of the United States Copyright Act. It was written as part of
- * the author's official duties as a United States Government employee and
- * thus cannot be copyrighted. This software/database is freely available
- * to the public for use. The National Library of Medicine and the U.S.
- * Government have not placed any restriction on its use or reproduction.
- *
- * Although all reasonable efforts have been taken to ensure the accuracy
- * and reliability of the software and data, the NLM and the U.S.
- * Government do not and cannot warrant the performance or results that
- * may be obtained by using this software or data. The NLM and the U.S.
- * Government disclaim all warranties, express or implied, including
- * warranties of performance, merchantability or fitness for any particular
- * purpose.
- *
- * Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- * Authors: Robert Smith
- *
- */
- /// @file feat_color.hpp
- #include <corelib/ncbistd.hpp>
- #include <gui/config/feat_config_inherited.hpp>
- #include <gui/config/settings_set.hpp>
- #include <gui/opengl/glcolor.hpp>
- /** @addtogroup GUI_CONFIG
- *
- * @{
- */
- BEGIN_NCBI_SCOPE
- ///
- /// CFeatConfigColor - class to hold feature color information.
- ///
- /// Associates a color with each feature type/subtype, which values
- /// can be inherited from those associated with 'master' feature types.
- class NCBI_GUICONFIG_EXPORT CFeatConfigColor : public CSettingsSet {
- public:
- CFeatConfigColor(objects::CPluginConfigCache* config_cache,
- const string& typedesc = "");
- /// use the following cstr when inheriting from this class.
- CFeatConfigColor(objects::CPluginConfigCache* config_cache,
- const string& type,
- const AutoPtr<IFactoryDefaultSettings>& fds,
- const string& typedesc = ""
- );
- /// Must define
- virtual bool LoadCurrentSettings(ELoadValueSource src);
- virtual bool SaveCurrentSettings(void);
-
-
- CGlColor GetColor(int type, int subtype) const;
- void SetColor(int type, int subtype, CGlColor color);
- void SetColorInherited(int type, int subtype, bool inherited);
- void ClearColors();
-
- private:
- CFeatConfigValues<CGlColor> m_FeatColors;
- };
- class NCBI_GUICONFIG_EXPORT CFeatColorFactoryDefaults : public IFactoryDefaultSettings {
- public:
- virtual string Get(const string& key) const;
- };
- END_NCBI_SCOPE
- /* @} */
- /*
- * ===========================================================================
- *
- * $Log: feat_color.hpp,v $
- * Revision 1000.1 2004/06/01 19:46:16 gouriano
- * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.3
- *
- * Revision 1.3 2004/05/11 18:55:53 dicuccio
- * Changed doxygen modules - use GUI_CONFIG instead of PluginConfiguration
- *
- * Revision 1.2 2004/02/02 18:43:26 rsmith
- * add description to CSettingsSet, constructor and descendants.
- *
- * Revision 1.1 2003/12/29 14:17:11 rsmith
- * Seperated from feat_config.hpp/cpp
- *
- *
- * ===========================================================================
- */
- #endif /* GUI_CONFIG___FEAT_COLOR__HPP */