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:
parent
8942f22a9b
commit
cff722a4af
129 changed files with 4458 additions and 2318 deletions
|
|
@ -35,10 +35,10 @@ namespace KeyboardFocusTraverserHelpers
|
|||
}
|
||||
|
||||
static Component* traverse (Component* current, Component* container,
|
||||
FocusHelpers::NavigationDirection direction)
|
||||
detail::FocusHelpers::NavigationDirection direction)
|
||||
{
|
||||
if (auto* comp = FocusHelpers::navigateFocus (current, container, direction,
|
||||
&Component::isKeyboardFocusContainer))
|
||||
if (auto* comp = detail::FocusHelpers::navigateFocus (current, container, direction,
|
||||
&Component::isKeyboardFocusContainer))
|
||||
{
|
||||
if (isKeyboardFocusable (comp, container))
|
||||
return comp;
|
||||
|
|
@ -53,13 +53,13 @@ namespace KeyboardFocusTraverserHelpers
|
|||
Component* KeyboardFocusTraverser::getNextComponent (Component* current)
|
||||
{
|
||||
return KeyboardFocusTraverserHelpers::traverse (current, current->findKeyboardFocusContainer(),
|
||||
FocusHelpers::NavigationDirection::forwards);
|
||||
detail::FocusHelpers::NavigationDirection::forwards);
|
||||
}
|
||||
|
||||
Component* KeyboardFocusTraverser::getPreviousComponent (Component* current)
|
||||
{
|
||||
return KeyboardFocusTraverserHelpers::traverse (current, current->findKeyboardFocusContainer(),
|
||||
FocusHelpers::NavigationDirection::backwards);
|
||||
detail::FocusHelpers::NavigationDirection::backwards);
|
||||
}
|
||||
|
||||
Component* KeyboardFocusTraverser::getDefaultComponent (Component* parentComponent)
|
||||
|
|
@ -74,9 +74,9 @@ Component* KeyboardFocusTraverser::getDefaultComponent (Component* parentCompone
|
|||
std::vector<Component*> KeyboardFocusTraverser::getAllComponents (Component* parentComponent)
|
||||
{
|
||||
std::vector<Component*> components;
|
||||
FocusHelpers::findAllComponents (parentComponent,
|
||||
components,
|
||||
&Component::isKeyboardFocusContainer);
|
||||
detail::FocusHelpers::findAllComponents (parentComponent,
|
||||
components,
|
||||
&Component::isKeyboardFocusContainer);
|
||||
|
||||
auto removePredicate = [parentComponent] (const Component* comp)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue