Code::Blocks  SVN r11506
filegroupsandmasks.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3  * http://www.gnu.org/licenses/lgpl-3.0.html
4  */
5 
6 #ifndef FILEGROUPSANDMASKS_H
7 #define FILEGROUPSANDMASKS_H
8 
9 #include <wx/arrstr.h>
10 #include <wx/dynarray.h>
11 #include <wx/string.h>
12 #include <settings.h>
13 
14 struct FileGroups
15 {
18 };
19 
20 WX_DEFINE_ARRAY(FileGroups*, FileGroupsArray);
21 
23 {
24  public:
29  void CopyFrom(const FilesGroupsAndMasks& rhs); // copy ctor helper
30 
33  void SetDefault(bool do_clear = true);
35  void Save();
37  void Clear();
38 
42  unsigned int AddGroup(const wxString& name);
46  void RenameGroup(unsigned int group, const wxString& newName);
49  void DeleteGroup(unsigned int group);
53  void SetFileMasks(unsigned int group, const wxString& masks);
54 
57  unsigned int GetGroupsCount() const;
61  wxString GetGroupName(unsigned int group) const;
65  wxString GetFileMasks(unsigned int group) const;
70  bool MatchesMask(const wxString& ext, unsigned int group) const;
71 
72  private:
74  void Load();
75 
76  FileGroupsArray m_Groups;
77 };
78 
79 #endif // FILEGROUPSANDMASKS_H
wxString groupName
FileGroupsArray m_Groups
Internal storage for file groups ans masks.
#define DLLIMPORT
Definition: settings.h:16
wxArrayString fileMasks
WX_DEFINE_ARRAY(FileGroups *, FileGroupsArray)