1 /* 2 Copyright (C) 2020-2021, Dirk Krause 3 SPDX-License-Identifier: BSD-3-Clause 4 */ 5 6 /* 7 WARNING: This file was generated by the dkct program (see 8 http://dktools.sourceforge.net/ for details). 9 Changes you make here will be lost if dkct is run again! 10 You should modify the original source and run dkct on it. 11 Original source: Dk4WxYesNoDialog.wxc 12 */ 13 14 #ifndef DK4WXYESNODIALOG_H_INCLUDED 15 /** Avoid multiple inclusions. */ 16 #define DK4WXYESNODIALOG_H_INCLUDED 1 17 18 19 /** @file Dk4WxYesNoDialog.h Message box dialog for yes/no decisions. 20 */ 21 22 #ifndef DK4CONF_H_INCLUDED 23 #if DK4_BUILDING_DKTOOLS4 24 #include "dk4conf.h" 25 #else 26 #include <dktools-4/dk4conf.h> 27 #endif 28 #endif 29 30 #ifndef DK4TYPES_H_INCLUDED 31 #if DK4_BUILDING_DKTOOLS4 32 #include <libdk4base/dk4types.h> 33 #else 34 #include <dktools-4/dk4types.h> 35 #endif 36 #endif 37 38 #ifndef WX_WXPREC_H_INCLUDED 39 #include <wx/wxprec.h> 40 #define WX_WXPREC_H_INCLUDED 1 41 #endif 42 #ifdef __BORLANDC__ 43 #pragma hdrstop 44 #endif 45 #ifndef WX_PRECOMP 46 #ifndef WX_WX_H_INCLUDED 47 #include <wx/wx.h> 48 #define WX_WX_H_INCLUDED 1 49 #endif 50 #endif 51 52 #ifndef DK4WXAPPLICATIONHELPER_H_INCLUDED 53 #if DK4_BUILDING_DKTOOLS4 54 #include <libdk4wx/Dk4WxApplicationHelper.h> 55 #else 56 #include <dktools-4/Dk4WxApplicationHelper.h> 57 #endif 58 #endif 59 60 61 /** Message box dialog for simples yes or no decisions. 62 */ 63 class Dk4WxYesNoDialog : public wxDialog 64 { 65 66 private: 67 68 /** Event table. 69 */ 70 #if wxCHECK_VERSION(3,0,0) 71 wxDECLARE_EVENT_TABLE(); 72 #else 73 DECLARE_EVENT_TABLE() 74 #endif 75 76 protected: 77 78 /** Bitmap containing the question mark. 79 */ 80 wxBitmap bm_question; 81 82 public: 83 84 /** Constructor. 85 @param parent Parent frame. 86 @param pAppHelp Application helper for localized texts. 87 @param tMessage Message to show. 88 @param tTitle Dialog box title. 89 */ 90 Dk4WxYesNoDialog( 91 wxFrame *parent, 92 Dk4WxApplicationHelper *pAppHelp, 93 wxChar const *tMessage, 94 wxChar const *tTitle 95 ); 96 97 /** Event handler for Yes button. 98 @param event Event to process (ignored). 99 */ 100 void 101 OnYes(wxCommandEvent & event); 102 103 /** Event handler for No button. 104 @param event Event to process (ignored). 105 */ 106 void 107 OnNo(wxCommandEvent & event); 108 109 /** Flag: GUI ok. 110 */ 111 bool dkctGUILayoutOK; 112 113 /** GUI element sizerHorizontal. 114 */ 115 wxBoxSizer *sizerHorizontal; 116 117 /** GUI element sizerVertical. 118 */ 119 wxBoxSizer *sizerVertical; 120 121 /** GUI element sizerContents. 122 */ 123 wxBoxSizer *sizerContents; 124 125 /** GUI element sizerButtons. 126 */ 127 wxStdDialogButtonSizer *sizerButtons; 128 129 /** GUI element bitmapIcon. 130 */ 131 wxStaticBitmap *bitmapIcon; 132 133 /** GUI element lText. 134 */ 135 wxStaticText *lText; 136 137 /** GUI element bYes. 138 */ 139 wxButton *bYes; 140 141 /** GUI element bNo. 142 */ 143 wxButton *bNo; 144 145 }; 146 147 148 149 #endif 150