14 #ifndef _PieDock_Settings_
15 #define _PieDock_Settings_
17 #include "MenuItems.h"
19 #include "ActiveIndicator.h"
21 #include "WorkspaceLayout.h"
64 unsigned int modifier;
71 unsigned int eventMask;
84 unsigned int eventType;
97 WorkspaceLayout::PreferredVirtualLayout preferredLayout;
98 unsigned int workspaceColor;
99 unsigned int windowColor;
102 typedef std::vector<Key> Keys;
103 typedef std::vector<Button> Buttons;
104 typedef std::vector<ButtonFunction> ButtonFunctions;
105 typedef std::vector<KeyFunction> KeyFunctions;
106 typedef std::map<std::string, MenuItems> Menus;
107 typedef std::map<std::string, bool> WindowsToIgnore;
111 inline const std::string &getConfigurationFile()
const {
112 return configurationFile; }
113 inline void setConfigurationFile( std::string s ) {
114 configurationFile = s; }
115 inline const int &getWidth()
const {
return width; }
116 inline const int &getHeight()
const {
return height; }
118 inline const bool &useCompositing()
const {
return compositing; }
120 inline Keys &getKeys() {
return keys; }
121 inline Buttons &getButtons() {
return buttons; }
122 inline KeyFunctions &getKeyFunctions() {
123 return keyFunctions; }
124 inline IconMap &getIconMap() {
return iconMap; }
125 inline MenuItems *getMenu( std::string s ) {
126 Menus::iterator i = menus.find( s );
127 if( i == menus.end() )
129 return &(*i).second; }
130 inline bool ignoreWindow( std::string s ) {
131 return (windowsToIgnore.find( s ) != windowsToIgnore.end()); }
132 inline ActiveIndicator &getActiveIndicator() {
133 return activeIndicator; }
134 inline const int &getFocusedAlpha()
const {
return focusedAlpha; }
135 inline const int &getUnfocusedAlpha()
const {
136 return unfocusedAlpha; }
137 inline const double &getStartRadius()
const {
138 return startRadius; }
139 inline const bool &isFitts()
const {
return fitts; }
140 inline const double &getZoomModifier()
const {
141 return zoomModifier; }
142 inline const CenterAction &getCenterAction()
const {
143 return centerAction; }
144 inline const double &getSpinStep()
const {
return spinStep; }
145 inline const bool &getShowTitle()
const {
return showTitle; }
146 inline const Text::Font &getTitleFont()
const {
return titleFont; }
147 inline const CartoucheSettings &getCartoucheSettings()
const {
148 return cartoucheSettings; }
149 inline const int &getMinimumNumber()
const {
return minimumNumber; }
150 inline const WorkspaceDisplaySettings
151 &getWorkspaceDisplaySettings()
const {
152 return workspaceDisplaySettings; }
155 const std::string &menu = std::string(),
156 MenuItem *item = 0 );
157 virtual void load( Display *d );
160 virtual int readMenu( std::istream &,
int, std::string );
165 virtual void presizeIcon( Icon *,
int,
int,
int,
int,
int,
int );
171 class Statement :
public std::string
174 Statement(
const char *s ) : std::string( s ) {}
175 Statement( std::string s ) : std::string( s ) {}
176 Statement() : std::string() {}
177 virtual ~Statement() {}
178 void cutComments(
const char =
'#' );
179 std::vector<std::string> split(
const char * =
" \t" );
182 bool tokenize(
const char *,
183 std::string::size_type &,
184 std::string::size_type & );
185 std::string trim( std::string,
186 const char * =
" \t\r\n\"" );
189 std::string configurationFile;
194 ButtonFunctions buttonFunctions;
195 std::map<MenuItem *, ButtonFunctions> itemButtonFunctions;
196 std::map<std::string, ButtonFunctions> menuButtonFunctions;
197 KeyFunctions keyFunctions;
200 WindowsToIgnore windowsToIgnore;
201 ActiveIndicator activeIndicator;
207 CenterAction centerAction;
210 Text::Font titleFont;
211 CartoucheSettings cartoucheSettings;
213 WorkspaceDisplaySettings workspaceDisplaySettings;