28 #ifndef __ROUTEPRINTOUT_H__
29 #define __ROUTEPRINTOUT_H__
32 #include <wx/datetime.h>
33 #include <wx/cmdline.h>
36 #include <wx/msw/private.h>
39 #include "model/ocpn_types.h"
41 #include "printtable.h"
42 #include "ocpn_frame.h"
47 const wxString& title = _T(
"My Route printout" ));
48 virtual bool OnPrintPage(
int page);
49 void DrawPage(wxDC* dc);
50 virtual void OnPreparePrinting();
52 virtual bool HasPage(
int num) {
return num > 0 && num <= numberOfPages; };
54 virtual void GetPageInfo(
int* minPage,
int* maxPage,
int* selPageFrom,
61 std::vector<bool> toPrintOut;
63 static const int pN = 5;
74 #define ID_ROUTEPRINTSELECTION 9000
75 #define SYMBOL_ROUTEPRINT_SELECTION_STYLE \
76 wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX
77 #define SYMBOL_ROUTEPRINT_SELECTION_TITLE _("Print Route Selection")
78 #define SYMBOL_ROUTEPRINT_SELECTION_IDNAME ID_ROUTEPRINTSELECTION
79 #define SYMBOL_ROUTEPRINT_SELECTION_SIZE wxSize(750, 300)
80 #define SYMBOL_ROUTEPRINT_SELECTION_POSITION wxDefaultPosition
82 #define ID_ROUTEPRINT_SELECTION_OK 9001
83 #define ID_ROUTEPRINT_SELECTION_CANCEL 9002
93 wxWindow* parent,
Route* route,
94 wxWindowID
id = SYMBOL_ROUTEPRINT_SELECTION_IDNAME,
95 const wxString& caption = SYMBOL_ROUTEPRINT_SELECTION_TITLE,
96 const wxPoint& pos = SYMBOL_ROUTEPRINT_SELECTION_POSITION,
97 const wxSize& size = SYMBOL_ROUTEPRINT_SELECTION_SIZE,
98 long style = SYMBOL_ROUTEPRINT_SELECTION_STYLE);
102 bool Create(wxWindow* parent,
103 wxWindowID
id = SYMBOL_ROUTEPRINT_SELECTION_IDNAME,
104 const wxString& caption = SYMBOL_ROUTEPRINT_SELECTION_TITLE,
105 const wxPoint& pos = SYMBOL_ROUTEPRINT_SELECTION_POSITION,
106 const wxSize& size = SYMBOL_ROUTEPRINT_SELECTION_SIZE,
107 long style = SYMBOL_ROUTEPRINT_SELECTION_STYLE);
111 void SetColorScheme(ColorScheme cs);
112 void SetDialogTitle(
const wxString& title);
113 void OnRoutepropCancelClick(wxCommandEvent& event);
114 void OnRoutepropOkClick(wxCommandEvent& event);
117 static bool ShowToolTips();
119 wxButton* m_CancelButton;
120 wxButton* m_OKButton;
122 wxCheckBox* m_checkBoxWPName;
123 wxCheckBox* m_checkBoxWPPosition;
124 wxCheckBox* m_checkBoxWPCourse;
125 wxCheckBox* m_checkBoxWPDistanceToNext;
126 wxCheckBox* m_checkBoxWPDescription;
Extension of a class Table with printing into dc.
bool Create(wxWindow *parent, wxWindowID id=SYMBOL_ROUTEPRINT_SELECTION_IDNAME, const wxString &caption=SYMBOL_ROUTEPRINT_SELECTION_TITLE, const wxPoint &pos=SYMBOL_ROUTEPRINT_SELECTION_POSITION, const wxSize &size=SYMBOL_ROUTEPRINT_SELECTION_SIZE, long style=SYMBOL_ROUTEPRINT_SELECTION_STYLE)