Added UIApplication class to easily initialize GUI Applications.

Addind 7GUIs examples (https://eugenkiss.github.io/7guis/). Currently implemented the first three: Counter, Temperature Converter and Flight Booker.
Fixes in IgnoreMatcher and ProjectDirectoryTree.
Window::runMainLoop now accepts an std::function<void()>, this allows to use lambdas with captures.
UITextInput when using only numbers allow to insert + and - at the beggining of the number.
Return Node* on Node::setFocus().
String::fromFloat and String::fromDouble will shrink the number as much as possible (delete extra 0 and .).
This commit is contained in:
Martín Lucas Golini
2024-02-04 22:01:32 -03:00
parent 9797d49723
commit bb26ac4706
24 changed files with 361 additions and 29 deletions

View File

@@ -30,9 +30,7 @@ ProjectDirectoryTree::~ProjectDirectoryTree() {
mRunning = false;
Lock l( mFilesMutex );
}
{
Lock l( mDoneMutex );
}
{ Lock l( mDoneMutex ); }
}
void ProjectDirectoryTree::scan( const ProjectDirectoryTree::ScanCompleteEvent& scanComplete,
@@ -320,8 +318,10 @@ void ProjectDirectoryTree::onChange( const ProjectDirectoryTree::Action& action,
}
void ProjectDirectoryTree::tryAddFile( const FileInfo& file ) {
if ( mIgnoreHidden && file.isHidden() )
return;
IgnoreMatcherManager matcher( getIgnoreMatcherFromPath( file.getFilepath() ) );
if ( !matcher.foundMatch() || !matcher.match( file.getDirectoryPath(), file.getFilepath() ) ) {
if ( !matcher.foundMatch() || !matcher.match( file ) ) {
bool foundPattern = mAcceptedPatterns.empty();
for ( auto& pattern : mAcceptedPatterns ) {
if ( pattern.matches( file.getFilepath() ) ) {
@@ -345,6 +345,8 @@ void ProjectDirectoryTree::addFile( const FileInfo& file ) {
if ( file.isDirectory() ) {
if ( !String::startsWith( file.getFilepath(), mPath ) || isDirInTree( file.getFilepath() ) )
return;
if ( mIgnoreHidden && file.isHidden() )
return;
Lock l( mFilesMutex );
std::vector<std::string> files;
std::vector<std::string> names;