📄 iconfig_mediator.hpp
字号:
/* * =========================================================================== * PRODUCTION $Log: iconfig_mediator.hpp,v $ * PRODUCTION Revision 1000.1 2004/06/01 19:47:27 gouriano * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.2 * PRODUCTION * =========================================================================== */#ifndef GUI_DIALOGS_CONFIG___ICONFIG_MEDIATOR__HPP#define GUI_DIALOGS_CONFIG___ICONFIG_MEDIATOR__HPP/* $Id: iconfig_mediator.hpp,v 1000.1 2004/06/01 19:47:27 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 Description: * Configuration Panel Interpreter interface. * The interface that any configuration/preference dialog uses * to modify its data and get its particular gui widges (IPanel). * * Derived classes with this interface mediate between IConfigPanel * and classes with the CSettingsSet base class, in the context of a * CConfigDlg. */#include <corelib/ncbiobj.hpp>#include <gui/gui.hpp>#include <list>BEGIN_NCBI_SCOPEclass IConfigPanel;class IConfigMediator : public CObject{public: /// return all the states this dialog knows about /// These constitute the valid arguments to the other methods taking /// 'state' parameters. virtual list<string> GetStates(void) const = 0; /// Get the data's currently selected state. /// Used by the dialog only at startup. virtual string GetCurrentState(void) const = 0; /// Get a widget with an IConfigPanel interface to display. virtual IConfigPanel& GetPanel(void) = 0; /// What should we title the dialog window? virtual string GetWindowTitle(void) const = 0; /// Load data into the panel virtual void Load(const string& state) = 0; /// Load 'factory default' data into that panel. virtual void LoadDefault(void) = 0; /// Save the panel's data. virtual void Save(const string& state) = 0; /// Has the data represented by the panel's widgets been modified? virtual bool Modified(void) const = 0; /// If the following methods return true the list of states has changed. /// and the dialog should do GetStates to repopulate and redisplay the list of states. /// if they return false the method failed and no changes to the states were done. /// If succesful new_state is the name of the state just added. virtual bool AddState(string& new_state) = 0; virtual bool DuplicateState(const string& state, string& new_state) = 0; virtual bool RenameState(const string& state, const string& req_state, string& new_state) = 0; virtual bool CanRenameState(const string& state) = 0; virtual bool DeleteState(const string& state) = 0; };END_NCBI_SCOPE/* * =========================================================================== * $Log: iconfig_mediator.hpp,v $ * Revision 1000.1 2004/06/01 19:47:27 gouriano * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.2 * * Revision 1.2 2004/05/03 12:42:46 dicuccio * Added #include for gui/gui.hpp * * Revision 1.1 2003/12/30 14:08:56 dicuccio * Initial check-in - moved from gui/config * * Revision 1.1 2003/10/10 17:41:43 rsmith * moved from gui/core to gui/config * * Revision 1.1 2003/09/26 18:13:16 rsmith * plugin configuration data and dialogs. * * =========================================================================== */#endif /* GUI_DIALOGS_CONFIG___ICONFIG_MEDIATOR__HPP */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -