⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 list_mvc.hpp

📁 ncbi源码
💻 HPP
字号:
/* * =========================================================================== * PRODUCTION $Log: list_mvc.hpp,v $ * PRODUCTION Revision 1000.1  2004/04/12 18:16:11  gouriano * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.11 * PRODUCTION * =========================================================================== */#ifndef GUI_WIDGETS_ALN_MULTIPLE___LIST_MVC__HPP#define GUI_WIDGETS_ALN_MULTIPLE___LIST_MVC__HPP/*  $Id: list_mvc.hpp,v 1000.1 2004/04/12 18:16:11 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/ncbistl.hpp>#include <corelib/ncbistd.hpp>BEGIN_NCBI_SCOPEtemplate <class Item> class ISelListView;///////////////////////////////////////////////////////////////////////////////////  interface ISelListModeltemplate <class Item> class ISelListModel{public:    typedef Item    TItem;    typedef int     TIndex;    typedef vector<TIndex>   TIndexVector;    virtual ~ISelListModel() {}    virtual TIndex     SLM_GetItemsCount() const = 0;    virtual TItem   SLM_GetItem(TIndex index) const = 0;        virtual TIndex  SLM_GetFocusedItemIndex() const = 0;    virtual bool    SLM_IsItemSelected(TIndex index) const = 0;    virtual TIndex  SLM_GetSelectedCount() const = 0;    virtual void    SLM_GetSelectedIndices(TIndexVector& vIndices) const = 0;    virtual void    SLM_FocusItem(TIndex index) = 0;        virtual void    SLM_SelectSingleItem(TIndex index) = 0;        virtual void    SLM_InvertSingleItem(TIndex index) = 0;        virtual void    SLM_SelectItems(const TIndexVector& vIndices,                                     bool b_reset_others = false) = 0;    virtual void    SLM_SelectAll(bool bSelect = true) = 0;    virtual void    SLM_SelectTo(TIndex index) = 0;        virtual void    SLM_AddSLView(ISelListView<Item>* pView) = 0;    virtual void    SLM_RemoveSLView(ISelListView<Item>* pView) = 0;};///////////////////////////////////////////////////////////////////////////////////  interface ISelListViewtemplate <class Item>   class ISelListView{public:    typedef ISelListModel<Item>                  TSelListModel;    typedef typename TSelListModel::TIndexVector TIndexVector;        virtual ~ISelListView() {}    virtual void  SLV_SetModel(TSelListModel* pModel) = 0;    virtual void  SLV_UpdateRange(int iFirstItem, int iLastItem) = 0;     virtual void  SLV_UpdateItems(const TIndexVector& vIndices) = 0;    };END_NCBI_SCOPE/* * =========================================================================== * $Log: list_mvc.hpp,v $ * Revision 1000.1  2004/04/12 18:16:11  gouriano * PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.11 * * Revision 1.11  2004/04/02 16:23:34  yazhuk * Added bool b_reset_others to SLM_SelectItems() function * > * * Revision 1.10  2003/12/19 04:34:17  ucko * Add an explicit "typename" modifier for increased portability. * * Revision 1.9  2003/12/18 21:18:15  yazhuk * Converted classes to templates * * Revision 1.8  2003/12/10 17:02:28  yazhuk * Added "bool b_keep_selection " argument to CSelListModelImpl::SetItems(). * * Revision 1.7  2003/10/29 23:37:41  yazhuk * Refactoring * * Revision 1.6  2003/09/23 20:46:21  yazhuk * Modified #include-s * * Revision 1.5  2003/09/16 14:37:13  dicuccio * Cleaned up and clarified export specifiers - added a new specifier for each * library * * Revision 1.4  2003/09/12 12:59:14  dicuccio * Added export specifiers.  Inlined virtual dtors for interface classes * * Revision 1.3  2003/09/08 16:27:08  yazhuk * Added const modifiers, InsertItem() and DeleteItem() functions * * Revision 1.2  2003/09/02 16:52:21  yazhuk * GCC compilation fixes * * Revision 1.1  2003/08/28 18:22:45  yazhuk * Initial revision * * =========================================================================== */#endif  // GUI_WIDGETS_ALN_MULTIPLE___LIST_MVC__HPP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -