dload_menu.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:6k
- /*
* ===========================================================================
* PRODUCTION $Log: dload_menu.hpp,v $
* PRODUCTION Revision 1000.2 2004/06/01 19:46:40 gouriano
* PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.15
* PRODUCTION
* ===========================================================================
*/
#ifndef GUI_CORE___DLOAD_MENU__HPP
#define GUI_CORE___DLOAD_MENU__HPP
/* $Id: dload_menu.hpp,v 1000.2 2004/06/01 19:46:40 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:
*
* CDocLoaderMenuData -- Abstract class to hold callback information
* necessary to spawn a document / data loader plugin
* from an FLTK callback
*
* CDocLoaderMenuMgr -- Manager for dynamic FLTK document laoder plugin
* menu + callback data
*
*/
#include <gui/utils/fltk_utils.hpp>
BEGIN_NCBI_SCOPE
class IDocument;
class objects::CPluginMessage;
//
// abstract base class for our view menu data
// this is needed for the template definition below
//
class IDLoadMenuData : public CObject
{
public:
virtual ~IDLoadMenuData() {}
virtual void DoCallback() = 0;
};
//
// class CDocLoaderMenuMgr manages a dynamic menu for views
//
class NCBI_GUICORE_EXPORT CDocLoaderMenuMgr
: public CFltkMenuMgrBase<IDLoadMenuData>
{
public:
// default ctor
CDocLoaderMenuMgr(Fl_Menu_* menu, const string& base);
// Clear our managed sub-menus
void Clear();
// add a menu to handle opening new documents
- void AddOpenMenu();
-
// add a menu to handle recently opened documents
- void AddRecentMenu();
- // add a menu to handle releaseing existing documents
void AddUnloadMenu(IDocument* doc = NULL);
// add a menu to import data into the current document
void AddImportMenu(IDocument* doc = NULL);
// add a menu for saving the current document.
void AddSaveAsMenu(IDocument* doc = NULL);
// add a menu to search for data
void AddSearchMenu();
// add a menu to manage various data loader interfaces
void AddManageMenu();
};
END_NCBI_SCOPE
#endif // GUI_CORE___DLOAD_MENU__HPP
/*
* ===========================================================================
* $Log: dload_menu.hpp,v $
* Revision 1000.2 2004/06/01 19:46:40 gouriano
* PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.15
*
* Revision 1.15 2004/05/18 11:31:17 friedman
* Handle adding recently loaded documents into the MRU list.
*
* Revision 1.14 2004/04/16 14:30:47 dicuccio
* Minor formatting change
*
* 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/31 16:40:05 dicuccio
* Added functions to add search and manage sub-menus
*
* Revision 1.10 2003/07/21 19:20:42 dicuccio
* Changed interface from Run() to DoCallback() -- more descriptive
*
* Revision 1.9 2003/07/14 10:57:20 shomrat
* Plugin messageing system related changes
*
* Revision 1.8 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.7 2003/03/21 16:58:03 dicuccio
* Moved fltk_utils.hpp --> gui/utils
*
* Revision 1.6 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.5 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.4 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.3 2002/12/30 17:46:00 dicuccio
* Added private callback function for document loader menu - delays call to
* CDocmanager::UpdateAllViews(), which invalidates current menu objects.
*
* 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.
*
* ===========================================================================
*/