wm_container.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:4k
- /*
- * ===========================================================================
- * PRODUCTION $Log: wm_container.hpp,v $
- * PRODUCTION Revision 1000.0 2004/04/12 18:27:40 gouriano
- * PRODUCTION PRODUCTION: IMPORTED [CATCHUP_003] Dev-tree R1.1
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_WIDGETS_WORKSPACE___WM_CONTAINER_HPP
- #define GUI_WIDGETS_WORKSPACE___WM_CONTAINER_HPP
- /* $Id: wm_container.hpp,v 1000.0 2004/04/12 18:27: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: Andrey Yazhuk
- *
- * File Description:
- *
- */
- #include <corelib/ncbistd.hpp>
- #include <gui/widgets/workspace/wm_client.hpp>
- #include <gui/widgets/fl/menu.hpp>
- BEGIN_NCBI_SCOPE
- ///////////////////////////////////////////////////////////////////////////////
- /// IWMPosition
- class IWMPosition
- {
- public:
- virtual bool IsValid() const = 0;
- virtual IWMPosition* Clone() const = 0;
- virtual ~IWMPosition() {}
- };
- ///////////////////////////////////////////////////////////////////////////////
- /// IWindowManager - interface of IWMContainer
- class IWMContainer;
- class IWindowManager
- {
- public:
- virtual void GetPopupItems(IWMContainer* container, const IWMPosition& Pos,
- vector<CMenuItem*>& items) = 0;
- virtual bool OnContainerCommand(IWMContainer* container, const IWMPosition& pos,
- TCmdID cmd) = 0;
- virtual ~IWindowManager() {};
- };
- ///////////////////////////////////////////////////////////////////////////////
- /// IWMContainer - interface of IWMContainer
- class IWMContainer
- {
- public:
- typedef Fl_Widget TChild;
- virtual void SetManager(IWindowManager* manager) = 0;
-
- virtual bool IsVacant(const IWMPosition& pos) = 0;
- virtual TChild* GetChild(const IWMPosition& pos) = 0;
- virtual bool Insert(TChild* child, const IWMPosition& pos) = 0;
- virtual bool Remove(const IWMPosition& pos) = 0;
- virtual bool Remove(TChild* child) = 0;
- virtual void RemoveAll() = 0;
-
- virtual void GetChildren(vector<TChild*>& children) = 0;
- virtual ~IWMContainer() {};
- };
- END_NCBI_SCOPE
- /*
- * ===========================================================================
- * $Log: wm_container.hpp,v $
- * Revision 1000.0 2004/04/12 18:27:40 gouriano
- * PRODUCTION: IMPORTED [CATCHUP_003] Dev-tree R1.1
- *
- * Revision 1.1 2004/02/04 19:40:05 yazhuk
- * Initial revision
- *
- * ===========================================================================
- */
- #endif // GUI_WIDGETS_WORKSPACE___WM_CONTAINER_HPP