void TextEditorWindow::addTrigger(int typ) { if (!getTrigger()) { Trigger* trig=new Trigger(typ); ((EditorComponent*)getContentComponent())->setTrigger(trig); } }
void PokeLaunchApplication::MainWindow::activeWindowStatusChanged() { if (!isActiveWindow()) { auto contentComponent = getContentComponent(); if (contentComponent) { ((MainContentComponent*)contentComponent)->handleMainWindowInactive(); } } }
void MultiDocumentPanelWindow::closeButtonPressed() { MultiDocumentPanel* const owner = getOwner(); jassert (owner != nullptr); // these windows are only designed to be used inside a MultiDocumentPanel! if (owner != nullptr) owner->closeDocument (getContentComponent(), true); }
void MainWindow::makeVisible() { setVisible (true); restoreWindowPosition(); addToDesktop(); getContentComponent()->grabKeyboardFocus(); }
void MainWindow::showNewProjectWizard() { jassert (currentProject == nullptr); setContentOwned (createNewProjectWizardComponent(), true); centreWithSize (900, 630); setVisible (true); addToDesktop(); getContentComponent()->grabKeyboardFocus(); }
void MainWindow::makeVisible() { restoreWindowPosition(); setVisible (true); addToDesktop(); // (must add before restoring size so that fullscreen will work) restoreWindowPosition(); getContentComponent()->grabKeyboardFocus(); }
void MainAppWindow::showMessageBubble (const String& text) { currentBubbleMessage = new BubbleMessageComponent (500); getContentComponent()->addChildComponent (currentBubbleMessage); AttributedString attString; attString.append (text, Font (15.0f)); currentBubbleMessage->showAt (Rectangle<int> (getLocalBounds().getCentreX(), 10, 1, 1), attString, 500, // numMillisecondsBeforeRemoving true, // removeWhenMouseClicked false); // deleteSelfAfterUse }
MainWindow (String name) : DocumentWindow (name, Colours::lightgrey, DocumentWindow::allButtons) { setUsingNativeTitleBar (true); setContentOwned (new MainComponent(), true); setResizable (true, false); setResizeLimits (1280, 780, 3800, 3800); centreWithSize (getWidth (), getHeight ()); setVisible (true); setWantsKeyboardFocus (false); getContentComponent()->grabKeyboardFocus(); }
Trigger* TextEditorWindow::getTrigger() { return ((EditorComponent*)getContentComponent())->getTrigger(); }
ProjectContentComponent* MainWindow::getProjectContentComponent() const { return dynamic_cast<ProjectContentComponent*> (getContentComponent()); }
void TextEditorWindow::removeTrigger() { if (getTrigger()) ((EditorComponent*)getContentComponent())->removeTrigger(); }
GraphDocumentComponent* MainHostWindow::getGraphEditor() const { return dynamic_cast <GraphDocumentComponent*> (getContentComponent()); }
void PluginWindow::closeButtonPressed() { dynamic_cast<AudioPluginInstance*> (owner->getProcessor())->editorBeingDeleted( dynamic_cast<AudioProcessorEditor*>(getContentComponent()) ); delete this; }
PluginWindow::~PluginWindow() { dynamic_cast<AudioPluginInstance*> (owner->getProcessor())->editorBeingDeleted( dynamic_cast<AudioProcessorEditor*>(getContentComponent()) ); activePluginWindows.removeFirstMatchingValue (this); clearContentComponent(); }
TextBuffer* TextEditorWindow::getTextBuffer() { // return buffer; return ((EditorComponent*)getContentComponent())->getBuffer(); }
bool FileLocationEditorWindow::locationsHaveChanged() const { FileLocationEditor* fileLocationEditor = dynamic_cast<FileLocationEditor*>(getContentComponent()); return fileLocationEditor->locationsHaveChanged(); }
ValueTree FileLocationEditorWindow::getFileLocations() const { FileLocationEditor* fileLocationEditor = dynamic_cast<FileLocationEditor*>(getContentComponent()); return fileLocationEditor->getFileLocations(); }