IDESettings ideSettings;
IDESettingsContainer settingsContainer;
String workspaceActiveCompiler;
-
+
TabControl tabControl { this, background = formColor, anchor = { left = 8, top = 8, right = 8, bottom = 40 } };
-
+
EditorTab editorTab { this, tabControl = tabControl };
CompilersTab compilersTab { this, tabControl = tabControl };
ProjectOptionsTab projectOptionsTab { this, tabControl = tabControl };
WorkspaceOptionsTab workspaceOptionsTab { this, tabControl = tabControl };
-
+
property bool settingsModified
{
get
bool compilerSettingsChanged = false;
bool projectOptionsChanged = false;
bool workspaceOptionsChanged = false;
-
+
if(editorTab.modifiedDocument)
{
if(editorTab.useFreeCaret.checked != ideSettings.useFreeCaret ||
editorSettingsChanged = true;
}
}
-
+
if(compilersTab.modifiedDocument)
{
Workspace workspace = ide.workspace;
projectOptionsTab.modifiedDocument = false;
workspaceOptionsTab.modifiedDocument = false;
}
-
+
Destroy(DialogResult::ok);
return true;
}
activateCompiler = readonlyCompiler;
if(!activateCompiler && ideSettings.compilerConfigs.count)
activateCompiler = ideSettings.compilerConfigs[0];
-
+
for(compiler : ideSettings.compilerConfigs)
compilersTab.AddCompiler(compiler.Copy(), compiler == activateCompiler);
compilersTab.compilerConfigsDir.path = ideSettings.compilerConfigsDir;
// ProjectOptionsTab
projectOptionsTab.defaultTargetDir.path = ideSettings.projectDefaultTargetDir;
projectOptionsTab.defaultIntermediateObjDir.path = ideSettings.projectDefaultIntermediateObjDir;
-
+
return true;
}
surface.LineStipple(0x5555);
surface.Rectangle(x1, y1, x2, y2);
- surface.LineStipple(0);
+ surface.LineStipple(0);
}
class CompilersTab : GlobalSettingsSubTab
}
return SelectorBar::OnKeyDown(key, ch);
}
-
+
bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
{
((CompilersTab)master).labelCompilers.Update(null);
};
TabControl tabControl { this, background = formColor, anchor = { left = 8, top = 68, right = 8, bottom = 8 } };
-
+
CompilerDirectoriesTab dirsTab { this, tabControl = tabControl };
CompilerToolchainTab toolchainTab { this, tabControl = tabControl };
CompilerEnvironmentTab environmentTab { this, tabControl = tabControl };
bool NotifyModifiedDocument(PathBox pathBox)
{
+ BasicValidatePathBoxPath(pathBox);
modifiedDocument = true;
return true;
}
}
return true;
}
+ bool NotifyPathBoxModified(DirectoriesBox dirsBox, PathBox pathBox)
+ {
+ BasicValidatePathBoxPath(pathBox);
+ return true;
+ }
};
incref dirs[c];
-
+
if(c)
dirs[c].visible = false;
-
+
// (width) Should be 324 for text...
//field[c] = { dataType = class(char *), editable = true };
//dirs[c].AddField(field[c]);
else if(c == executables)
dirTypeTglBtn[c].hotKey = altE;
}
- }
+ }
currentDirs = dirs[includes];
dirTypeTglBtn[includes].checked = true;
return true;
PathBox sysroot
{
this, anchor = { left = margin, top = 242, right = 8 };
- text = $"SYSROOT", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
+ text = $"SYSROOT", typeExpected = directory, browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
};
Label executableLauncherLabel { this, position = { 8, 272 }, labeledWindow = executableLauncher, tabCycle = false, inactive = true };
PathBox executableLauncher
CompilerConfig compiler = loadedCompiler;
if(compiler)
{
+ BasicValidatePathBoxPath(pathBox);
if(pathBox == ecp)
compiler.ecpCommand = pathBox.slashPath;
else if(pathBox == ecc)
bool OnKeyDown(Key key, unichar ch)
{
if((SmartKey)key == enter)
- {
+ {
DataBox::OnKeyDown(key, ch);
return true;
}
else
return DataBox::OnKeyDown(key, ch);
}
-
+
bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
{
if(!active)
return true;
}
- bool NotifyChanged(bool closingDropDown)
+ bool NotifyChanged(DataBox dataBox, bool closingDropDown)
{
CompilerConfig compiler = loadedCompiler;
if(compiler)
EditBox distccHosts
{
this, text = $"distcc hosts", hotKey = altH;
- position = { 88, 92 }, size = { 300 };
+ position = { 88, 92 }, size = { 300, 22 };
bool NotifyModified(EditBox editBox)
{
}
}
- Label lblPrepDefs { this, position = { 8, 124 }, labeledWindow = prepDefs };
+ Label lblPrepDefs { this, position = { 8, 126 }, labeledWindow = prepDefs };
StringListBox prepDefs
{
- this, text = $"Preprocessor directives:", hotKey = altP;
- position = { 148, 124 }, size = { 300 };
+ this, text = $"Preprocessor directives", hotKey = altP;
+ position = { 148, 124 }, size = { 300, 22 }, anchor = { left = 148, top = 124, right = 8 };
bool NotifyModified(EditBox editBox)
{
}
}
- Label lblLinkerFlags { this, position = { 8, 152 }, labeledWindow = linkerFlags };
+ Label leCcompilerFlags { this, position = { 8, 156 }, labeledWindow = eCcompilerFlags };
+ StringListBox eCcompilerFlags
+ {
+ this, text = $"Additional eC compiler flags", hotKey = altG;
+ position = { 148, 154 }, size = { 300, 22 }, anchor = { left = 148, top = 154, right = 8 };
+
+ bool NotifyModified(EditBox editBox)
+ {
+ if(loadedCompiler)
+ {
+ CompilerConfig compiler = loadedCompiler;
+ compiler.eCcompilerFlags = ((StringListBox)editBox).strings;
+ modifiedDocument = true;
+ compilersTab.modifiedDocument = true;
+ }
+ return true;
+ }
+ }
+
+ Label lblCompilerFlags { this, position = { 8, 186 }, labeledWindow = compilerFlags };
+ StringListBox compilerFlags
+ {
+ this, text = $"Additional compiler flags", hotKey = altR;
+ position = { 148, 184 }, size = { 300, 22 }, anchor = { left = 148, top = 184, right = 8 };
+
+ bool NotifyModified(EditBox editBox)
+ {
+ if(loadedCompiler)
+ {
+ CompilerConfig compiler = loadedCompiler;
+ compiler.compilerFlags = ((StringListBox)editBox).strings;
+ modifiedDocument = true;
+ compilersTab.modifiedDocument = true;
+ }
+ return true;
+ }
+ }
+
+ Label lblLinkerFlags { this, position = { 8, 216 }, labeledWindow = linkerFlags };
StringListBox linkerFlags
{
- this, text = $"Additional Linker flags:", hotKey = altL;
- position = { 148, 152 }, size = { 300 };
+ this, text = $"Additional linker flags", hotKey = altL;
+ position = { 148, 214 }, size = { 300, 22 }, anchor = { left = 148, top = 214, right = 8 };
bool NotifyModified(EditBox editBox)
{
}
}
- Label lblExcludedLibraries { this, position = { 8, 180 }, labeledWindow = excludedLibraries };
+ Label lblExcludedLibraries { this, position = { 8, 246 }, labeledWindow = excludedLibraries };
StringListBox excludedLibraries
{
- this, text = $"Libraries to exclude:", hotKey = altX;
- position = { 148, 180 }, size = { 300 };
+ this, text = $"Libraries to exclude", hotKey = altX;
+ position = { 148, 244 }, size = { 300, 22 }, anchor = { left = 148, top = 244, right = 8 };
bool NotifyModified(EditBox editBox)
{
distccHosts.contents = compiler.distccHosts;
prepDefs.strings = compiler.prepDirectives;
excludedLibraries.strings = compiler.excludeLibs;
+ eCcompilerFlags.strings = compiler.eCcompilerFlags;
+ compilerFlags.strings = compiler.compilerFlags;
linkerFlags.strings = compiler.linkerFlags;
-
+
labelTargetPlatform.disabled = disabled;
targetPlatform.disabled = disabled;
this, size = { 160, 21 }, position = { 8, 52 }, anchor = { left = 8, top = 52, right = 8 };
text = $"Default Target Directory", hotKey = altT;
- bool NotifyModified(PathBox editBox)
+ bool NotifyModified(PathBox pathBox)
{
+ BasicValidatePathBoxPath(pathBox);
modifiedDocument = true;
return true;
}
this, size = { 160, 21 }, position = { 8, 96 }, anchor = { left = 8, top = 96, right = 8 };
text = $"Default Intermediate Objects Directory", hotKey = altI;
- bool NotifyModified(PathBox editBox)
+ bool NotifyModified(PathBox pathBox)
{
+ BasicValidatePathBoxPath(pathBox);
modifiedDocument = true;
return true;
}
};
}
-// COMPILER TOFIX: if class GlobalSettingsSubTab is after class WorkspaceOptionsTab the OnPostCreate
+// COMPILER TOFIX: if class GlobalSettingsSubTab is after class WorkspaceOptionsTab the OnPostCreate
// of WorkspaceOptionsTab will *not* be called!
class GlobalSettingsSubTab : Tab
{
for(compiler : dialog.ideSettings.compilerConfigs)
{
row = defaultCompilerDropBox.AddString(compiler.name);
- if(dialog.ideSettings.defaultCompiler && dialog.ideSettings.defaultCompiler[0] &&
+ if(dialog.ideSettings.defaultCompiler && dialog.ideSettings.defaultCompiler[0] &&
!strcmp(compiler.name, dialog.ideSettings.defaultCompiler))
defaultCompilerDropBox.currentRow = row;
}