KiCad PCB EDA Suite
invoke_pl_editor_dialog.h
Go to the documentation of this file.
1 
5 /*
6  * This program source code file is part of KiCad, a free EDA CAD application.
7  *
8  * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
9  * Copyright (C) 2013 KiCad Developers, see change_log.txt for contributors.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, you may find one here:
23  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
24  * or you may search the http://www.gnu.org website for the version 2 license,
25  * or you may write to the Free Software Foundation, Inc.,
26  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
27  */
28 
29 // This header is an insolation layer between top most frames and any number of
30 // DIALOG classes which can be called from a frame window.
31 // It is a place to put invocation functions for [modal] dialogs, with benefits:
32 //
33 // 1) The information about each dialog class is not exposed to the frame.
34 // So therefore the DIALOG class can often be kept out of a header file entirely.
35 //
36 // 2) The information about the calling frame is not necessarily exposed to
37 // to the called dialog class, at least not in here.
38 
39 // The actual InvokeDialog<class>() function is usually coded at the bottom of the
40 // DIALOG_<class>.cpp file.
41 
42 
43 #ifndef INVOKE_PL_EDITOR_DIALOG_H_
44 #define INVOKE_PL_EDITOR_DIALOG_H_
45 
46 // Often this is not used in the prototypes, since wxFrame is good enough and would
47 // represent maximum information hiding.
48 class PL_EDITOR_FRAME;
49 class WORKSHEET_DATAITEM;
50 class wxPrintData;
51 class wxPageSetupDialogData;
52 
53 
57 
60 int InvokeDialogPrint( PL_EDITOR_FRAME* aCaller, wxPrintData* aPrintData,
61  wxPageSetupDialogData* aPageSetupData );
62 
65 int InvokeDialogPrintPreview( PL_EDITOR_FRAME* aCaller, wxPrintData* aPrintData );
66 
67 #endif // INVOKE_PL_EDITOR_DIALOG_H_
int InvokeDialogPrintPreview(PL_EDITOR_FRAME *aCaller, wxPrintData *aPrintData)
Create and show a print preview dialog returns 1 if OK, 0 , there is a problem.
int InvokeDialogPrint(PL_EDITOR_FRAME *aCaller, wxPrintData *aPrintData, wxPageSetupDialogData *aPageSetupData)
Create and show a print dialog returns 1 if OK, 0 , there is a problem.
int InvokeDialogNewItem(PL_EDITOR_FRAME *aCaller, WORKSHEET_DATAITEM *aItem)
Create and show DIALOG_NEW_DATAITEM and return whatever DIALOG_NEW_DATAITEM::ShowModal() returns...