MainWindow(const String &commandLine) : DocumentWindow ("Sunrise",Colours::lightgrey,DocumentWindow::allButtons) { jobManager = new SunriseJobManager(commandLine.isEmpty() ? File::getSpecialLocation(File::userHomeDirectory).getChildFile(".sunriserc") : File(commandLine)); setUsingNativeTitleBar(true); #ifdef LINUX_RPI setUsingNativeTitleBar (false); setTitleBarHeight (0); setFullScreen (true); #endif setContentOwned (new SunriseMain(*jobManager), true); centreWithSize (getWidth(), getHeight()); setVisible (true); }
MainAppWindow::MainAppWindow() : DocumentWindow (JUCEApplication::getInstance()->getApplicationName(), Colours::lightgrey, DocumentWindow::allButtons) { setUsingNativeTitleBar (true); setResizable (true, false); setResizeLimits (400, 400, 10000, 10000); #if JUCE_IOS || JUCE_ANDROID setFullScreen (true); #else setBounds ((int) (0.1f * getParentWidth()), (int) (0.1f * getParentHeight()), jmax (850, (int) (0.5f * getParentWidth())), jmax (600, (int) (0.7f * getParentHeight()))); #endif contentComponent = new ContentComponent(); setContentNonOwned (contentComponent, false); setVisible (true); // this lets the command manager use keypresses that arrive in our window to send out commands addKeyListener (getApplicationCommandManager().getKeyMappings()); #if JUCE_WINDOWS || JUCE_LINUX || JUCE_MAC taskbarIcon = new DemoTaskbarComponent(); #endif #if JUCE_ANDROID setOpenGLRenderingEngine(); #endif triggerAsyncUpdate(); }
MainWindow() : DocumentWindow ("MainWindow", Colours::lightgrey, DocumentWindow::allButtons) { setContentOwned (new MainComponent(), true); centreWithSize (getWidth(), getHeight()); setResizable (true, true); setUsingNativeTitleBar (true); }
MLAppWindow::MLAppWindow() : mpAppView(0), DocumentWindow (MLProjectInfo::projectName, Colour::fromHSV(0.5f, 0.0f, 0.30f, 1.f), DocumentWindow::allButtons, true), mpConstrainer(0), mUsingGL(false), mGridUnitsX(0.), mGridUnitsY(0.) { setResizable(true, false); setResizeLimits (400, 300, 8192, 8192); commandManager.registerAllCommandsForTarget (JUCEApplication::getInstance()); // this lets the command manager use keypresses that arrive in our window to send // out commands addKeyListener (commandManager.getKeyMappings()); mpBorder = std::unique_ptr<MLAppBorder>(new MLAppBorder()); setContentOwned(mpBorder.get()->getComponent(), false); mpConstrainer = new MLBoundsConstrainer(); setConstrainer (mpConstrainer); setUsingNativeTitleBar (true); // tells our menu bar model that it should watch this command manager for // changes, and send change messages accordingly. //&mBorder->setApplicationCommandManagerToWatch (&commandManager); //setVisible (true); }
ZenDebugEditor::ZenDebugEditor() : DocumentWindow("Zen Debug", Colours::lightgrey, DocumentWindow::allButtons) { this->setName("ValueTreeEditorWindow"); tabsComponent = new TabbedComponent(TabbedButtonBar::TabsAtTop); tabsComponent->setName("DebugTabbedComponent"); valueTreeEditorComponent = new ValueTreeEditor::Editor("ValueTreeEditor"); tabsComponent->addTab("Params", Colours::lightgrey, valueTreeEditorComponent, false); bufferVisualiserComponent = new BufferVisualiser("BufferVisualiser"); tabsComponent->addTab("Buffers", Colours::lightgrey, bufferVisualiserComponent->getComponent(), false); midiVisualiserComponent = new ZenMidiVisualiserComponent("MidiVisualiser"); tabsComponent->addTab("MIDI", Colours::lightgrey, midiVisualiserComponent, false); notepadComponent = new NotepadComponent("Notepad", ""); tabsComponent->addTab("Notes", Colours::lightgrey, notepadComponent, false); componentVisualiserComponent = nullptr; this->setSize(400, 400); tabsComponent->setCurrentTabIndex(0); tabsComponent->setBounds(0, 0, getWidth(), getHeight()); setContentNonOwned(tabsComponent, false); setResizable(true, false); setUsingNativeTitleBar(true); centreWithSize(getWidth(), getHeight()); setVisible(true); }
AudioConfigurationWindow::AudioConfigurationWindow(AudioDeviceManager& adm, Button* cButton) : DocumentWindow("Audio Settings", Colours::red, DocumentWindow::closeButton), controlButton(cButton) { centreWithSize(360,300); setUsingNativeTitleBar(true); setResizable(false,false); //std::cout << "Audio CPU usage:" << adm.getCpuUsage() << std::endl; AudioDeviceSelectorComponent* adsc = new AudioDeviceSelectorComponent (adm, 0, // minAudioInputChannels 2, // maxAudioInputChannels 0, // minAudioOutputChannels 2, // maxAudioOutputChannels false, // showMidiInputOptions false, // showMidiOutputSelector false, // showChannelsAsStereoPairs false); // hideAdvancedOptionsWithButton adsc->setBounds(0,0,450,240); setContentOwned(adsc, true); setVisible(false); //setContentComponentSize(getWidth(), getHeight()); }
//============================================================================== MainWindow::MainWindow () : DocumentWindow ("JSDSP", Colours::azure, DocumentWindow::allButtons, true) { setResizable (true, true); // resizability is a property of ResizableWindow setResizeLimits (1200, 500, 1200, 500); setSize (1200, 500); setUsingNativeTitleBar(true); mainComponent = new MainComponent(); setContentNonOwned(mainComponent, false); mainComponent->setVisible(true); mainComponent->setSize(this->getWidth(), this->getHeight()); #if HIDE MainMenuBar *menuBar = new MainMenuBar(); setContentOwned (menuBar, false); // this tells the DocumentWindow to automatically create and manage a MenuBarComponent // which uses our contentComp as its MenuBarModel setMenuBar (menuBar); #endif }
void AlertWindow::lookAndFeelChanged() { const int newFlags = getLookAndFeel().getAlertBoxWindowFlags(); setUsingNativeTitleBar ((newFlags & ComponentPeer::windowHasTitleBar) != 0); setDropShadowEnabled (isOpaque() && (newFlags & ComponentPeer::windowHasDropShadow) != 0); }
//================================================================================================= MainWindow::MainWindow() : DocumentWindow (JUCEApplication::getInstance()->getApplicationName(), Colours::lightgrey, DocumentWindow::allButtons) { // 创建基础组件和读写文档的对象 baseComponent = new BaseComponent(); appDoc = LoadAndSaveDoc::getInstance(); appDoc->addChangeListener(this); // FileBasedDocument 对象绑定可变捕获器 // 获取全局性的撤销管理器、命令管理器和程序属性 undoManager = AppSingleton::getInstance()->getUndoManager(); commandManager = AppSingleton::getInstance()->getCommandManager(); appProperties = AppSingleton::getInstance()->getAppProperties(); // 注册命令目标 commandManager->registerAllCommandsForTarget (JUCEApplication::getInstance()); commandManager->registerAllCommandsForTarget (this); // 获取所有命令默认的快捷键 commandManager->getKeyMappings()->resetToDefaultMappings(); // 获取用户自定义的快捷键 ScopedPointer<XmlElement> keys(appProperties->getUserSettings()->getXmlValue("keyMappings")); if (keys != nullptr) commandManager->getKeyMappings()->restoreFromXml(*keys); // 本类绑定按键捕获器 addKeyListener (commandManager->getKeyMappings()); // 设置本类的默认属性 centreWithSize (1280, 800); setResizable(true, false); setResizeLimits(800, 600, 4096, 4096); setVisible (true); setUsingNativeTitleBar(true); // 主菜单随时关注命令的变化 setApplicationCommandManagerToWatch(commandManager); // 设置主菜单 #ifdef JUCE_MAC setMacMainMenu(this); #else setMenuBar(this); #endif // 恢复上次退出时的窗口状态 restoreWindowStateFromString(appProperties->getUserSettings()->getValue("mainWindowState")); setName(AppString::appNameOnTitleBar + TRANS("Untitled")); // 设置标题栏默认显示的文本 // 设置并添加基础组件 baseComponent->setSize(getWidth(), getHeight()); setContentOwned(baseComponent, false); // 设置当前进程为高优先级 Process::setPriority (Process::HighPriority); }
CSLWindow() : DocumentWindow (T("CSL 5.0 OSC/MIDI Server"), Colours::lightgrey, DocumentWindow::allButtons, true) { setContentComponent (createCSLComponent()); // create app window setResizable (false, false); setVisible (true); setUsingNativeTitleBar(true); centreWithSize(308, 200); // top window size 8 @ 24 larger than the component }
MainWindow (String name) : DocumentWindow (name,Colour(0xff3f3f3f),DocumentWindow::allButtons) { setUsingNativeTitleBar (true); setContentOwned (new MainContentComponent(), true); LookAndFeel::setDefaultLookAndFeel (&lookAndFeelV1); centreWithSize (getWidth(), getHeight()); setVisible (true); }
void ValueTreeDebugger::construct() { main = new ValueTreeDebuggerMain(); setContentNonOwned (main, true); setResizable (true, false); setUsingNativeTitleBar (true); centreWithSize (getWidth(), getHeight()); setVisible (true); }
MainWindow(String name) : DocumentWindow(name, Colours::lightgrey, DocumentWindow::closeButton) { setUsingNativeTitleBar(true); setContentOwned(new HelmStandaloneEditor(), true); setResizable(true, true); centreWithSize(getWidth(), getHeight()); setVisible(true); }
MainWindow (String name) : DocumentWindow (name, Colours::lightgrey, DocumentWindow::allButtons) { setUsingNativeTitleBar (true); setContentOwned (new MPETestClasses::MainComponent(), true); centreWithSize (getWidth(), getHeight()); setVisible (true); }
AserveWindow (String name, Audio& audio) : DocumentWindow (name, Colours::lightgrey, DocumentWindow::allButtons) { setUsingNativeTitleBar (true); setContentOwned (new AserveComponent (audio), true); centreWithSize (getWidth(), getHeight()); setVisible (true); }
MainWindow (const String& name) : DocumentWindow (name, Colours::lightgrey, DocumentWindow::allButtons) { setUsingNativeTitleBar (true); setContentOwned (createMainContentComponent(), true); setResizable (true, true); centreWithSize (getWidth(), getHeight()); setVisible (true); }
MainWindow() : DocumentWindow (ProjectInfo::projectName, Colours::lightgrey, DocumentWindow::allButtons) { setUsingNativeTitleBar (true); setContentOwned (new StringDemoComponent(), true); setResizable (true, false); centreWithSize (getWidth(), getHeight()); setVisible (true); }
MainWindow (String name) : DocumentWindow (name, Colours::lightgrey, DocumentWindow::allButtons) { setUsingNativeTitleBar (true); setContentOwned (new CONTENTCOMPCLASS(), true); centreWithSize (getWidth(), getHeight()); setVisible (true); }
LightingWindow::LightingWindow() : DocumentWindow("echomesh lighting simulator", Colours::lightgrey, DocumentWindow::allButtons), instrumentGrid_(new echomesh::InstrumentGrid), initialized_(false), runningInTest_(false) { setContentOwned(instrumentGrid_, true); centreWithSize(getWidth(), getHeight()); setUsingNativeTitleBar(true); }
DataWindow::DataWindow(Button* cButton, String name) : DocumentWindow(name, Colours::black, DocumentWindow::allButtons), controlButton(cButton) { centreWithSize(800,500); setUsingNativeTitleBar(true); setResizable(true,false); }
MainWindow (String name, const PropertiesFile::Options & options) : DocumentWindow (name, Colours::lightgrey, DocumentWindow::allButtons), main_content_(options) { setUsingNativeTitleBar (true); setContentOwned (&main_content_, true); centreWithSize (getWidth(), getHeight()); setVisible (true); setResizable(true, true); }
MainWindow(String name) : DocumentWindow(name, Colours::lightgrey, DocumentWindow::minimiseButton | DocumentWindow::closeButton) { setUsingNativeTitleBar(true); setContentOwned(new MainContentComponent(), true); centreWithSize(getWidth(), getHeight()); setVisible(true); }
MainWindow (String name) : DocumentWindow (name, LookAndFeel::getDefaultLookAndFeel() .findColour (ResizableWindow::backgroundColourId), DocumentWindow::allButtons) { setUsingNativeTitleBar (true); setContentOwned (new MainContentComponent(), true); centreWithSize (getWidth(), getHeight()); setVisible (true); }
MainWindow::MainWindow() : juce::DocumentWindow ("Friendly Binary Builder", juce::Colours::darkgrey, juce::DocumentWindow::closeButton) { setUsingNativeTitleBar (true); setContentOwned (new MainComponent(), true); centreWithSize (getWidth(), getHeight()); setVisible (true); }
PokeLaunchApplication::MainWindow::MainWindow(String name, const var &configJson) : DocumentWindow(name, Colours::darkgrey, DocumentWindow::allButtons) { setUsingNativeTitleBar(true); setResizable(true, false); setContentOwned(new MainContentComponent(configJson), true); centreWithSize(getWidth(), getHeight()); setVisible(true); #if JUCE_LINUX // setTitleBarHeight(0); // setFullScreen(true); #endif }
MainWindow () : DocumentWindow ("AlphaLive Updater", Colours::lightgrey, 5) { mainComponent = new MainContentComponent(); setContentOwned (mainComponent, true); //use native OS title bar setUsingNativeTitleBar(true); centreWithSize (getWidth(), getHeight()); setVisible (true); }
FindAndReplaceWindow(FindAndReplaceDialog* comp) : DocumentWindow(T("Find & Replace"), Colour(0xffe5e5e5), DocumentWindow::closeButton, true) { comp->setVisible(true); centreWithSize(comp->getWidth(),comp->getHeight()); setContentComponent(comp); setResizable(false, false); setUsingNativeTitleBar(true); setDropShadowEnabled(true); setVisible(true); }
MainWindow() : DocumentWindow ("MainWindow", Colours::lightgrey, DocumentWindow::allButtons) { setContentOwned (new MainViewComponent(), true); centreWithSize (getWidth(), getHeight()); setSize(610, 410); #if JUCE_IOS || JUCE_ANDROID setVisible (true); setFullScreen (true); setUsingNativeTitleBar(true); setResizable(true, true); #else setUsingNativeTitleBar(true); setResizable(true, true); #endif setVisible (true); }
//============================================================================== MainAppWindow::MainAppWindow() : DocumentWindow (JUCEApplication::getInstance()->getApplicationName(), Colours::lightgrey, DocumentWindow::allButtons) { mMainController = new MainController(); MainEditor* const contentComponent = new MainEditor(mMainController); mMainController->setEditor((MainEditor*)contentComponent); setContentComponent (contentComponent, true, true); centreWithSize (1024, 768); //+ getTitleBarHeight()); setUsingNativeTitleBar(true); setVisible (true); }
DefaultDialogWindow (LaunchOptions& options) : DialogWindow (options.dialogTitle, options.dialogBackgroundColour, options.escapeKeyTriggersCloseButton, true) { setUsingNativeTitleBar (options.useNativeTitleBar); setAlwaysOnTop (juce_areThereAnyAlwaysOnTopWindows()); if (options.content.willDeleteObject()) setContentOwned (options.content.release(), true); else setContentNonOwned (options.content.release(), true); centreAroundComponent (options.componentToCentreAround, getWidth(), getHeight()); setResizable (options.resizable, options.useBottomRightCornerResizer); }