MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / SaveFileAs

Function SaveFileAs

Applications/TextEdit/main.cpp:101–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void SaveFileAs(){
102 char* filePath = Lemon::GUI::FileDialog(".", FILE_DIALOG_CREATE);
103
104 if(!filePath){
105 Lemon::GUI::DisplayMessageBox("Message", "Invalid filepath!", Lemon::GUI::MsgButtonsOK);
106 return;
107 }
108
109 SaveFile(filePath);
110
111 openPath = filePath;
112
113 char title[32 + strlen(filePath)];
114 sprintf(title, "Text Editor: %s", filePath);
115
116 window->SetTitle(title);
117}
118
119void SaveOpenFile(){
120 if(!openPath.length()){

Callers 2

SaveOpenFileFunction · 0.85
OnWindowCmdFunction · 0.85

Calls 5

FileDialogFunction · 0.85
DisplayMessageBoxFunction · 0.85
SaveFileFunction · 0.85
strlenFunction · 0.85
SetTitleMethod · 0.45

Tested by

no test coverage detected