Cafu Engine
DialogReplaceMaterials.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_DIALOG_REPLACE_MATERIALS_HPP_INCLUDED
8 #define CAFU_DIALOG_REPLACE_MATERIALS_HPP_INCLUDED
9 
10 #include "wx/wx.h"
11 
12 
13 class MapDocumentT;
14 
15 
16 class ReplaceMaterialsDialogT : public wxDialog
17 {
18  public:
19 
20  /// Constructor.
21  ReplaceMaterialsDialogT(bool IsSomethingSelected, MapDocumentT& MapDoc, const wxString& InitialFindMatName="");
22 
23 
24  private:
25 
26  MapDocumentT& m_MapDoc;
27 
28  wxTextCtrl* TextCtrlFindMatName;
29  wxTextCtrl* TextCtrlReplaceMatName;
30  wxRadioButton* RadioButtonSearchInSelection;
31  wxRadioButton* RadioButtonSearchInWholeWorld;
32  wxCheckBox* CheckBoxInclusiveBrushes;
33  wxCheckBox* CheckBoxInclusiveBPs;
34  wxCheckBox* CheckBoxInclusiveHidden;
35  wxRadioBox* RadioBoxSearchFor;
36  wxRadioBox* RadioBoxReplaceRescaleMode;
37  wxCheckBox* CheckBoxFindOnly;
38  wxStaticBitmap* m_BitmapFindMat;
39  wxStaticBitmap* m_BitmapReplaceMat;
40  wxStaticBox* StaticBoxReplace;
41  wxButton* ButtonBrowseReplace;
42 
43  // Event handlers.
44  void OnOK(wxCommandEvent& Event);
45  void OnButtonBrowseFind(wxCommandEvent& Event);
46  void OnButtonBrowseReplace(wxCommandEvent& Event);
47  void OnCheckboxFindOnly(wxCommandEvent& Event);
48  void OnRadioButtonSearchIn(wxCommandEvent& Event);
49  void OnTextUpdateFindMatName(wxCommandEvent& Event);
50  void OnTextUpdateReplaceMatName(wxCommandEvent& Event);
51 
52  // IDs for the controls in whose events we are interested.
53  enum
54  {
55  ID_BUTTON_BROWSE_FIND=wxID_HIGHEST+1,
56  ID_BUTTON_BROWSE_REPLACE,
57  ID_CHECKBOX_FINDONLY,
58  ID_RADIOBUTTON_SEARCH_IN_SELECTION,
59  ID_RADIOBUTTON_SEARCH_IN_WHOLEWORLD,
60  ID_TEXTCTRL_FINDMATNAME,
61  ID_TEXTCTRL_REPLACEMATNAME
62  };
63 
64  DECLARE_EVENT_TABLE()
65 };
66 
67 #endif
Definition: DialogReplaceMaterials.hpp:16
ReplaceMaterialsDialogT(bool IsSomethingSelected, MapDocumentT &MapDoc, const wxString &InitialFindMatName="")
Constructor.
Definition: DialogReplaceMaterials.cpp:41
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45