menu_demo.hpp

来自「ncbi源码」· HPP 代码 · 共 143 行

HPP
143
字号
/* * =========================================================================== * PRODUCTION $Log: menu_demo.hpp,v $ * PRODUCTION Revision 1000.0  2004/06/01 21:30:44  gouriano * PRODUCTION PRODUCTION: IMPORTED [GCC34_MSVC7] Dev-tree R1.3 * PRODUCTION * =========================================================================== */#ifndef GUI_WIDGETS_FL_DEMO___TT_DEMO_UI__HPP#define GUI_WIDGETS_FL_DEMO___TT_DEMO_UI__HPP/*  $Id: menu_demo.hpp,v 1000.0 2004/06/01 21:30:44 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/fl/diag_panel.hpp>#include <gui/widgets/fl/menu_window.hpp>#include <gui/utils/dialog.hpp>#include <gui/utils/gui_event.hpp>#include <FL/Fl.H>#include <FL/Fl_Double_Window.H>#include <FL/Fl_Text_Buffer.H>BEGIN_NCBI_SCOPE///////////////////////////////////////////////////////////////////////////////////class   CMenuDemoClient : public CDiagPanel,                          public CCommandTarget{public:    CMenuDemoClient(int x, int y, int w, int h);    virtual int     handle(int event);    void    PostMessage(const char* message);        void    OnZoomIn();    void    OnZoomOut();    void    OnZoomAll();    void    OnZoomSel();    void    OnFirst();    void    OnSecond();    void    OnThird();    void    OnUpdateFirst(ICmdUI* pCmdUI);    void    OnUpdateSecond(ICmdUI* pCmdUI);    void    OnUpdateThird(ICmdUI* pCmdUI);    /// these handlers handle command range eCmdRadioA...eCmdRadioC    void    OnRadio(TCmdID cmd);    void    OnUpdateRadio(ICmdUI* pCmdUI);        void    OnCheck1();    void    OnCheck2();    void    OnUpdateCheck1(ICmdUI* pCmdUI);    void    OnUpdateCheck2(ICmdUI* pCmdUI);    DECLARE_CMD_MAP();protected:      CGUIEvent   m_Event;      int     m_Index; // for eCmdFirst, eCmdSecond, eCmdThird    char    m_Radio;    bool    m_Check1;    bool    m_Check2;};///////////////////////////////////////////////////////////////////////////////////class   CMenuDemoWindow : public    CDialog{public:    CMenuDemoWindow();    ~CMenuDemoWindow();    Fl_Double_Window*     x_CreateWindow();        protected:    CMenuBar1       *m_MenuBar;    CMenuBar1       *m_ToolBar;    CMenuDemoClient *m_Client;};END_NCBI_SCOPE/* * =========================================================================== * $Log: menu_demo.hpp,v $ * Revision 1000.0  2004/06/01 21:30:44  gouriano * PRODUCTION: IMPORTED [GCC34_MSVC7] Dev-tree R1.3 * * Revision 1.3  2004/05/13 18:00:17  yazhuk * Replaced CDiagPanel1 with CDiagPanel * * Revision 1.2  2004/05/03 19:52:37  yazhuk * Added command handlers and update handlers * * Revision 1.1  2004/04/22 17:05:11  yazhuk * Initial revision * * =========================================================================== */#endif  // GUI_WIDGETS_FL_DEMO___TT_DEMO_UI__HPP

⌨️ 快捷键说明

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