Skip to content

Commit c2d7e0d

Browse files
committed
nav: add insert panel helper.
1 parent c48bf05 commit c2d7e0d

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

include/element/ui/navigation.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class NavigationConcertinaPanel : public juce::ConcertinaPanel {
2424

2525
int getIndexOfPanel (juce::Component* panel);
2626
Component* findPanelByName (const juce::String& name);
27+
void insertPanel (juce::Component* comp, int index = -1);
2728
void showPanel (const juce::String& name);
2829
void hidePanel (const juce::String& name);
2930
void setPanelName (const juce::String& panel, const juce::String& newName);

src/ui/navigation.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,12 @@ int NavigationConcertinaPanel::getIndexOfPanel (Component* panel)
239239
}
240240

241241
//====
242+
243+
void NavigationConcertinaPanel::insertPanel (juce::Component* comp, int index)
244+
{
245+
addPanelInternal (index, comp);
246+
}
247+
242248
void NavigationConcertinaPanel::showPanel (const juce::String& name)
243249
{
244250
namesHidden.removeString (name);

0 commit comments

Comments
 (0)