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 PERSONALITYMANAGER_H 7 #define PERSONALITYMANAGER_H 8 9 #include "settings.h" 10 #include "manager.h" 11 #include <wx/dynarray.h> 12 13 /** @brief Manage different personalities. 14 * 15 * Personalities are different profiles of appearence for Code::Blocks. 16 * For instance, the default personality is the full IDE. You could create 17 * a "Text editor" personality that is light-weight, tailored to "simple" text editing. 18 * In this example "Text editor" personality, the manager windows would be hidden 19 * and no plugins would be loaded, making Code::Blocks perfect for text editing 20 * (with all the powerful features of its embedded editor). 21 * 22 * The user can create as many personalities as needed. The work-in-progress 23 * file associations manager (win32 only) will work with personalities so that 24 * different file types launch Code::Blocks using a different personality... 25 * 26 * To select the desired personality when launching Code::Blocks, the user can 27 * use the command-line switch "--personality". If "--personality=ask" is passed 28 * in the command line, a selection box will be displayed for the user to choose 29 * the desired personality. 30 */ 31 class DLLIMPORT PersonalityManager : public Mgr<PersonalityManager> 32 { 33 static wxString pers; 34 35 PersonalityManager(); 36 37 public: 38 friend class Mgr<PersonalityManager>; 39 friend class Manager; // give Manager access to our private members 40 41 /// Use this once, on program startup to set the working personality 42 void SetPersonality(const wxString& personality, bool createIfNotExist = false); 43 /// Get the working personality string 44 const wxString GetPersonality(); 45 /// Get a list of all the known personalities 46 const wxArrayString GetPersonalitiesList(); 47 }; 48 49 #endif // PERSONALITYMANAGER_H 50