summaryrefslogtreecommitdiff
path: root/support/dktools/Dk4FcsFrame.h
blob: 6c3f391e9a3a02e467cc6c238ffce945d9d33d2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
/*
Copyright (C) 2015-2020, Dirk Krause
SPDX-License-Identifier: BSD-3-Clause
*/

/*
	WARNING: This file was generated by the dkct program (see
	http://dktools.sourceforge.net/ for details).
	Changes you make here will be lost if dkct is run again!
	You should modify the original source and run dkct on it.
	Original source: Dk4FcsFrame.wxc
*/

/**	@file Dk4FcsFrame.h Header file for the Dk4FcsFrame module.
*/

#ifndef DK4FCSFRAME_H_INCLUDED
/** Avoid multiple inclusions. */
#define DK4FCSFRAME_H_INCLUDED 1


#line 112 "Dk4FcsFrame.wxc"




#line 116 "Dk4FcsFrame.wxc"
class Dk4FcsFrame : public Dk4WxFrame
{
  private:

    /**	Event table for frame.
    */
#if	wxCHECK_VERSION(3,0,0)
    wxDECLARE_EVENT_TABLE();
#else
    DECLARE_EVENT_TABLE()
#endif

  protected:

    /**	Autostart controller.
    */
    Dk4WxAutostartController	oAsc;

    /**	Localized texts.
    */
    wxChar const * const	*sTexts;

    /**	Non-localized texts.
    */
    wxChar const * const	*sNlWx;

    /**	Non-localized texts.
    */
    dkChar const * const	*sNlDk;

    /**	File name to process.
    */
    wxString			sFileName;

    /**	Default directory.
    */
    wxString			sDirectory;

    /**	Flag: Active (responding to idle events).
    */
    bool			 bActive;

    /**	Flag: GUI ok.
    */
    bool dkctGUILayoutOK;

    /**	Contents panel.
    */
    wxPanel *dkctGUIContentsPanel;

    /**	GUI element mainSizer.
    */
#line 57 "Dk4FcsFrame.wxc"
    wxBoxSizer *mainSizer;

    /**	GUI element mbMain.
    */
#line 23 "Dk4FcsFrame.wxc"
    wxMenuBar *mbMain;

    /**	GUI element menuFile.
    */
#line 27 "Dk4FcsFrame.wxc"
    wxMenu *menuFile;

    /**	GUI element menuHelp.
    */
#line 42 "Dk4FcsFrame.wxc"
    wxMenu *menuHelp;

    /**	GUI element miFileOpen.
    */
#line 32 "Dk4FcsFrame.wxc"
    wxMenuItem *miFileOpen;

    /**	GUI element miFileExit.
    */
#line 37 "Dk4FcsFrame.wxc"
    wxMenuItem *miFileExit;

    /**	GUI element miHelpAbout.
    */
#line 47 "Dk4FcsFrame.wxc"
    wxMenuItem *miHelpAbout;

    /**	GUI element miHelpContents.
    */
#line 52 "Dk4FcsFrame.wxc"
    wxMenuItem *miHelpContents;

    /**	GUI element verticalSizer.
    */
#line 65 "Dk4FcsFrame.wxc"
    wxBoxSizer *verticalSizer;

    /**	GUI element contentsSizer.
    */
#line 73 "Dk4FcsFrame.wxc"
    wxGridBagSizer *contentsSizer;

    /**	GUI element lFile.
    */
#line 83 "Dk4FcsFrame.wxc"
    wxStaticText *lFile;

    /**	GUI element tFile.
    */
#line 86 "Dk4FcsFrame.wxc"
    wxStaticText *tFile;

    /**	GUI element gResults.
    */
#line 89 "Dk4FcsFrame.wxc"
    wxGrid *gResults;


#line 159 "Dk4FcsFrame.wxc"

  public:

    /**	Constructor.
	@param	wxid			Window ID.
	@param	applicationHelper	Application helper object.
	@param	hc			Help controller for online help.
	@param	argc			Number of command line arguments.
	@param	argv			Command line arguments array.
	@param	localizedTexts		Localized wxChar texts.
	@param	nlWx			Non-localized wxChar texts.
	@param	nlDk			Non-localized dkChar texts.
    */
    Dk4FcsFrame(
      int			  wxid,
      Dk4WxApplicationHelper	 *applicationHelper,
      Dk4WxHelpController	 *hc,
      int			  argc,
      wxChar			**argv,
      wxChar const * const	 *localizedTexts,
      wxChar const * const	 *nlWx,
      dkChar const * const	 *nlDk
    );

    /**	Destructor.
    */
    ~Dk4FcsFrame();

    /**	Check whether we can close the window.
    	@param	isFinal	Flag: Last main window to close.
    */
    bool
    CanClose(bool isFinal);

    /**	Open a file and create checksums for it.
	@param	event	Event to process.
    */
    void
    OnOpen(wxCommandEvent & event);

    /**	Handler for File/Exit.
    	@param	event	Event to process.
    */
    void
    OnQuit(wxCommandEvent & event);

    /**	Handler for Help/About.
    	@param	event	Event to process.
    */
    void
    OnAbout(wxCommandEvent & event);

    /**	Handler for Help/Contents.
    	@param	event	Event to process.
    */
    void
    OnHelpContents(wxCommandEvent & event);

    /**	Handler for idle events.
    */
    void
    OnIdle(wxIdleEvent & event);

    /*	Event handlers for further events.
    */

    /*	Further methods.
    */
  private:

    /**	Convert  binary data to hex notation and set grid cell.
	@param	rowno	Row number in table.
	@param	buf	Buffer containing binary data.
	@param	bytes	Number of bytes in buffer.
    */
    void
    SetCellValueBinary(
      int		 rowno,
      unsigned char	*buf,
      size_t		 bytes
    );

    /**	Produce checksums.
    */
    bool
    RunChecksumming(void);
};


#line 248 "Dk4FcsFrame.wxc"


#endif