sort_menu.hpp
来自「ncbi源码」· HPP 代码 · 共 140 行
HPP
140 行
/* * =========================================================================== * PRODUCTION $Log: sort_menu.hpp,v $ * PRODUCTION Revision 1000.0 2003/10/31 21:58:18 gouriano * PRODUCTION PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.7 * PRODUCTION * =========================================================================== */#ifndef GUI_CORE_VIEW_TABLE___SORT_MENU__HPP#define GUI_CORE_VIEW_TABLE___SORT_MENU__HPP/* $Id: sort_menu.hpp,v 1000.0 2003/10/31 21:58:18 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: * Dynamic menu manager for sorting a table by columns. */#include <gui/utils/fltk_utils.hpp>#include "feat_table.hpp"BEGIN_NCBI_SCOPE//// CSortMenuProxy does the grunt work of calling SortByCols() on a table.//class CSortMenuProxy : public CObject{public: CSortMenuProxy(CFeatTable* table, int col) : m_Table(table) , m_Col(col) {} virtual ~CSortMenuProxy() {} void DoCallback() { if ( !m_Table ) { return; } //FIXME: m_Table->SortByCol(m_Col); m_Table->redraw(); }private: CFeatTable* m_Table; int m_Col;};//// class CSortMenuMgr manages a dynamic menu for sorting a table based on the// contents of its columns.//class CSortMenuMgr : public CFltkMenuMgrBase<CSortMenuProxy>{public: CSortMenuMgr(Fl_Menu_* menu, const string& base); // Clear our managed sub-menus void Clear(); // add a menu to enable users to sort based on a set of columns. Note that // not all columns need be visible! void AddSortMenu(CFeatTable* table);protected:};END_NCBI_SCOPE#endif // GUI_CORE_VIEW_TABLE___SORT_MENU__HPP/* * =========================================================================== * $Log: sort_menu.hpp,v $ * Revision 1000.0 2003/10/31 21:58:18 gouriano * PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.7 * * Revision 1.7 2003/07/28 11:51:49 dicuccio * Rewrote CTablePanel<> to be more flexible and better contained. Added standard * multicolumn list dialog. Deprecated use of COutputDlg. * * Revision 1.6 2003/07/21 19:34:22 dicuccio * Changed data class interface from Run to DoCallback() - more descriptive * * Revision 1.5 2003/03/21 17:13:59 dicuccio * Moved fltk_utils --> gui/utils * * Revision 1.4 2003/02/26 17:53:31 dicuccio * Cleaned up the dynamic menus to make the dynamic menus resistant to menu * refreshes while the menu callback is running * * Revision 1.3 2003/01/13 13:10:09 dicuccio * Namespace clean-up. Retired namespace gui -> converted all to namespace ncbi. * Moved all FLUID-generated code into namespace ncbi. * * Revision 1.2 2003/01/08 15:33:33 dicuccio * Fixed compilation error in MSVC * * Revision 1.1 2003/01/08 14:58:47 dicuccio * Major overhaul. Added column selection dialog to base class - moved out of * this class. Added ability to sort columns based on menu selections. Added * ability to filter features based on a wide range of criteria. * * =========================================================================== */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?