algo_menu.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:5k
- /*
- * ===========================================================================
- * PRODUCTION $Log: algo_menu.hpp,v $
- * PRODUCTION Revision 1000.1 2004/04/16 17:48:59 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.14
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_CORE___ALGO_MENU__HPP
- #define GUI_CORE___ALGO_MENU__HPP
- /* $Id: algo_menu.hpp,v 1000.1 2004/04/16 17:48:59 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: Mike DiCuccio
- *
- * File Description:
- *
- * IAlgoMenuData -- Class to hold callback information necessary to spawn an
- * algorithm plugin from an FLTK callback
- *
- * CAlgoMenuMgr -- Manager for dynamic FLTK algorithm plugin menu +
- * callback data
- */
- #include <corelib/ncbistd.hpp>
- #include <gui/utils/fltk_utils.hpp>
- BEGIN_NCBI_SCOPE
- class IDocument;
- class ISelection;
- //
- // data class that we use internally to store data about our algorithm callback
- //
- class IAlgoMenuData : public CObject
- {
- public:
- virtual void DoCallback() = 0;
- };
- //
- // class CAlgoMenuMgr manages a dynamic menu for views
- //
- class NCBI_GUICORE_EXPORT CAlgoMenuMgr : public CFltkMenuMgrBase<IAlgoMenuData>
- {
- public:
- CAlgoMenuMgr(Fl_Menu_* menu, const string& base,
- ISelection* sel_source);
- // Clear our managed sub-menus
- void Clear();
- // add a list of algorithms applicable to a given selection buffer
- void AddAlgoMenu();
- //void AddAlgoMenu(IDocument* doc);
- //void AddAlgoMenu(const CSelectionBuffer& sels);
- protected:
- ISelection* m_SelSource;
- };
- END_NCBI_SCOPE
- /*
- * ===========================================================================
- * $Log: algo_menu.hpp,v $
- * Revision 1000.1 2004/04/16 17:48:59 gouriano
- * PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.14
- *
- * Revision 1.14 2004/04/16 14:30:19 dicuccio
- * Use ISelection as selection source instead of passing in selection buffer
- *
- * Revision 1.13 2003/09/16 14:04:24 dicuccio
- * Renamed menu data interface classes
- *
- * Revision 1.12 2003/09/04 14:00:26 dicuccio
- * Introduce IDocument and IView as abstract base classes. Use IDocument instead
- * of CDocument.
- *
- * Revision 1.11 2003/07/21 19:20:42 dicuccio
- * Changed interface from Run() to DoCallback() -- more descriptive
- *
- * Revision 1.10 2003/06/30 20:04:40 dicuccio
- * Fixed probelm with crashing algorithm menus - menu data class holds a copy of a
- * plugin handle, not a reference.
- *
- * Revision 1.9 2003/06/25 16:59:41 dicuccio
- * Changed CPluginHandle into a pointer-to-implementation (the previous
- * implementation is now the pointer held). Lots of #include file clean-ups.
- *
- * Revision 1.8 2003/04/29 14:27:40 dicuccio
- * Added interface functions for building algorithm menus from selections and
- * documents. Changed storage of selection buffer to CConstRef for added safety
- *
- * Revision 1.7 2003/03/31 13:49:22 dicuccio
- * Added additional initialization path for IAlgoMenuData - can create with no
- * selection buffer
- *
- * Revision 1.6 2003/03/21 16:58:03 dicuccio
- * Moved fltk_utils.hpp --> gui/utils
- *
- * Revision 1.5 2003/02/26 17:52:26 dicuccio
- * Cleaned up dynamic menus to make them resistant to refreshing the menu while
- * the menu callback is running
- *
- * Revision 1.4 2003/02/20 19:44:06 dicuccio
- * Created new plugin architecture, mediated via an ASN.1 spec. Moved GBENCH
- * framework over to use new plugin architecture.
- *
- * Revision 1.3 2003/01/13 13:11:41 dicuccio
- * Namespace clean-up. Retired namespace gui -> converted to namespace ncbi.
- * Moved all FLUID-generated code into namespace ncbi.
- *
- * Revision 1.2 2002/12/26 14:19:55 dicuccio
- * Added Win32 export specifiers.
- *
- * Revision 1.1 2002/12/20 19:11:11 dicuccio
- * Initial revision.
- *
- * ===========================================================================
- */
- #endif // GUI_CORE___ALGO_MENU__HPP