Code::Blocks  SVN r11506
cbworkspace.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 CBWORKSPACE_H
7 #define CBWORKSPACE_H
8 
9 #include <wx/string.h>
10 #include <wx/filename.h>
11 
12 #include "globals.h"
13 
27 {
28  public:
34  cbWorkspace(const wxString& filename = DEFAULT_WORKSPACE);
35 
37  virtual ~cbWorkspace();
38 
45  virtual bool Save(bool force = false);
46 
54  virtual bool SaveAs(const wxString& filename);
55 
60  virtual wxString GetFilename() const
61  {
62  return m_Filename.GetFullPath();
63  }
64 
69  virtual wxString GetTitle() const
70  {
71  return m_Title;
72  }
73 
78  virtual void SetTitle(const wxString& title);
79 
87  virtual bool IsOK() const { return m_IsOK; }
88 
93  virtual bool IsDefault() const { return m_IsDefault; }
94 
102  virtual bool GetModified() const { return m_Modified; }
103 
109  virtual void SetModified(bool modified);
110 
113  void SetPreferredTarget(const wxString &target);
114 
117  wxString GetPreferredTarget() const;
118 
119  void ActiveProjectChanged();
120 
121  bool SaveLayout();
122  private:
123  bool m_IsOK; // succeeded loading?
124  bool m_IsDefault; // is this the Code::Blocks default workspace?
125  bool m_Modified; // is it modified?
126  wxFileName m_Filename; // filename
127  wxString m_Title; // title
129 
130  void Load(); // utility function
131  bool LoadLayout();
132 };
133 
134 #endif // CBWORKSPACE_H
virtual bool IsOK() const
Was this workspace loaded successfully?
Definition: cbworkspace.h:87
virtual bool GetModified() const
Is this workspace modified?
Definition: cbworkspace.h:102
virtual wxString GetFilename() const
Get the workspace file&#39;s name.
Definition: cbworkspace.h:60
bool m_IsDefault
Definition: cbworkspace.h:124
virtual bool IsDefault() const
Is this workspace the Code::Blocks default?
Definition: cbworkspace.h:93
wxFileName m_Filename
Definition: cbworkspace.h:126
#define DLLIMPORT
Definition: settings.h:16
A workspace class.
Definition: cbworkspace.h:26
wxString m_Title
Definition: cbworkspace.h:127
DLLIMPORT const wxString DEFAULT_WORKSPACE
Definition: globals.cpp:55
wxString m_PreferredTargetName
Definition: cbworkspace.h:128
virtual wxString GetTitle() const
Get the workspace&#39;s title.
Definition: cbworkspace.h:69
bool m_Modified
Definition: cbworkspace.h:125