1 ////////////////////////////////////////////////////////////////////
2 // $Id: wxdialog.h 14080 2021-01-21 18:10:40Z vruppert $
3 ////////////////////////////////////////////////////////////////////
4 //
5 //  Copyright (C) 2002-2021  The Bochs Project
6 //
7 //  This library is free software; you can redistribute it and/or
8 //  modify it under the terms of the GNU Lesser General Public
9 //  License as published by the Free Software Foundation; either
10 //  version 2 of the License, or (at your option) any later version.
11 //
12 //  This library is distributed in the hope that it will be useful,
13 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 //  Lesser General Public License for more details.
16 //
17 //  You should have received a copy of the GNU Lesser General Public
18 //  License along with this library; if not, write to the Free Software
19 //  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
20 //
21 /////////////////////////////////////////////////////////////////
22 
23 // wxWidgets dialogs for Bochs
24 
25 #include <wx/spinctrl.h>
26 #include <wx/notebook.h>
27 
28 ////////////////////////////////////////////////////////////////////
29 // text messages used in several places
30 ////////////////////////////////////////////////////////////////////
31 #define MSG_NO_HELP wxT("No help is available yet.")
32 #define MSG_NO_HELP_CAPTION wxT("No help")
33 #define BTNLABEL_HELP wxT("Help")
34 #define BTNLABEL_CANCEL wxT("Cancel")
35 #define BTNLABEL_OK wxT("Ok")
36 #define BTNLABEL_CLOSE wxT("Close")
37 #define BTNLABEL_CREATE_IMG wxT("Create Image")
38 #define BTNLABEL_BROWSE wxT("<--Browse")
39 
40 #if defined(WIN32)
41 // On win32, apparantly the spinctrl depends on a native control which only
42 // has a 16bit signed value.  If you try to set the max above 32767, it
43 // overflows and does stupid things.
44 #define SPINCTRL_FIX_MAX(x) ((x)>32767 ? 32767 : (x))
45 #else
46 #define SPINCTRL_FIX_MAX(x) x
47 #endif
48 
49 // utility function prototype
50 void ChangeStaticText(wxSizer *sizer, wxStaticText *win, wxString newtext);
51 bool CreateImage(int harddisk, int sectors, const char *filename);
52 void SetTextCtrl(wxTextCtrl *text, const char *format, int val);
53 int GetTextCtrlInt(wxTextCtrl *text, bool *valid = NULL, bool complain=false, wxString complaint = wxT("Invalid integer!"));
54 bool BrowseTextCtrl(wxTextCtrl *text,
55     wxString prompt= wxT("Choose a file"),
56     long style=wxFD_OPEN);
57 wxChoice *makeLogOptionChoiceBox(wxWindow *parent, wxWindowID id, int evtype, bool includeNoChange = false);
58 
59 ////////////////////////////////////////////////////////////////////
60 // LogMsgAskDialog is a modal dialog box that shows the user a
61 // simulation error message and asks if they want to continue or
62 // not.  It looks something like this:
63 //
64 // +----- PANIC ---------------------------------------------------+
65 // |                                                               |
66 // | Context: Hard Drive                                           |
67 // | Message: could not open hard drive image file '30M.sample'    |
68 // |                                                               |
69 // |      [ ] Don't ask about future messages like this            |
70 // |                                                               |
71 // |     [Continue]   [Die]  [Dump Core]  [Debugger]   [Help]      |
72 // +---------------------------------------------------------------+
73 //
74 // To use this dialog:
75 // After constructor, use SetContext, SetMessage, EnableButton to
76 // determine what will be displayed.  Then call n = ShowModal().  The return
77 // value tells which button was pressed (button_t types).  Call GetDontAsk()
78 // to see if they checked "Don't ask about..." or not.
79 //////////////////////////////////////////////////////////////////////
80 
81 class LogMsgAskDialog: public wxDialog
82 {
83 public:
84   enum button_t {
85     CONT=0, DIE, DUMP, DEBUG, HELP,
86     N_BUTTONS /* number of entries in enum */
87   };
88 #define LOG_MSG_ASK_IDS \
89   { ID_Continue, ID_Die, ID_DumpCore, ID_Debugger, wxHELP }
90 #define LOG_MSG_ASK_NAMES \
91   { wxT("Continue"), wxT("Kill Sim"), wxT("Dump Core"), wxT("Debugger"), wxT("Help") }
92 #define LOG_MSG_DONT_ASK_STRING \
93   wxT("Don't ask about future messages like this")
94 #define LOG_MSG_CONTEXT wxT("Context: ")
95 #define LOG_MSG_MSG wxT("Message: ")
96 private:
97   wxStaticText *context, *message;
98   wxCheckBox *dontAsk;
99   bool enabled[N_BUTTONS];
100   wxBoxSizer *btnSizer, *vertSizer;
101   void Init();  // called automatically by ShowModal()
102   void ShowHelp();
103 public:
104   LogMsgAskDialog(wxWindow* parent,
105       wxWindowID id,
106       const wxString& title);
EnableButton(button_t btn,bool en)107   void EnableButton(button_t btn, bool en) { enabled[(int)btn] = en; }
108   void SetContext(wxString s);
109   void SetMessage(wxString s);
GetDontAsk()110   bool GetDontAsk() { return dontAsk->GetValue(); }
111   void OnEvent(wxCommandEvent& event);
ShowModal()112   int ShowModal() { Init(); return wxDialog::ShowModal(); }
113 DECLARE_EVENT_TABLE()
114 };
115 
116 ////////////////////////////////////////////////////////////////////////////
117 // AdvancedLogOptionsDialog
118 ////////////////////////////////////////////////////////////////////////////
119 // +---- Advanced event configuration -----------------------+
120 // |                                                         |
121 // | Log file is [_____________________________]  [ Browse ] |
122 // |                                                         |
123 // | This table determines how Bochs will respond to each    |
124 // | kind of event coming from a particular source.  For     |
125 // | example if you are having problems with the keyboard,   |
126 // | you could ask for debug and info events from the        |
127 // | keyboard to be reported.                                |
128 // |                                                         |
129 // |                        [Use defaults for all devices]   |
130 // |                                                         |
131 // | +---------------------------------------------------+-+ |
132 // | |Device    Debug     Info      Error      Panic     |^| |
133 // | |--------  --------  -------   --------   --------- ||| |
134 // | |Keyboard  [ignore]  [ignore]  [report]   [report]  ||| |
135 // | |VGA       [ignore]  [ignore]  [report]   [report]  ||| |
136 // | |NE2000    [ignore]  [ignore]  [report]   [report]  ||| |
137 // | |Sound     [ignore]  [ignore]  [report]   [report]  |v| |
138 // | +-----------------------------------------------------+ |
139 // |                                                         |
140 // |                              [ Help ] [ Cancel ] [ Ok ] |
141 // +-------------------------------------------------------+-+
142 //
143 class AdvancedLogOptionsDialog: public wxDialog
144 {
145 private:
146 #define ADVLOG_OPTS_TITLE wxT("Configure Log Events")
147 #define ADVLOG_OPTS_LOGFILE wxT("Log file")
148 #define ADVLOG_OPTS_PROMPT wxT(                                               \
149 "This table determines how Bochs will respond to each kind of event coming\n" \
150 "from a particular source.  For example if you are having problems with\n"    \
151 "the keyboard, you could ask for debug and info events from the keyboard\n"   \
152 "to be reported.")
153 #define ADVLOG_OPTS_TYPE_NAMES { wxT("Debug"), wxT("Info"), wxT("Error"), wxT("Panic") }
154 #define ADVLOG_OPTS_N_TYPES 4
155 #define ADVLOG_DEFAULTS wxT("Use defaults for all devices")
156   void Init();  // called automatically by ShowModal()
157   void ShowHelp();
158   wxBoxSizer *vertSizer, *logfileSizer, *buttonSizer;
159   wxScrolledWindow *scrollWin;
160   wxPanel *scrollPanel;
161   wxGridSizer *headerSizer, *gridSizer;
162   wxTextCtrl *logfile;
163   wxButton *applyDefault;
164   // 2d array of wxChoice pointers. Each wxChoice* is action[dev][type].
165   wxChoice*  **action;
166   bool runtime;
167 public:
168   AdvancedLogOptionsDialog(wxWindow* parent, wxWindowID id);
169   ~AdvancedLogOptionsDialog();
170   void OnEvent(wxCommandEvent& event);
ShowModal()171   int ShowModal() { Init(); return wxDialog::ShowModal(); }
SetLogfile(wxString f)172   void SetLogfile(wxString f) { logfile->SetValue(f); }
GetLogfile()173   wxString GetLogfile() { return logfile->GetValue(); }
174   void CopyParamToGui();
175   void CopyGuiToParam();
176   void SetAction(int dev, int evtype, int act);
177   int GetAction(int dev, int evtype);
SetRuntimeFlag(bool val)178   void SetRuntimeFlag(bool val) { runtime = val; }
179 DECLARE_EVENT_TABLE()
180 };
181 
182 ////////////////////////////////////////////////////////////////////////////
183 // PluginControlDialog
184 ////////////////////////////////////////////////////////////////////////////
185 class PluginControlDialog: public wxDialog
186 {
187 private:
188   void Init();  // called automatically by ShowModal()
189   void ShowHelp();
190   wxBoxSizer *vertSizer, *horzSizer, *buttonSizer;
191   wxBoxSizer *leftSizer, *centerSizer, *rightSizer;
192   wxStaticText *plugtxt1, *plugtxt2;
193   wxListBox *pluglist1, *pluglist2;
194   wxButton *btn_load, *btn_unload;
195 public:
196   PluginControlDialog(wxWindow* parent, wxWindowID id);
~PluginControlDialog()197   ~PluginControlDialog() {}
198   void OnEvent(wxCommandEvent& event);
ShowModal()199   int ShowModal() { Init(); return wxDialog::ShowModal(); }
200 DECLARE_EVENT_TABLE()
201 };
202 
203 ////////////////////////////////////////////////////////////////////////////
204 // LogViewDialog
205 ////////////////////////////////////////////////////////////////////////////
206 class LogViewDialog: public wxDialog
207 {
208 private:
209   wxBoxSizer *mainSizer, *logSizer, *buttonSizer;
210   wxTextCtrl *log;
211   Bit32u lengthMax;
212   Bit32u lengthTolerance;
213 #define LOG_VIEW_DEFAULT_LENGTH_MAX (400*80)
214 #define LOG_VIEW_DEFAULT_TOLERANCE (200*80)
215   void CheckLogLength();
216 public:
217   LogViewDialog(wxWindow* parent, wxWindowID id);
~LogViewDialog()218   ~LogViewDialog() {}
219   void Init();
220   bool Show(bool val);
221   void AppendText(int level, wxString msg);
222   void OnEvent(wxCommandEvent& event);
223 DECLARE_EVENT_TABLE()
224 };
225 
226 ////////////////////////////////////////////////////////////////////////////
227 // ParamDialog is a general purpose dialog box that displays and edits
228 // any combination of parameters.  It's always made up of a
229 // wxFlexGridSizer with three columns.  Each parameter takes up one row.
230 // Column 1 shows the name of the parameter, column 2 shows the value of
231 // the parameter in some sort of control that can be edited.  Column 3
232 // is used for anything that needs to appear to the right of the data, for
233 // example a Browse button on a filename control.  Several buttons including
234 // Cancel and Ok will appear at the bottom.
235 //
236 // This will allow editing of all the miscellaneous parameters which do
237 // not need to be laid out by hand.
238 //
239 // NOTES:
240 // Right now, there is always one wxFlexGridSizer with three columns
241 // where the fields go.  It is possible to create a new wxFlexGridSizer
242 // and make that one the default.  This is used when handling a bx_list_c
243 // parameter.
244 ////////////////////////////////////////////////////////////////////////////
245 
246 struct ParamStruct : public wxObject {
247   bx_param_c *param;
248   int id;
249   wxStaticText *label;
250   union _u_tag {
251     void *ptr;
252     wxWindow *window;
253     wxChoice *choice;
254     wxTextCtrl *text;
255     wxSpinCtrl *spin;
256     wxCheckBox *checkbox;
257     wxStaticBox *staticbox;
258     wxNotebook *notebook;
259   } u;
260   int browseButtonId;  // only for filename params
261   wxButton *browseButton;  // only for filename params
ParamStructParamStruct262   ParamStruct() { param = NULL; u.window = NULL; browseButton = NULL; }
263 };
264 
265 // This context structure is used by AddParam to keep track of where the
266 // next parameter's controls should be added.  When AddParam is called on
267 // a list of parameters (bx_list_c), it calls itself recursively to add
268 // the child parameters, which in turn could be lists as well.  When it
269 // calls itself recursively, it will create a new AddParamContext so that
270 // the various children can be added in the right place.
271 struct AddParamContext {
272   int depth;
273   wxWindow *parent;
274   wxBoxSizer *vertSizer;
275   wxFlexGridSizer *gridSizer;
276 };
277 
278 
279 class ParamDialog: public wxDialog
280 {
281 private:
282   void ShowHelp();
283   int genId();
284   bool isShowing;
285   int nbuttons;
286   bool runtime;
287 protected:
288   wxBoxSizer *mainSizer, *buttonSizer, *infoSizer;
289   // hash table that maps the ID of a wxWidgets control (e.g. wxChoice,
290   // wxTextCtrl) to the associated ParamStruct object.  Data in the hash table
291   // is of ParamStruct*.
292   wxHashTable *idHash;
293   // map parameter ID onto ParamStruct.
294   wxHashTable *paramHash;
295   virtual void EnableChanged();
296   void EnableChanged(ParamStruct *pstr);
297   void EnableParam(int param_id, bool enabled);
298   void ProcessDependentList(ParamStruct *pstrChanged, bool enabled);
299   bool CopyGuiToParam();
300   bool CopyGuiToParam(bx_param_c *param);
301   bool isGeneratedId(int id);
302 public:
303   ParamDialog(wxWindow* parent, wxWindowID id);
304   virtual ~ParamDialog();
305   void OnEvent(wxCommandEvent& event);
306   wxButton* AddButton(int id, wxString label);
307   virtual void AddDefaultButtons();
308   virtual void Init();  // called automatically by ShowModal()
ShowModal()309   int ShowModal() {
310     Init();
311     isShowing = true;
312     int ret = wxDialog::ShowModal();
313     isShowing = false;
314     return ret;
315   }
Show(bool val)316   bool Show(bool val) { isShowing = val; return wxDialog::Show(val); }
317   void AddParam(bx_param_c *param, wxFlexGridSizer *sizer, bool plain = false);
318   void AddParam(bx_param_c *param, bool plain = false, AddParamContext *context = NULL);
319   void AddParamList(const char *nameList[], bx_param_c *base, wxFlexGridSizer *sizer = NULL, bool plain = false);
320   virtual void CopyParamToGui();
IsShowing()321   bool IsShowing() { return isShowing; }
SetRuntimeFlag(bool val)322   void SetRuntimeFlag(bool val) { runtime = val; }
323 DECLARE_EVENT_TABLE()
324 };
325 
326 ////////////////////////////////////////////////////////////////////////////
327 // FloppyConfigDialog
328 ////////////////////////////////////////////////////////////////////////////
329 //
330 // the new FloppyConfigDialog is based on ParamDialog. It allows the user to
331 // configure the floppy settings and to create a floppy image if necessary.
332 class FloppyConfigDialog : public ParamDialog
333 {
334 private:
335   wxButton *createButton;
336   ParamStruct *pstrDevice, *pstrPath, *pstrMedia, *pstrStatus, *pstrReadonly;
337 public:
338   FloppyConfigDialog(wxWindow* parent, wxWindowID id);
339   void Setup(bx_list_c *list);
340   void OnEvent(wxCommandEvent& event);
341   DECLARE_EVENT_TABLE()
342 };
343 
344 ////////////////////////////////////////////////////////////////////////////
345 // LogOptionsDialog
346 ////////////////////////////////////////////////////////////////////////////
347 //
348 // the new LogOptionsDialog is based on ParamDialog. It allows the user to
349 // configure the log file settings and to decide how Bochs will behave for
350 // each type of log event.
351 class LogOptionsDialog : public ParamDialog
352 {
353 private:
354 #define LOG_OPTS_TITLE wxT("Configure Log Events")
355 #define LOG_OPTS_PROMPT wxT("How should Bochs respond to each type of event?")
356 #define LOG_OPTS_TYPE_NAMES { wxT("Debug events"), wxT("Info events"), wxT("Error events"), wxT("Panic events") }
357 #define LOG_OPTS_N_TYPES 4
358 #define LOG_OPTS_CHOICES { wxT("ignore"), wxT("log"), wxT("warn user"), wxT("ask user"), wxT("end simulation"), wxT("no change") }
359 #define LOG_OPTS_N_CHOICES_NORMAL 5
360 #define LOG_OPTS_N_CHOICES 6   // number of choices, including "no change"
361 #define LOG_OPTS_NO_CHANGE 5   // index of "no change"
362 #define LOG_OPTS_ADV wxT("For additional control over how each device responds to events, use the menu option \"Log ... By Device\".")
363   wxFlexGridSizer *gridSizer;
364   wxChoice *action[LOG_OPTS_N_TYPES];
365 public:
366   LogOptionsDialog(wxWindow* parent, wxWindowID id);
367   int GetAction(int evtype);
368   void SetAction(int evtype, int action);
369   DECLARE_EVENT_TABLE()
370 };
371 
372 
373 /**************************************************************************
374 Everything else in here is a comment!
375 
376 ////////////////////////////////////////////////////////////////////////////
377 // proposed dialogs, not implemented
378 ////////////////////////////////////////////////////////////////////////////
379 
380 Here are some quick sketches of what different parts of the interface
381 could look like.  None of these is implemented yet, and everything is
382 open for debate.  Whoever writes the wxWidgets code for any of these
383 screens gets several thousand votes!
384 
385 Idea for large configuration dialog, based on Netscape's Edit:Preferences
386 dialog box.  Here's a sketch of a dialog with all the components that can be
387 configured in a list on the left, and the details of the selected component
388 on the right.  This is a pretty familiar structure that's used in a lot of
389 applications these days.  In the first sketch, "IDE Interface" is selected on
390 the left, and the details of the IDE devices are shown on the right.
391 
392 +-----Configure Bochs-------------------------------------------------------+
393 |                                                                           |
394 |  +--------------------+  +-- IDE Controller ---------------------------+  |
395 |  | |-CPU              |  |                                             |  |
396 |  | |                  |  | Master device:                              |  |
397 |  | |-Memory           |  |   [X] Enable Hard Disk 0                    |  |
398 |  | |                  |  |                                             |  |
399 |  | |-Video            |  | Slave device (choose one):                  |  |
400 |  | |                  |  |   [ ] No slave device                       |  |
401 |  | |-Floppy disks     |  |   [ ] Hard Disk 1                           |  |
402 |  | | |-Drive 0        |  |   [X] CD-ROM                                |  |
403 |  | | |-Drive 1        |  |                                             |  |
404 |  | |                  |  +---------------------------------------------+  |
405 |  |***IDE controller***|                                                   |
406 |  | | |-Hard Drive 0   |                                                   |
407 |  | | |-CD-ROM drive   |                                                   |
408 |  | |                  |                                                   |
409 |  | |-Keyboard         |                                                   |
410 |  | |                  |                                                   |
411 |  | |-Networking       |                                                   |
412 |  | |                  |                                                   |
413 |  | |-Sound            |                                                   |
414 |  |                    |                                                   |
415 |  +--------------------+                                                   |
416 |                                                     [Help] [Cancel] [Ok]  |
417 +---------------------------------------------------------------------------+
418 
419 If you click on Hard Drive 0 in the component list (left), then the
420 whole right panel changes to show the details of the hard drive.
421 
422 +-----Configure Bochs-------------------------------------------------------+
423 |                                                                           |
424 |  +--------------------+   +---- Configure Hard Drive 0 ----------------+  |
425 |  | |-CPU              |   |                                            |  |
426 |  | |                  |   |  [X] Enabled                               |  |
427 |  | |-Memory           |   |                                            |  |
428 |  | |                  |   +--------------------------------------------+  |
429 |  | |-Video            |                                                   |
430 |  | |                  |   +---- Disk Image ----------------------------+  |
431 |  | |-Floppy disks     |   |                                            |  |
432 |  | | |-Drive 0        |   |  File name: [___________________] [Browse] |  |
433 |  | | |-Drive 1        |   |  Geometry: cylinders [____]                |  |
434 |  | |                  |   |            heads [____]                    |  |
435 |  | |-IDE controller   |   |            sectors/track [____]            |  |
436 |  | |***Hard Drive 0***|   |                                            |  |
437 |  | | |-CD-ROM drive   |   |  Size in Megabytes: 38.2                   |  |
438 |  | |                  |   |       [Enter size/Compute Geometry]        |  |
439 |  | |-Keyboard         |   |                                            |  |
440 |  | |                  |   |                             [Create Image] |  |
441 |  | |-Networking       |   +--------------------------------------------+  |
442 |  | |                  |                                                   |
443 |  | |-Sound            |                                                   |
444 |  |                    |                                                   |
445 |  +--------------------+                                                   |
446 |                                                     [Help] [Cancel] [Ok]  |
447 +---------------------------------------------------------------------------+
448 
449 Or if you choose the CD-ROM, you get to edit the settings for it.
450 
451 +---- Configure Bochs ------------------------------------------------------+
452 |                                                                           |
453 |  +--------------------+  +-- CD-ROM Device ----------------------------+  |
454 |  | |-CPU              |  |                                             |  |
455 |  | |                  |  |  [ ] Enable Emulated CD-ROM                 |  |
456 |  | |-Memory           |  |                                             |  |
457 |  | |                  |  +---------------------------------------------+  |
458 |  | |-Video            |                                                   |
459 |  | |                  |  +-- CD-ROM Media -----------------------------+  |
460 |  | |-Floppy disks     |  |                                             |  |
461 |  | | |-Drive 0        |  |  Bochs can use a physical CD-ROM drive as   |  |
462 |  | | |-Drive 1        |  |  the data source, or use an image file.     |  |
463 |  | |                  |  |                                             |  |
464 |  | |-IDE controller   |  |   [X]  Ejected                              |  |
465 |  | | |-Hard Drive 0   |  |   [ ]  Physical CD-ROM drive /dev/cdrom     |  |
466 |  |*****CD-ROM drive***|  |   [ ]  Disk image: [_____________] [Browse] |  |
467 |  | |                  |  |                                             |  |
468 |  | |-Keyboard         |  +---------------------------------------------+  |
469 |  | |                  |                                                   |
470 |  | |-Networking       |                                                   |
471 |  | |                  |                                                   |
472 |  | |-Sound            |                                                   |
473 |  |                    |                                                   |
474 |  +--------------------+                                                   |
475 |                                                     [Help] [Cancel] [Ok]  |
476 +---------------------------------------------------------------------------+
477 
478 ////////////////////////////////////////////////////////////////////////////
479 // ChooseConfigDialog
480 ////////////////////////////////////////////////////////////////////////////
481 The idea is that you could choose from a set of configurations
482 (individual bochsrc files, basically).  When you first install
483 Bochs, it would just have DLX Linux Demo, and Create New.
484 As you create new configurations and save them, the list
485 could grow.
486 +--------------------------------------------------------+
487 |                                                        |
488 |   Choose a configuration for the Bochs simulator:      |
489 |                                                        |
490 |   +---+                                                |
491 |   | O |    DLX Linux Demo                              |
492 |   | | |    Boot 10MB Hard Disk                         |
493 |   +---+                                                |
494 |                                                        |
495 |   +---+                                                |
496 |   | O |    Redhat Linux Image                          |
497 |   | | |    Boot 10MB Hard Disk                         |
498 |   +---+                                                |
499 |                                                        |
500 |   +---+                                                |
501 |   | O |    FreeDOS                                     |
502 |   | | |    Boot 40MB Hard Disk                         |
503 |   +---+                                                |
504 |                                                        |
505 |    ??      Create new configuration                    |
506 |                                                        |
507 +--------------------------------------------------------+
508 
509 ////////////////////////////////////////////////////////////////////////////
510 // KeymappingDialog
511 ////////////////////////////////////////////////////////////////////////////
512 more ambitious: create a button for each key on a standard keyboard, so that
513 you can view/edit/load/save key mappings, produce any combination of keys
514 (esp. ones that your OS or window manager won't allow)
515 
516 ////////////////////////////////////////////////////////////////////////////
517 // new AdvancedLogOptionsDialog
518 ////////////////////////////////////////////////////////////////////////////
519 Try #2 for the advanced event configuration dialog.
520 It shows the selection of the default actions again
521 at the top, with some explanation.  Then at bottom, you
522 can select a device in the list box and edit the settings
523 for that device individually.  It would be possible to
524 allow selection of multiple devices and then edit several
525 devices at once.
526 
527 +---- Advanced event configuration ---------------------+-+
528 |                                                         |
529 |                    +--- Default Actions -------------+  |
530 | First choose the   |                                 |  |
531 | default actions    |  Debug events: [ignore]         |  |
532 | that apply to all  |   Info events: [ignore]         |  |
533 | event sources.     |  Error events: [report]         |  |
534 |                    |  Panic events: [ask   ]         |  |
535 |                    |                                 |  |
536 |                    |          [Copy to All Devices]  |  |
537 |                    +---------------------------------+  |
538 |                                                         |
539 | Then, if you want you can edit the actions for          |
540 | individual devices.  For example if you are having      |
541 | problems with the keyboard, you could ask for debug     |
542 | and info events from the keyboard to be reported.       |
543 |                                                         |
544 | Select Device:                                          |
545 | +-------------+-+  +--- Actions for VGA -------------+  |
546 | | CPU         |^|  |                                 |  |
547 | | Interrupts  |||  |  Debug events: [ignore]         |  |
548 | |*VGA*********|||  |   Info events: [ignore]         |  |
549 | | Keyboard    |||  |  Error events: [report]         |  |
550 | | Mouse       |||  |  Panic events: [ask   ]         |  |
551 | | Floppy Disk |v|  |                                 |  |
552 | +-------------+-+  +---------------------------------+  |
553 |                                                         |
554 |                              [ Help ] [ Cancel ] [ Ok ] |
555 +---------------------------------------------------------+
556 
557 +---- Configure events -------------------------------------+
558 |  __________    ____________                               |
559 | | Default  \  | Per Device \                              |
560 | |           \------------------------------------------+  |
561 | |                                                      |  |
562 | | Event log file [_______________________] [Browse]    |  |
563 | |                                                      |  |
564 | | How should Bochs respond to each type of event?      |  |
565 | |                                                      |  |
566 | |            Debug events: [ignore]                    |  |
567 | |             Info events: [ignore]                    |  |
568 | |            Error events: [report]                    |  |
569 | |            Panic events: [ask   ]                    |  |
570 | |                                                      |  |
571 | | For additional control over how each device responds |  |
572 | | to events, click the "Per Device" tab above.         |  |
573 | |                                                      |  |
574 | +------------------------------------------------------+  |
575 |                                [ Help ] [ Cancel ] [ Ok ] |
576 +-----------------------------------------------------------+
577 
578 +---- Configure events -------------------------------------+
579 |  __________    ____________                               |
580 | | Default  \  | Per Device \                              |
581 | +-------------|             \--------------------------+  |
582 | |                                                      |  |
583 | | This table determines how Bochs will respond to each |  |
584 | | kind of event coming from a particular source.  For  |  |
585 | | example if you are having problems with the keyboard,|  |
586 | | you could ask for debug and info events from the     |  |
587 | | keyboard to be reported.                             |  |
588 | |                                                      |  |
589 | | +------------------------------------------------+-+ |  |
590 | | |Device   Debug    Info     Error      Panic     |^| |  |
591 | | |-------- -------- -------  --------   --------- ||| |  |
592 | | |Keyboard [ignore] [ignore] [report]   [report]  ||| |  |
593 | | |VGA      [ignore] [ignore] [report]   [report]  ||| |  |
594 | | |NE2000   [ignore] [ignore] [report]   [report]  ||| |  |
595 | | |Sound    [ignore] [ignore] [report]   [report]  |v| |  |
596 | | +--------------------------------------------------+ |  |
597 | |                      [Set defaults for all devices]  |  |
598 | +------------------------------------------------------+  |
599 |                                [ Help ] [ Cancel ] [ Ok ] |
600 +-----------------------------------------------------------+
601 
602 *****************************************************************/
603