static ProjectNode currentNode;
static Project project;
-static String MakeString(char * s, int len, char * switchToKeep, int lenSwitchToKeep)
+static String MakeString(const char * s, int len, const char * switchToKeep, int lenSwitchToKeep)
{
String string = new char[len+1];
if(s[0] == '-' && switchToKeep && switchToKeep[0])
class StringListBox : EditBox
{
- char * switchToKeep;
+ const char * switchToKeep;
int lenSwitchToKeep;
textHorzScroll = true;
{
Array<String> array { };
int c, start = 0;
- char * contents = property::contents;
+ const char * contents = property::contents;
char * s;
char ch;
bool quoted = false;
//char * s = PrintString("Project Settings - ", project.topNode.fileName);
//text = s;
char * projectName = new char[strlen(project.topNode.name) + 1];
- char * nodeName = currentNode && currentNode != project.topNode ? currentNode.name : "";
- char * config = buildTab.selectedConfigName;
- char * platform = buildTab.selectedPlatformName;
+ const char * nodeName = currentNode && currentNode != project.topNode ? currentNode.name : "";
+ const char * config = buildTab.selectedConfigName;
+ const char * platform = buildTab.selectedPlatformName;
char * label = new char[strlen(dialogTitle) + 3 + strlen(project.topNode.name) + 3 +
strlen(nodeName) + 2 + strlen(config) + 1 + strlen(platform) + 1 + 1];
strcpy(label, dialogTitle);
}
}
-#define OPTION(x) ((uint)(&((ProjectOptions)0).x))
+#define OPTION(x) ((uint)(uintptr)(&((ProjectOptions)0).x))
// TOFIX: USING T INSTEAD OF Z HERE CAUSED US SOME CONFLICTS WITH T IN Array TEMPLATES
}
property bool visible { set { editor.visible = value; } get { return editor.visible; } }
- property Window parent { set { editor.parent = value; Window::parent = value; master = value; editor.id = (int64)this; } }
+ property Window parent { set { editor.parent = value; Window::parent = value; master = value; editor.id = (int64)(intptr)this; } }
property Point position { set { editor.position = value; } }
property Size size { set { editor.size = value; } }
property Anchor anchor { set { editor.anchor = value; } }
property Key hotKey { set { editor.hotKey = value; } }
- property char * text { set { editor.text = value; Window::text = value; } }
+ property const char * text { set { editor.caption = value; Window::caption = value; } }
uint option;
bool NotifySelect(MenuItem selection, Modifiers mods)
{
- OptionBox ob = (OptionBox)id;
+ OptionBox ob = (OptionBox)(intptr)id;
if(eClass_IsDerived(ob._class, class(CheckBoxForEnumOptionBox)))
{
Window slave;
bool Window::OptionBox_OnRightButtonDown(int x, int y, Modifiers mods)
{
- OptionBox ob = (OptionBox)id;
+ OptionBox ob = (OptionBox)(intptr)id;
GuiApplication app = ((GuiApplication)__thisModule.application);
Activate();
PopupMenu { null, this, menu = ob.clearMenu,
bool Window::OptionBox_OnKeyDown(Key key, unichar ch)
{
- OptionBox ob = (OptionBox)id;
+ OptionBox ob = (OptionBox)(intptr)id;
if(key == Key { del, ctrl = true } || key == Key { keyPadDelete, ctrl = true })
{
ob.Unset();
void Unset()
{
- char * platformName = platform ? platform.OnGetString(0,0,0) : null;
+ const char * platformName = platform ? platform.OnGetString(0,0,0) : null;
MarkBuildTabModified();
if(config)
void FigureOutInherited()
{
ProjectNode node;
- char * platformName = platform ? platform.OnGetString(0,0,0) : null;
+ const char * platformName = platform ? platform.OnGetString(0,0,0) : null;
bool skipped = false;
for(node = currentNode; node; node = node.parent)
{
void Retrieve()
{
- char * platformName = platform ? platform.OnGetString(0,0,0) : null;
+ const char * platformName = platform ? platform.OnGetString(0,0,0) : null;
MarkBuildTabModified();
if(config)
{
void Load()
{
ProjectNode node;
- char * platformName = platform ? platform.OnGetString(0,0,0) : null;
+ const char * platformName = platform ? platform.OnGetString(0,0,0) : null;
bool setAttribs = false;
for(node = currentNode; node; node = node.parent)
{
{
bool NotifyModified(EditBox editBox)
{
- ((OptionBox)editBox.id).Retrieve();
+ ((OptionBox)(intptr)editBox.id).Retrieve();
return true;
}
bool NotifyModified(PathBox pathBox)
{
FixPathOnPathBoxNotifyModified(pathBox);
- ((OptionBox)pathBox.id).Retrieve();
+ ((OptionBox)(intptr)pathBox.id).Retrieve();
return true;
}
};
if(tempStrings)
{
- Array<String> ts = tempStrings;
while(it.Next())
{
String s = it.data;
{
bool NotifyModified(EditBox editBox)
{
- ((OptionBox)editBox.id).Retrieve();
+ ((OptionBox)(intptr)editBox.id).Retrieve();
return true;
}
};
Array<String> GetStrings() { return ((StringListBox)editor).strings; }
void SetStrings(Array<String> value) { ((StringListBox)editor).strings = value; }
- property char * switchToKeep { set { ((StringListBox)editor).switchToKeep = value; ((StringListBox)editor).lenSwitchToKeep = strlen(value); } };
+ property const char * switchToKeep { set { ((StringListBox)editor).switchToKeep = value; ((StringListBox)editor).lenSwitchToKeep = strlen(value); } };
}
class StringsArrayOptionBox : MultiStringOptionBox
{
editor = StringsBox
{
- bool OnCreate()
+ /*bool OnCreate()
{
project = ::project;
return true;
- }
+ }*/
bool NotifyModified(StringsBox stringsBox)
{
- ((OptionBox)stringsBox.id).Retrieve();
+ ((OptionBox)(intptr)stringsBox.id).Retrieve();
return true;
}
};
{
if(path[0] && to[0])
{
- char rest[MAX_FILENAME];
char pathPart[MAX_FILENAME], pathRest[MAX_LOCATION] = "";
char toPart[MAX_FILENAME], toRest[MAX_LOCATION] = "";
SplitDirectory(path, pathPart, pathRest);
class DirsArrayOptionBox : MultiStringOptionBox
{
public:
- property char * switchToKeep { set { switchToKeep = value; lenSwitchToKeep = strlen(value); } };
+ property const char * switchToKeep { set { switchToKeep = value; lenSwitchToKeep = strlen(value); } };
private:
- char * switchToKeep;
+ const char * switchToKeep;
int lenSwitchToKeep;
editor = DirectoriesBox
browseDialog = { };
bool NotifyModified(DirectoriesBox dirsBox)
{
- char * switchToKeep = ((DirsArrayOptionBox)dirsBox.id).switchToKeep;
+ const char * switchToKeep = ((DirsArrayOptionBox)(intptr)dirsBox.id).switchToKeep;
if(switchToKeep && switchToKeep[0])
{
bool change = false;
- int lenSwitchToKeep = ((DirsArrayOptionBox)dirsBox.id).lenSwitchToKeep;
+ int lenSwitchToKeep = ((DirsArrayOptionBox)(intptr)dirsBox.id).lenSwitchToKeep;
Array<String> dirs { };
Array<String> previousDirs = dirsBox.strings;
for(d : previousDirs)
previousDirs.Free();
delete previousDirs;
}
- ((OptionBox)dirsBox.id).Retrieve();
+ ((OptionBox)(intptr)dirsBox.id).Retrieve();
return true;
}
bool NotifyClicked(Button button, int x, int y, Modifiers mods)
{
- ((OptionBox)button.id).Retrieve();
+ ((OptionBox)(intptr)button.id).Retrieve();
return true;
}
};
bool NotifyClicked(Button button, int x, int y, Modifiers mods)
{
- ((OptionBox)button.id).Retrieve();
+ ((OptionBox)(intptr)button.id).Retrieve();
{
Window slave;
for(slave = master.firstSlave; slave; slave = slave.nextSlave)
{
if(eClass_IsDerived(slave._class, class(CheckBoxForEnumOptionBox)) &&
- slave != (Window)button.id &&
- ((OptionBox)slave).option == ((OptionBox)button.id).option)
+ slave != (Window)(intptr)button.id &&
+ ((OptionBox)slave).option == ((OptionBox)(intptr)button.id).option)
((OptionBox)slave).Load();
}
}
{
bool NotifySelect(DropBox dropBox, DataRow row, Modifiers mods)
{
- ((OptionBox)dropBox.id).Retrieve();
+ ((OptionBox)(intptr)dropBox.id).Retrieve();
return true;
}
};
ProjectNode lastSelectedNode;
- property char * selectedConfigName
+ property const char * selectedConfigName
{
get
{
SelectorButton button = (SelectorButton)configSelector.selectedButton;
if(button && button.id)
{
- ProjectConfig config = (ProjectConfig)button.id;
+ ProjectConfig config = (ProjectConfig)(intptr)button.id;
return config.name;
}
}
}
}
- property char * selectedPlatformName
+ property const char * selectedPlatformName
{
get
{
if(button && button.id)
{
Platform platform = (Platform)button.id;
- char * platformName = platform ? platform.OnGetString(0,0,0) : null; // all these platformName are leaking, no?
+ const char * platformName = platform ? platform.OnGetString(0,0,0) : null; // all these platformName are leaking, no?
return platformName;
}
}
button =
{
- configSelector, renameable = true, master = this, text = config.name, id = (int64)config;
+ configSelector, renameable = true, master = this, text = config.name, id = (int64)(intptr)config;
NotifyClicked = ConfigClicked, OnRename = ConfigOnRename;
};
String msg = PrintString($"Are you sure you wish to delete the ", config.name, $" configuration?");
if(MessageBox { type = okCancel, text = title, contents = msg }.Modal() == ok)
{
- Iterator<Window> it { configSelector.controls };
+ //Iterator<Window> it { configSelector.controls };
ProjectConfig configToDelete = config;
/*
while(it.Next())
}
}
*/
- SelectorButton button = configSelector.FindButtonByID((int64)configToDelete);
+ SelectorButton button = configSelector.FindButtonByID((int64)(intptr)configToDelete);
if(button)
configSelector.RemoveButton(button);
text = $"(Right click or press Ctrl-Del to revert an option to inherited value)", anchor = { top = 72, right = 16 }
};
- void FindUniqueConfigName(char * baseName, bool startWithNumber, char * output)
+ void FindUniqueConfigName(const char * baseName, bool startWithNumber, char * output)
{
int num = 0;
char tmp[MAX_F_STRING];
{
if(!eClass_IsDerived(clickedButton._class, class(EditableSelectorButton)) || !((EditableSelectorButton)clickedButton).editBox)
{
- config = (ProjectConfig)clickedButton.id;
+ config = (ProjectConfig)(intptr)clickedButton.id;
// Load Settings Into Dialog
compilerTab.LoadSettings();
}
else
{
- compilerTab.rightPaneHeader.id = (int64)node;
+ compilerTab.rightPaneHeader.id = (int64)(intptr)node;
compilerTab.rightPaneHeader.Update(null);
compilerTab.rightPaneHeader.visible = true;
}
{
- DataRow row = compilerTab.fileList.FindSubRow((int64)currentNode);
+ DataRow row = compilerTab.fileList.FindSubRow((int64)(intptr)currentNode);
if(row)
{
compilerTab.fileList.currentRow = row;
void CreateConfigButtons()
{
- SelectorButton commonButton;
-
// Create Config Buttons
- commonButton = SelectorButton
+ SelectorButton
{
- configSelector, master = this, text = $"Common", id = (int64)null; font = { font.faceName, font.size, true };
+ configSelector, master = this, text = $"Common", id = 0; font = { font.faceName, font.size, true };
checked = true;
NotifyClicked = ConfigClicked;
};
{
EditableSelectorButton button
{
- configSelector, master = this, renameable = true, text = c.name, id = (int64)c;
+ configSelector, master = this, renameable = true, text = c.name, id = (int64)(intptr)c;
NotifyClicked = ConfigClicked, OnRename = ConfigOnRename;
};
}
while(it.Next())
{
SelectorButton configButton = (SelectorButton)it.data;
- ProjectConfig buttonConfig = (ProjectConfig)configButton.id;
+ ProjectConfig buttonConfig = (ProjectConfig)(intptr)configButton.id;
if(buttonConfig == project.config)
{
configButton.Activate();
configButton.checked = true;
- ConfigClicked(configButton, 0, 0, (Modifiers)null);
+ ConfigClicked(configButton, 0, 0, 0);
break;
}
}
while(it.Next())
{
Button button = (Button)it.data;
- ProjectConfig c = (ProjectConfig)button.id;
+ ProjectConfig c = (ProjectConfig)(intptr)button.id;
if(c && !strcmp(c.name, configName))
{
config = c;
bool NotifySelect(ListBox listBox, DataRow row, Modifiers mods)
{
BuildTab buildTab = (BuildTab)master;
- ProjectNode node = (ProjectNode)row.tag;
+ ProjectNode node = (ProjectNode)(intptr)row.tag;
buildTab.SelectNode(node, false);
return true;
}
{
ide.projectView.drawingInProjectSettingsDialogHeader = true;
((void (*)(void *, void *, void *, int, int, int, void *, uint, uint))(void *)class(ProjectNode)._vTbl[__ecereVMethodID_class_OnDisplay])(class(ProjectNode),
- (void *)id, surface, 8, 2, clientSize.w, ide.projectView, Alignment::left, DataDisplayFlags { selected = true });
+ (void *)(intptr)id, surface, 8, 2, clientSize.w, ide.projectView, Alignment::left, DataDisplayFlags { selected = true });
ide.projectView.drawingInProjectSettingsDialogHeader = false;
}
}
{
DataRow row = addTo ? addTo.AddRow() : fileList.AddRow();
- row.tag = (int64)node;
+ row.tag = (int64)(intptr)node;
row.SetData(null, node);
void LoadSettings()
{
- bool disabled = strlen(((BuildTab)master).selectedPlatformName) > 0;
OptionBox ob;
for(ob = (OptionBox)firstSlave; ob; ob = (OptionBox)ob.nextSlave)
if(eClass_IsDerived(ob._class, class(OptionBox)))