Improvements to the code editor (added save/save as and more).

Added FileSystem::fileCanWrite.
Syntax Definition now can guess the language based on its header.
Added more syntax definitons.
Fixed borders alpha.
This commit is contained in:
Martín Lucas Golini
2020-06-14 02:53:49 -03:00
parent 82f4fc1656
commit 85d3886fc0
19 changed files with 1171 additions and 94 deletions

View File

@@ -43,12 +43,14 @@ class App {
void init( const std::string& file = "" );
void loadFileFromPath( const std::string& path, UICodeEditor* codeEditor = NULL );
bool loadFileFromPath( const std::string& path, UICodeEditor* codeEditor = NULL );
void setAppTitle( const std::string& title );
void openFileDialog();
void saveFileDialog();
void findPrevText( String text = "", const bool& caseSensitive = true );
void findNextText( String text = "", const bool& caseSensitive = true );
@@ -98,7 +100,7 @@ class App {
UISceneNode* mUISceneNode{NULL};
UICodeEditor* mCurEditor{NULL};
Console* mConsole{NULL};
std::string mWindowTitle{"eepp - Code Editor"};
std::string mWindowTitle{"ecode"};
UIMessageBox* mMsgBox{NULL};
String mLastSearch;
UILayout* mBaseLayout{NULL};
@@ -109,6 +111,7 @@ class App {
UIPopUpMenu* mSettingsMenu;
UITextView* mSettingsButton;
UIPopUpMenu* mColorSchemeMenu;
UIPopUpMenu* mFiletypeMenu;
UITheme* mTheme;
void onFileDropped( String file );
@@ -142,6 +145,14 @@ class App {
void updateColorSchemeMenu();
void setColorScheme( const std::string& name );
UIMenu* createFiletypeMenu();
void updateCurrentFiletype();
void updateEditorState();
void saveDoc();
};
#endif // EE_TOOLS_CODEEDITOR_HPP