1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

GUI Basics: Refactor juce_gui_basics file structure

- Created a new detail namespace
- Moved shared module implementation details into the detail namespace
- Split dependencies so source files only rely on details in the detail namespace
- Removed all code from the juce_gui_basics.cpp file
This commit is contained in:
Anthony Nicholls 2023-03-03 10:17:48 +00:00
parent 8942f22a9b
commit cff722a4af
129 changed files with 4458 additions and 2318 deletions

View file

@ -605,7 +605,7 @@ void FileBrowserComponent::getRoots (StringArray& rootNames, StringArray& rootPa
void FileBrowserComponent::timerCallback()
{
const auto isProcessActive = isForegroundOrEmbeddedProcess (this);
const auto isProcessActive = detail::WindowingHelpers::isForegroundOrEmbeddedProcess (this);
if (wasProcessActive != isProcessActive)
{

View file

@ -165,7 +165,7 @@ bool FileChooser::browseForDirectory()
bool FileChooser::showDialog (const int flags, FilePreviewComponent* const previewComp)
{
FocusRestorer focusRestorer;
detail::FocusRestorer focusRestorer;
pimpl = createPimpl (flags, previewComp);
pimpl->runModally();

View file

@ -115,7 +115,7 @@ FileChooserDialogBox::FileChooserDialogBox (const String& name,
if (parentComp != nullptr)
parentComp->addAndMakeVisible (this);
else
setAlwaysOnTop (juce_areThereAnyAlwaysOnTopWindows());
setAlwaysOnTop (detail::WindowingHelpers::areThereAnyAlwaysOnTopWindows());
}
FileChooserDialogBox::~FileChooserDialogBox()

View file

@ -26,9 +26,6 @@
namespace juce
{
Image juce_createIconForFile (const File& file);
//==============================================================================
FileListComponent::FileListComponent (DirectoryContentsList& listToShow)
: ListBox ({}, this),
@ -217,7 +214,7 @@ private:
if (im.isNull() && ! onlyUpdateIfCached)
{
im = juce_createIconForFile (file);
im = detail::WindowingHelpers::createIconForFile (file);
if (im.isValid())
ImageCache::addImageToCache (im, hashCode);

View file

@ -261,7 +261,7 @@ private:
if (im.isNull() && ! onlyUpdateIfCached)
{
im = juce_createIconForFile (file);
im = detail::WindowingHelpers::createIconForFile (file);
if (im.isValid())
ImageCache::addImageToCache (im, hashCode);