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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_WX___PREVIEW_SETUP_DLG_WX__HPP
2 #define GUI_WIDGETS_WX___PREVIEW_SETUP_DLG_WX__HPP
3 
4 /* $Id: preview_setup_dlg.hpp 33050 2015-05-19 16:06:18Z 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:
30  *
31  * File Description:
32  *
33  */
34 
35 #include <corelib/ncbistd.hpp>
36 #include <gui/gui_export.h>
37 #include <gui/utils/vect2.hpp>
38 
39 #include <util/image/image.hpp>
40 
41 #include <wx/defs.h>
42 
43 #include <wx/dialog.h>
44 #include <wx/cmndata.h>
45 #include <wx/prntbase.h>
46 #include <wx/printdlg.h>
47 #include <wx/listctrl.h>
48 
49 class wxTextCtrl;
50 class wxButton;
51 class wxCheckBox;
52 class wxComboBox;
53 class wxStaticText;
54 class wxRadioBox;
55 class wxSlider;
56 class wxPageSetupData;
57 class wxBoxSizer;
58 
60 
62 class CImage;
63 
64 class NCBI_GUIWIDGETS_WX_EXPORT CPreviewSetupDlg : public wxPageSetupDialogBase
65 {
66 public:
68  ePageCountSliderID = wxID_HIGHEST + 100,
74 
82 
87 
94 
95  eLastPreviewSetupID
96  };
97 
98 public:
100  bool add_preview_button,
101  wxWindow *parent = NULL);
102 
103  virtual ~CPreviewSetupDlg();
104 
105  virtual bool TransferDataFromWindow();
106  virtual bool TransferDataToWindow();
107 
108  /// Enable/disable zoom in x && y
109  void SetZoomBehavior(bool zoomx, bool zoomy);
110  bool GetZoomX() const;
111  bool GetZoomY() const;
112 
113  /// @name wxWidgets events implementation
114  /// @{
115  virtual void OnPrinter(wxCommandEvent& event);
116  virtual void OnScroll(wxScrollEvent& event);
117  virtual void OnMultiPage(wxCommandEvent& event);
118  virtual void OnGuides(wxCommandEvent& event);
119  /// @}
120 
121  //int GetTargetImageWidth() const { return m_ImageWidthX; }
122  //int GetTargetImageHeight() const { return m_ImageWidthY; }
123 
124  virtual void UpdateMargins();
125 
126  /// Required as a subclass of wxPageSetupDialogBase. Maybe I shouldn't derive
127  /// from that since I also want to have a save-images subclass...
128  virtual wxPageSetupDialogData& GetPageSetupDialogData() { return m_psdd; }
129 
130  /// Get the number of image partitions in x and y
131  CVect2<int> GetPartitions() const;
132 
133 protected:
134 
135  wxPageSetupDialogData m_psdd;
136  /// Layout all controls owned by this class
137  void x_InitDialog(CRef<CImage> img);
138 
139  /// Provide virtual hook for subclasses to add their own controls below
140  /// the main controls.
141  virtual void x_Init(wxBoxSizer* /*mainsizer*/, int /*widget_width*/) {}
142 
143  wxButton* m_PrinterButton;
144  wxRadioBox* m_MultiPageRadioBox;
145  wxRadioBox* m_GuidesRadioBox;
146  wxSlider* m_PageCountSlider;
147  wxStaticText* m_PageCount;
148 
150 
152 
153 private:
154  DECLARE_EVENT_TABLE()
155  DECLARE_DYNAMIC_CLASS_NO_COPY(CPreviewSetupDlg)
156 };
157 
158 
160 
161 #endif // GUI_WIDGETS_WX___PREVIEW_SETUP_DLG_WX__HPP
162 
CImage –.
Definition: Image.hpp:66
wxPageSetupDialogData m_psdd
wxRadioBox * m_MultiPageRadioBox
wxStaticText * m_PageCount
wxSlider * m_PageCountSlider
CGlPreviewSetupWidget * m_PreviewSetupWidget
virtual void x_Init(wxBoxSizer *, int)
Provide virtual hook for subclasses to add their own controls below the main controls.
virtual wxPageSetupDialogData & GetPageSetupDialogData()
Required as a subclass of wxPageSetupDialogBase.
wxRadioBox * m_GuidesRadioBox
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
#define NCBI_GUIWIDGETS_WX_EXPORT
Definition: gui_export.h:543
Defines to provide correct exporting from DLLs in Windows.
Modified on Fri Sep 20 14:57:30 2024 by modify_doxy.py rev. 669887