Adding Demo (and some minor editor features)#4
Open
dgm3333 wants to merge 5 commits intosantaclose:masterfrom
Open
Adding Demo (and some minor editor features)#4dgm3333 wants to merge 5 commits intosantaclose:masterfrom
dgm3333 wants to merge 5 commits intosantaclose:masterfrom
Conversation
Adding Demo (and some minor editor features)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding Demo (and some minor editor features)
This adds a demo with an image on the readme and instructions on how set it up
Adds some extra class functions and class variables as well as an enum for some of the demo features
inline void setLastSaveTime(uint64_t lastSaveTime = 0) { mLastSaveTime = lastSaveTime; }
inline uint64_t getLastSaveTime() { return mLastSaveTime; }
inline void setAutoSaveInterval(uint64_t autoSaveInterval = 0) { mAutoSaveInterval = autoSaveInterval; }
inline uint64_t getAutoSaveInterval() { return mAutoSaveInterval; }
inline void SetFilename(const std::string& aFilename) { mFilename = aFilename; }
inline std::string GetFilename() const { return mFilename; }
void MoveTo(const Coordinates& aPosition);
void SetFind(const std::string& aFindStr) { mFindStr = aFindStr; }
void Find();
inline void drawLineNumbers(bool dln = true) { mDrawLineNumbers = dln; }
bool mDrawLineNumbers = true;
uint64_t mLastSaveTime = 0;
uint64_t mAutoSaveInterval = 5;
std::string mFilename;
std::string mFindStr;
bool mNeedsInit = true;
enum textEditorFlags
{
textEditorFlags_None = 0,
textEditorFlags_NoStatusBar = 1 << 1, // Disable the status bar
textEditorFlags_StatusBarTop = 1 << 2, // Status bar on Top (else at bottom)
textEditorFlags_NoMenuBar = 1 << 3, // disable the menu-bar
textEditorFlags_ReadOnly = 1 << 4,
textEditorFlags_ReadOnly_OnceOnly = 1 << 5,
textEditorFlags_NoOpen = 1 << 6, // disable open
textEditorFlags_NoSave = 1 << 7, // disable save
textEditorFlags_AutoSave = 1 << 8,
textEditorFlags_NoQuit = 1 << 9, // disable quit
textEditorFlags_NoLineNumbers = 1 << 10, // don't display line numbers