paragraph.hpp

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

HPP
112
字号
/* * =========================================================================== * PRODUCTION $Log: paragraph.hpp,v $ * PRODUCTION Revision 1000.1  2004/04/12 19:35:16  gouriano * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.10 * PRODUCTION * =========================================================================== */#ifndef GUI_CORE_VIEW_TEXT___PARAGRAPH__HPP#define GUI_CORE_VIEW_TEXT___PARAGRAPH__HPP/* * =========================================================================== * *                            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:  Lou Friedman * * File Description: *    Header of the CPargarph class used to manage genbank *      paragraphs for editing. */#include <corelib/ncbiobj.hpp>#include <FL/Fl.H>#include <FL/Fl_Box.H>#include <FL/Fl_Pack.H>#include <serial/serialbase.hpp>#include <string>#include <memory>#include <objtools/format/text_ostream.hpp>#include <objtools/format/items/item.hpp>#include <objtools/format/formatter.hpp>BEGIN_NCBI_SCOPEclass CGenbankEntryForm;class CParagraph : public Fl_Box, public objects::IFlatTextOStream{public:    //CParagraph (const string& buffer, int font_size, Fl_Font font,    //            const CSerialObject* topic);    CParagraph(CConstRef<objects::IFlatItem> item,               CRef<objects::IFormatter> formatter);    void AddParagraph(const list<string>&  text, const CSerialObject* obj);    void SetFont(Fl_Font font) { labelfont(font); }    Fl_Font GetFont(void) const { return labelfont(); }    void SetFontSize(int size) { labelsize(size); }    int GetFontSize(void) const { return labelsize(); }        ~CParagraph ();    void Deselect ();    void Select ();    void DoubleClick ();    void EditCancled();    void EditSaved();    void SetSection (Fl_Pack* section) { m_section = section; }    int handle (int event);    string* buffer() {return &m_buffer;}    const CSerialObject* const topic () {return m_topic;};private:    static CParagraph*  m_CurrentSelection;        Fl_Pack*             m_section;    bool                 m_selected;    string               m_buffer;    CConstRef<CSerialObject>    m_topic;    auto_ptr<CGenbankEntryForm> m_EntryForm;    CConstRef<objects::IFlatItem>    m_Item;    CRef<objects::IFormatter>    m_Formatter;};END_NCBI_SCOPE#endif  // GUI_CORE_VIEW_TEXT___PRAGRAPH__HPP

⌨️ 快捷键说明

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