1 /* 2 * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3 3 * http://www.gnu.org/licenses/gpl-3.0.html 4 */ 5 6 #ifndef SYMTABEXEC_H 7 #define SYMTABEXEC_H 8 9 #include <wx/arrstr.h> 10 #include "scrollingdialog.h" 11 #include <wx/string.h> 12 13 struct struct_config 14 { 15 int choWhatToDo; 16 17 wxString txtLibraryPath; 18 bool chkIncludeA; 19 bool chkIncludeLib; 20 bool chkIncludeO; 21 bool chkIncludeObj; 22 bool chkIncludeDll; 23 24 wxString txtLibrary; 25 wxString txtSymbol; 26 27 wxString txtNM; 28 bool chkDebug; 29 bool chkDefined; 30 bool chkDemangle; 31 bool chkExtern; 32 bool chkSpecial; 33 bool chkSynthetic; 34 bool chkUndefined; 35 }; 36 37 class wxListCtrl; 38 class wxTextCtrl; 39 class wxProgressDialog; 40 class wxWindow; 41 class wxListEvent; 42 class wxCommandEvent; 43 44 class SymTabExecDlg : public wxScrollingDialog 45 { 46 /* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */ 47 public: 48 /* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */ SymTabExecDlg(wxWindow * parent_in)49 SymTabExecDlg(wxWindow* parent_in) : 50 parent(parent_in), SymTabExecDlgLoaded(false), 51 m_ListCtrl(0L), m_TextHelp(0L), 52 m_TextMisc(0L) {} 53 virtual ~SymTabExecDlg(); 54 55 int Execute (struct_config config); 56 57 // The following needs to be public (used by a global wxCALLBACK method) GetSortColumn()58 int GetSortColumn() { return ms_iSortColumn; }; GetSortAscending()59 int GetSortAscending() { return ms_bSortAscending; }; 60 61 /* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */ 62 private: 63 /* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */ 64 void DoInitDialog (); 65 void EndModal (int retCode); 66 void OnWriteToFile(wxCommandEvent& event); 67 void OnNext (wxCommandEvent& event); 68 void OnCancel (wxCommandEvent& event); 69 // Global function required by OnColumnClick: 70 // int wxCALLBACK SortFunction(long item1, long item2, long dlg); 71 void OnColumnClick(wxListEvent& event); 72 73 int ExecuteMulti (struct_config &config, wxString cmd); 74 int ExecuteSingle (struct_config &config, wxString cmd); 75 bool ExecuteNM (wxString lib, wxString cmd); 76 int ParseOutput (wxString lib, wxString filter); 77 void ParseOutputError (); 78 int ParseOutputSuccess(wxString lib, wxString filter); 79 80 void CleanUp (); 81 void ClearUserData(); 82 83 /* ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- */ 84 85 wxWindow* parent; 86 bool SymTabExecDlgLoaded; 87 wxListCtrl* m_ListCtrl; 88 wxTextCtrl* m_TextHelp; 89 wxTextCtrl* m_TextMisc; 90 91 wxArrayString nm_result; 92 wxArrayString nm_errors; 93 static bool ms_bSortAscending; 94 static int ms_iSortColumn; 95 96 DECLARE_EVENT_TABLE() 97 }; 98 99 #endif // SYMTABEXEC_H 100