NCBI C++ ToolKit
phylo_pdf_grabber.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_PHYLO_TREE__PHYLO_PDF_GRABBER__HPP
2 #define GUI_WIDGETS_PHYLO_TREE__PHYLO_PDF_GRABBER__HPP
3 
4 /* $Id: phylo_pdf_grabber.hpp 29699 2014-01-30 19:10:19Z falkrb $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Bob Falk
30  *
31  * File Description:
32  *
33  * This is the subclass of IImageGrabber specialized to work with phylogenetic
34  * tree objects and to save those objects in pdf format.
35  */
36 
37 #include <corelib/ncbistd.hpp>
38 #include <gui/gui_export.h>
39 
41 
42 #include <util/image/image.hpp>
43 #include <gui/utils/vect2.hpp>
44 #include <gui/opengl/glrect.hpp>
45 #include <gui/opengl/glpane.hpp>
46 #include <gui/print/pdf.hpp>
47 
49 
50 #include <corelib/ncbiobj.hpp>
51 
53 
54 class CImage;
55 class CPhyloTreePane;
56 
58 {
59 public:
61 
62  virtual ~CPhyloPdfGrabber() {}
63 
64  virtual eCaptureResult GrabImages(int tex_size,
66 
67  void SaveTooltips(bool b) { m_SaveTooltips=b; }
68 
69 protected:
70  /// Called to setup values before image capturing starts.
71  void x_BeginCaptures(int buffer_size);
72  /// Called to restore values (in pane) when capturing stops.
73  void x_EndCaptures();
74 
75  /// Pane display canvas for the tree we are saving
77 
78  /// We change some rendering options. These are the previous
79  /// values used in m_Pane so we can set them back when were done.
83 
85 
86  /// Ratio scalers for the drawing area that maps to the images.
87  /// These are both 1.0 unless we are forcing the individual images
88  /// to a fixed proportion in which case the scale the underlying
89  /// image extent accordingly.
91 
92  /// If true, tooltips will be generated for the pdf as well
94 };
95 
96 
98 
99 #endif // GUI_WIDGETS_PHYLO_TREE__PHYLO_PDF_GRABBER__HPP
class CGlPane
Definition: glpane.hpp:62
CImage –.
Definition: Image.hpp:66
CPhyloTreeScheme::TLabelTruncation m_LabelsTruncated
void x_EndCaptures()
Called to restore values (in pane) when capturing stops.
void SaveTooltips(bool b)
virtual eCaptureResult GrabImages(int tex_size, IImageGrabberProgress *p=NULL)
Grab the requested images.
void x_BeginCaptures(int buffer_size)
Called to setup values before image capturing starts.
CGlPane m_PreviousGlPane
We change some rendering options.
CPhyloTreePane & m_Pane
Pane display canvas for the tree we are saving.
CVect2< float > m_ModelViewScaler
Ratio scalers for the drawing area that maps to the images.
bool m_SaveTooltips
If true, tooltips will be generated for the pdf as well.
CPhyloPdfGrabber(CPhyloTreePane &pane)
class CPhyloTreePane
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define NULL
Definition: ncbistd.hpp:225
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
Defines to provide correct exporting from DLLs in Windows.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
Modified on Wed Sep 04 15:05:34 2024 by modify_doxy.py rev. 669887