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

📄 scroll_widget.hpp

📁 ncbi源码
💻 HPP
字号:
/* * =========================================================================== * PRODUCTION $Log: scroll_widget.hpp,v $ * PRODUCTION Revision 1000.1  2004/06/01 19:48:30  gouriano * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.7 * PRODUCTION * =========================================================================== */#ifndef GUI_GRAPH___SCROLL_WIDGET__HPP#define GUI_GRAPH___SCROLL_WIDGET__HPP/*  $Id: scroll_widget.hpp,v 1000.1 2004/06/01 19:48:30 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/gui.hpp>#include <FL/Fl_Group.H>#include <FL/Fl_Scrollbar.H>/** @addtogroup GUI_GRAPH * * @{ */BEGIN_NCBI_SCOPE/////////////////////////////////////////////////////////////////////////////////// class IScrollContainerclass IScrollContainer{public:    virtual ~IScrollContainer() {}    virtual void SetValuesX(int Pos, int Page, int Min, int Max) = 0;    virtual void SetValuesY(int Pos, int Page, int Min, int Max) = 0;        /*virtual void SetPosX(int pos) = 0;    virtual void SetPageSizeX(int Size) = 0;    virtual void SetScrollRangeX(int Start, int End) = 0;        virtual void SetPosY(int pos) = 0;    virtual void SetPageSizeY(int S) = 0;    virtual void SetScrollRangeY(int Start, int End) = 0;*/};/////////////////////////////////////////////////////////////////////////////////// class IScrollableWidgetclass IScrollableWidget{public:    virtual ~IScrollableWidget() {}    virtual void SetContainer(IScrollContainer* pCont) = 0;    virtual void OnScrollX(Fl_Scrollbar* pBar) = 0;    virtual void OnScrollY(Fl_Scrollbar* pBar) = 0;};///////////////////////////////////////////////////////////////////////////////////class NCBI_GUIGRAPH_EXPORT CScrollWidget : public Fl_Group, public IScrollContainer{public:    CScrollWidget(int x, int y, int w, int h);    virtual ~CScrollWidget();    void    SetScrollableWidget(IScrollableWidget* pScW);    // IScrollContainer implementaion    virtual void SetValuesX(int Pos, int Page, int Min, int Max);    virtual void SetValuesY(int Pos, int Page, int Min, int Max);        /*virtual void SetPosX(int pos);    virtual void SetPageSizeX(int pos);    virtual void SetScrollRangeX(int Start, int End);        virtual void SetPosY(int pos);    virtual void SetPageSizeY(int pos);    virtual void SetScrollRangeY(int Start, int End);*/protected:    // scrollbar callbacks    static void x_OnScrollX(Fl_Widget*, void* pData);    static void x_OnScrollY(Fl_Widget*, void* pData);protected:        Fl_Scrollbar *m_pScrollX;    Fl_Scrollbar *m_pScrollY;        IScrollableWidget *m_pScWidget;};END_NCBI_SCOPE/* * =========================================================================== * $Log: scroll_widget.hpp,v $ * Revision 1000.1  2004/06/01 19:48:30  gouriano * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.7 * * Revision 1.7  2004/05/11 18:54:43  dicuccio * Added doxygen modules info * * Revision 1.6  2004/05/03 12:43:07  dicuccio * Added #include for gui/gui.hpp * * Revision 1.5  2003/09/23 19:18:35  yazhuk * Restored deleted file * * Revision 1.3  2003/09/04 13:58:42  dicuccio * Added export specifiers.  Inlined destructors of interface classes * * Revision 1.2  2003/08/11 16:08:26  yazhuk * Compilation fixes for GCC. * * Revision 1.1  2003/08/08 16:01:35  yazhuk * Initial revision. * * =========================================================================== */#endif

⌨️ 快捷键说明

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