1 /* 2 * This file is part of lib_finder plugin for Code::Blocks Studio 3 * Copyright (C) 2007 Bartlomiej Swiecki 4 * 5 * wxSmith is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * wxSmith is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with wxSmith; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 18 * 19 * $Revision: 10290 $ 20 * $Id: projectconfigurationpanel.h 10290 2015-05-15 10:58:40Z jenslody $ 21 * $HeadURL: svn://svn.code.sf.net/p/codeblocks/code/branches/release-20.xx/src/plugins/contrib/lib_finder/projectconfigurationpanel.h $ 22 */ 23 24 #ifndef PROJECTCONFIGURATIONPANEL_H 25 #define PROJECTCONFIGURATIONPANEL_H 26 27 //(*Headers(ProjectConfigurationPanel) 28 #include <wx/panel.h> 29 #include <wx/timer.h> 30 class wxTextCtrl; 31 class wxStaticBoxSizer; 32 class wxListBox; 33 class wxButton; 34 class wxTreeEvent; 35 class wxBoxSizer; 36 class wxStaticText; 37 class wxTreeCtrl; 38 class wxCheckBox; 39 //*) 40 41 #include <configurationpanel.h> 42 #include <wx/treectrl.h> 43 #include "projectconfiguration.h" 44 #include "resultmap.h" 45 46 47 class ProjectConfigurationPanel: public cbConfigurationPanel 48 { 49 public: 50 51 ProjectConfigurationPanel(wxWindow* parent,ProjectConfiguration* Config,cbProject* Proj,TypedResults& KnownLibs); 52 virtual ~ProjectConfigurationPanel(); 53 54 private: 55 56 WX_DECLARE_STRING_HASH_MAP(wxTreeItemId,IdsMap); 57 58 virtual wxString GetTitle() const; 59 virtual wxString GetBitmapBaseName() const; 60 virtual void OnApply(); 61 virtual void OnCancel(); 62 63 void LoadData(); 64 void StoreData(); 65 66 void FillKnownLibraries(); 67 68 void BuildEntry(const wxTreeItemId& Id,ResultArray& Array); 69 wxTreeItemId OtherCategoryId(); 70 wxTreeItemId PkgConfigId(); 71 wxTreeItemId CategoryId(const wxString& Category); 72 73 ProjectConfiguration* m_Configuration; 74 ProjectConfiguration m_ConfCopy; 75 cbProject* m_Project; 76 TypedResults& m_KnownLibs; 77 IdsMap m_CategoryMap; 78 bool m_IsOtherCategory; 79 bool m_IsPkgConfig; 80 81 //(*Declarations(ProjectConfigurationPanel) 82 wxStaticText* m_EventText; 83 wxButton* Button1; 84 wxButton* Button2; 85 wxStaticText* StaticText1; 86 wxButton* m_Remove; 87 wxTimer Timer1; 88 wxTreeCtrl* m_KnownLibrariesTree; 89 wxButton* m_AddUnknown; 90 wxTextCtrl* m_Filter; 91 wxButton* m_AddScript; 92 wxButton* m_Add; 93 wxCheckBox* m_Tree; 94 wxTextCtrl* m_UnknownLibrary; 95 wxCheckBox* m_NoAuto; 96 wxListBox* m_UsedLibraries; 97 //*) 98 99 //(*Identifiers(ProjectConfigurationPanel) 100 static const long ID_LISTBOX1; 101 static const long ID_BUTTON6; 102 static const long ID_CHECKBOX2; 103 static const long ID_BUTTON4; 104 static const long ID_BUTTON1; 105 static const long ID_BUTTON2; 106 static const long ID_TREECTRL1; 107 static const long ID_STATICTEXT1; 108 static const long ID_TEXTCTRL2; 109 static const long ID_CHECKBOX1; 110 static const long ID_BUTTON5; 111 static const long ID_TEXTCTRL1; 112 static const long ID_BUTTON3; 113 static const long ID_STATICTEXT2; 114 static const long ID_TIMER1; 115 //*) 116 117 //(*Handlers(ProjectConfigurationPanel) 118 void Onm_TreeClick(wxCommandEvent& event); 119 void OnTimer1Trigger(wxTimerEvent& event); 120 void Onm_FilterText(wxCommandEvent& event); 121 void Onm_FilterTextEnter(wxCommandEvent& event); 122 void Onm_KnownLibrariesTreeSelectionChanged(wxTreeEvent& event); 123 void Onm_UsedLibrariesSelect(wxCommandEvent& event); 124 void Onm_RemoveClick(wxCommandEvent& event); 125 void Onm_AddClick(wxCommandEvent& event); 126 void Onm_UnknownLibraryText(wxCommandEvent& event); 127 void Onm_AddUnknownClick(wxCommandEvent& event); 128 void Onm_AddScriptClick(wxCommandEvent& event); 129 void OnButton2Click(wxCommandEvent& event); 130 //*) 131 132 wxString GetUserListName(const wxString &VarName); 133 void DetectNewLibs( const wxString& IncludeName, ResultArray& known, wxArrayString& LibsList ); 134 135 DECLARE_EVENT_TABLE() 136 }; 137 138 #endif 139