本文整理汇总了C++中setResizable函数的典型用法代码示例。如果您正苦于以下问题:C++ setResizable函数的具体用法?C++ setResizable怎么用?C++ setResizable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setResizable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: DocumentWindow
//==============================================================================
MainWindow::MainWindow()
: DocumentWindow (IntrojucerApp::getApp().getApplicationName(),
Colour::greyLevel (0.6f),
DocumentWindow::allButtons,
false)
{
setUsingNativeTitleBar (true);
createProjectContentCompIfNeeded();
#if ! JUCE_MAC
setMenuBar (IntrojucerApp::getApp().menuModel);
#endif
setResizable (true, false);
centreWithSize (800, 600);
ApplicationCommandManager& commandManager = IntrojucerApp::getCommandManager();
// Register all the app commands..
commandManager.registerAllCommandsForTarget (this);
commandManager.registerAllCommandsForTarget (getProjectContentComponent());
// update key mappings..
{
commandManager.getKeyMappings()->resetToDefaultMappings();
ScopedPointer <XmlElement> keys (getGlobalProperties().getXmlValue ("keyMappings"));
if (keys != nullptr)
commandManager.getKeyMappings()->restoreFromXml (*keys);
addKeyListener (commandManager.getKeyMappings());
}
// don't want the window to take focus when the title-bar is clicked..
setWantsKeyboardFocus (false);
getLookAndFeel().setColour (ColourSelector::backgroundColourId, Colours::transparentBlack);
setResizeLimits (600, 500, 32000, 32000);
}
开发者ID:Krewn,项目名称:LIOS,代码行数:42,代码来源:jucer_MainWindow.cpp
示例2: TempDialogWindow
TempDialogWindow (const String& title,
Component* contentComponent_,
Component* componentToCentreAround,
const Colour& colour,
const bool escapeKeyTriggersCloseButton_,
const bool shouldBeResizable,
const bool useBottomRightCornerResizer,
const bool deleteContent = false)
: DialogWindow (title, colour, escapeKeyTriggersCloseButton_, true),
deleteDialog(deleteContent)
{
if (! JUCEApplication::isStandaloneApp())
setAlwaysOnTop (true); // for a plugin, make it always-on-top because the host windows are often top-level
if(deleteContent)
setContentOwned (contentComponent_, true);
else
setContentNonOwned (contentComponent_, true);
centreAroundComponent (componentToCentreAround, getWidth(), getHeight());
setResizable (shouldBeResizable, useBottomRightCornerResizer);
}
开发者ID:eriser,项目名称:guitareffectvst,代码行数:21,代码来源:JuceHelperStuff.cpp
示例3: PluginListWindow
PluginListWindow (MainHostWindow& owner_, AudioPluginFormatManager& pluginFormatManager)
: DocumentWindow ("Available Plugins",
LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId),
DocumentWindow::minimiseButton | DocumentWindow::closeButton),
owner (owner_)
{
const File deadMansPedalFile (getAppProperties().getUserSettings()
->getFile().getSiblingFile ("RecentlyCrashedPluginsList"));
setContentOwned (new PluginListComponent (pluginFormatManager,
owner.knownPluginList,
deadMansPedalFile,
getAppProperties().getUserSettings(), true), true);
setResizable (true, false);
setResizeLimits (300, 400, 800, 1500);
setTopLeftPosition (60, 60);
restoreWindowStateFromString (getAppProperties().getUserSettings()->getValue ("listWindowPos"));
setVisible (true);
}
开发者ID:mtytel,项目名称:JUCE,代码行数:21,代码来源:MainHostWindow.cpp
示例4: ResizableWindow
//==============================================================================
FileChooserDialogBox::FileChooserDialogBox (const String& name,
const String& instructions,
FileBrowserComponent& chooserComponent,
const bool warnAboutOverwritingExistingFiles_,
const Colour& backgroundColour)
: ResizableWindow (name, backgroundColour, true),
warnAboutOverwritingExistingFiles (warnAboutOverwritingExistingFiles_)
{
content = new ContentComponent (name, instructions, chooserComponent);
setContentOwned (content, false);
setResizable (true, true);
setResizeLimits (300, 300, 1200, 1000);
content->okButton.addListener (this);
content->cancelButton.addListener (this);
content->newFolderButton.addListener (this);
content->chooserComponent.addListener (this);
FileChooserDialogBox::selectionChanged();
}
开发者ID:pingdynasty,项目名称:BlipZones,代码行数:22,代码来源:juce_FileChooserDialogBox.cpp
示例5: DocumentWindow
//==============================================================================
EdoFileEditor::EdoFileEditor (const File fileToEdit, const bool allowEditing)
: DocumentWindow (fileToEdit.getFullPathName(), Colours::white, DocumentWindow::allButtons, true)
{
//[UserPreSize]
editorComponent = new EdoFileEditorComponent (fileToEdit, allowEditing);
setContentComponent (editorComponent, true, true);
if (ApplicationProperties::getInstance()->getUserSettings()->getValue (T("fileEditorRectangle"), String::empty) != String::empty)
{
setBounds (Rectangle::fromString (ApplicationProperties::getInstance()->getUserSettings()->getValue (T("fileEditorRectangle"))));
}
else
{
centreWithSize (400, 400);
}
setResizable (true, true);
//[/UserPreSize]
//[Constructor] You can add your own custom stuff here..
//[/Constructor]
}
开发者ID:orisha85,项目名称:edoapp,代码行数:22,代码来源:EdoFileEditor.cpp
示例6: DocumentWindow
FileLocationEditorWindow::FileLocationEditorWindow(int posX, int posY,
ApplicationCommandManager* acm,
UndoManager& um)
: DocumentWindow("File Locations",
Colour::greyLevel(0.6f),
DocumentWindow::allButtons,
true)
{
setUsingNativeTitleBar (true);
setContentOwned(new FileLocationEditor(um, acm), true);
restoreWindowPosition(posX, posY);
Component::setVisible(true);
setResizable(true, false);
setWantsKeyboardFocus (false);
setResizeLimits(400, 200, 32000, 32000);
}
开发者ID:nimmen,项目名称:scopesync,代码行数:21,代码来源:FileLocationEditor.cpp
示例7: Window
OutfitWindow::OutfitWindow():
Window(_("Outfits")),
mBoxWidth(33),
mBoxHeight(33),
mGridWidth(3),
mGridHeight(3),
mItemClicked(false),
mItemMoved(NULL),
mItemSelected(-1),
mCurrentOutfit(0)
{
setWindowName("Outfits");
setResizable(true);
setCloseButton(true);
setDefaultSize(250, 250, 118, 180);
mPreviousButton = new Button(_("<"), "previous", this);
mNextButton = new Button(_(">"), "next", this);
mCurrentLabel = new Label(strprintf(_("Outfit: %d"), 1));
mCurrentLabel->setAlignment(gcn::Graphics::CENTER);
mUnequipCheck = new CheckBox(_("Unequip first"),
config.getValue("OutfitUnequip0", true));
mUnequipCheck->setActionEventId("unequip");
mUnequipCheck->addActionListener(this);
place(0, 3, mPreviousButton, 1);
place(1, 3, mCurrentLabel, 2);
place(3, 3, mNextButton, 1);
place(0, 4, mUnequipCheck, 4);
Layout &layout = getLayout();
layout.setRowHeight(0, Layout::AUTO_SET);
layout.setColWidth(4, Layout::CENTER);
loadWindowState();
load();
}
开发者ID:mobilehub,项目名称:mana,代码行数:39,代码来源:outfitwindow.cpp
示例8: Window
DebugWindow::DebugWindow() :
// TRANSLATORS: debug window name
Window(_("Debug"), Modal_false, nullptr, "debug.xml"),
mTabs(CREATEWIDGETR(TabbedArea, this)),
mMapWidget(new MapDebugTab(this)),
mTargetWidget(new TargetDebugTab(this)),
mNetWidget(new NetDebugTab(this))
{
setWindowName("Debug");
if (setupWindow)
setupWindow->registerWindowForReset(this);
setResizable(true);
setCloseButton(true);
setSaveVisible(true);
setStickyButtonLock(true);
setDefaultSize(400, 300, ImagePosition::CENTER);
mTabs->setSelectable(false);
mTabs->getWidgetContainer()->setSelectable(false);
mTabs->getTabContainer()->setSelectable(false);
// TRANSLATORS: debug window tab
mTabs->addTab(std::string(_("Map")), mMapWidget);
// TRANSLATORS: debug window tab
mTabs->addTab(std::string(_("Target")), mTargetWidget);
// TRANSLATORS: debug window tab
mTabs->addTab(std::string(_("Net")), mNetWidget);
mTabs->setDimension(Rect(0, 0, 600, 300));
const int w = mDimension.width;
const int h = mDimension.height;
mMapWidget->resize(w, h);
mTargetWidget->resize(w, h);
mNetWidget->resize(w, h);
loadWindowState();
enableVisibleSound(true);
}
开发者ID:dreamsxin,项目名称:ManaPlus,代码行数:39,代码来源:debugwindow.cpp
示例9: frameMargin
void pWindow::setGeometry(Geometry geometry) {
locked = true;
Application::processEvents();
QApplication::syncX();
Geometry margin = frameMargin();
setResizable(window.state.resizable);
qtWindow->move(geometry.x - frameMargin().x, geometry.y - frameMargin().y);
//qtWindow->adjustSize() fails if larger than 2/3rds screen size
qtWindow->resize(qtWindow->sizeHint());
if(window.state.resizable) {
//required to allow shrinking window from default size
qtWindow->setMinimumSize(1, 1);
qtContainer->setMinimumSize(1, 1);
}
for(auto& layout : window.state.layout) {
geometry.x = geometry.y = 0;
layout.setGeometry(geometry);
}
locked = false;
}
开发者ID:ChoccyHobNob,项目名称:DiCE,代码行数:22,代码来源:window.cpp
示例10: Window
Minimap::Minimap():
Window(_("Map")),
mMapImage(0),
mWidthProportion(0.5),
mHeightProportion(0.5)
{
setWindowName("MiniMap");
mShow = config.getValue(getWindowName() + "Show", true);
setDefaultSize(5, 25, 100, 100);
// set this to false as the minimap window size is changed
//depending on the map size
setResizable(false);
setDefaultVisible(true);
setSaveVisible(true);
setStickyButton(true);
setSticky(false);
loadWindowState();
setVisible(mShow, isSticky());
}
开发者ID:kai62656,项目名称:manabot,代码行数:22,代码来源:minimap.cpp
示例11: DocumentWindow
//==============================================================================
MainAppWindow::MainAppWindow()
:
// Initialise the base 'DocumentWindow'...
DocumentWindow (
"The Melody Stochaster", // Set the text to use for the title
Colours::azure, // Set the colour of the window
DocumentWindow::allButtons, // Set which buttons are displayed
true // This window should be added to the desktop
)
{
setResizable (false, false);
setTitleBarHeight (22);
// create the main component, which is described in MainComponent.h
MainComponent* contentComponent = new MainComponent ();
// This sets the main content component for the window to be whatever MainComponent
// is. The nature of DocumentWindow means that the contentComponent will fill the main
// area of the window, and will be deleted automatically when the window is deleted.
setContentOwned (contentComponent, false);
}
开发者ID:lathertonj,项目名称:MelodyStochaster,代码行数:23,代码来源:MainAppWindow.cpp
示例12: setWindowName
ShortcutWindow::ShortcutWindow(const std::string &title,
ShortcutContainer *content)
{
setWindowName(title);
// no title presented, title bar is padding so window can be moved.
gcn::Window::setTitleBarHeight(gcn::Window::getPadding());
setShowTitle(false);
setResizable(true);
setDefaultVisible(false);
setSaveVisible(true);
setupWindow->registerWindowForReset(this);
mItems = content;
const int border = SCROLL_PADDING * 2 + getPadding() * 2;
setMinWidth(mItems->getBoxWidth() + border);
setMinHeight(mItems->getBoxHeight() + border);
setMaxWidth(mItems->getBoxWidth() * mItems->getMaxItems() + border);
setMaxHeight(mItems->getBoxHeight() * mItems->getMaxItems() + border);
setDefaultSize(mItems->getBoxWidth() + border, mItems->getBoxHeight() *
mItems->getMaxItems() + border, ImageRect::LOWER_RIGHT,
mBoxesWidth, 0);
mBoxesWidth += mItems->getBoxWidth() + border;
mScrollArea = new ScrollArea(mItems);
mScrollArea->setPosition(SCROLL_PADDING, SCROLL_PADDING);
mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mScrollArea->setOpaque(false);
place(0, 0, mScrollArea, 5, 5).setPadding(0);
Layout &layout = getLayout();
layout.setRowHeight(0, Layout::AUTO_SET);
layout.setMargin(0);
loadWindowState();
}
开发者ID:Ablu,项目名称:mana,代码行数:39,代码来源:shortcutwindow.cpp
示例13: Window
EmoteWindow::EmoteWindow() :
// TRANSLATORS: emotes window name
Window(_("Emotes"), Modal_false, nullptr, "emotes.xml"),
mTabs(CREATEWIDGETR(TabbedArea, this)),
mEmotePage(new EmotePage(this)),
mColorModel(ColorModel::createDefault(this)),
mColorPage(CREATEWIDGETR(ColorPage, this, mColorModel, "colorpage.xml")),
mScrollColorPage(new ScrollArea(this, mColorPage, Opaque_false,
"emotepage.xml")),
mFontModel(new NamesModel),
mFontPage(CREATEWIDGETR(ListBox, this, mFontModel, "")),
mScrollFontPage(new ScrollArea(this, mFontPage, Opaque_false,
"fontpage.xml")),
mImageSet(Theme::getImageSetFromThemeXml("emotetabs.xml", "", 17, 16))
{
setShowTitle(false);
setResizable(true);
if (setupWindow)
setupWindow->registerWindowForReset(this);
addMouseListener(this);
}
开发者ID:dreamsxin,项目名称:ManaPlus,代码行数:23,代码来源:emotewindow.cpp
示例14: Window
StorageWindow::StorageWindow(int invSize):
Window(_("Storage")),
mMaxSlots(invSize),
mItemDesc(false)
{
setWindowName("Storage");
setResizable(true);
saveVisibility(false);
setCloseButton(true);
setDefaultSize(375, 300, ImageRect::CENTER);
mRetrieveButton = new Button(_("Retrieve"), "retrieve", this);
mRetrieveButton->setEnabled(false);
mCloseButton = new Button(_("Close"), "close", this);
mItems = new ItemContainer(player_node->getStorage(), "showpopupmenu", this);
mItems->addSelectionListener(this);
mInvenScroll = new ScrollArea(mItems);
mInvenScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mUsedSlots = player_node->getStorage()->getNumberOfSlotsUsed();
mSlotsLabel = new Label(_("Slots:"));
mSlotsBar = new ProgressBar(1.0f, 100, 20, gcn::Color(225, 200, 25));
mSlotsBar->setText(strprintf("%d/%d", mUsedSlots, mMaxSlots));
mSlotsBar->setProgress((float) mUsedSlots / mMaxSlots);
setMinHeight(130);
setMinWidth(200);
fontChanged();
loadWindowState();
}
开发者ID:Aethyra,项目名称:Client,代码行数:37,代码来源:storagewindow.cpp
示例15: Window
ShortcutWindow::ShortcutWindow(ShortcutContainer *content):
Window("", false, NULL, "graphics/gui/gui.xml", true)
{
// no title presented, title bar is padding so window can be moved.
gcn::Window::setTitleBarHeight(gcn::Window::getPadding());
setWindowName(content->getShortcutHandler()->getPrefix());
setShowTitle(false);
setResizable(true);
mItems = content;
const int border = SCROLL_PADDING * 2 + getPadding() * 2;
setMinWidth(mItems->getBoxWidth() + border);
setMinHeight(mItems->getBoxHeight() + border);
setMaxWidth(mItems->getBoxWidth() * mItems->getMaxShortcuts() + border);
setMaxHeight(mItems->getBoxHeight() * mItems->getMaxShortcuts() + border);
setDefaultSize(mItems->getBoxWidth() + border, (mItems->getBoxHeight() *
mItems->getMaxShortcuts()) + border, ImageRect::LOWER_RIGHT,
-mInstances * (mItems->getBoxWidth() + 2 * getPadding()), 0);
mInstances++;
mScrollArea = new ScrollArea(mItems);
mScrollArea->setPosition(SCROLL_PADDING, SCROLL_PADDING);
mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mScrollArea->setOpaque(false);
place(0, 0, mScrollArea, 5, 5).setPadding(0);
Layout &layout = getLayout();
layout.setRowHeight(0, Layout::AUTO_SET);
layout.setMargin(0);
loadWindowState();
}
开发者ID:Aethyra,项目名称:Client,代码行数:37,代码来源:shortcutwindow.cpp
示例16: Window
Minimap::Minimap() :
// TRANSLATORS: mini map window name
Window(_("Map"), false, nullptr, "map.xml"),
mWidthProportion(0.5),
mHeightProportion(0.5),
mMapImage(nullptr),
mTextPopup(new TextPopup),
mMapOriginX(0),
mMapOriginY(0),
mCustomMapImage(false),
mAutoResize(config.getBoolValue("autoresizeminimaps"))
{
mTextPopup->postInit();
setWindowName("Minimap");
mShow = config.getValueBool(getWindowName() + "Show", true);
config.addListener("autoresizeminimaps", this);
setDefaultSize(5, 25, 100, 100);
// set this to false as the minimap window size is changed
// depending on the map size
setResizable(true);
if (setupWindow)
setupWindow->registerWindowForReset(this);
setDefaultVisible(true);
setSaveVisible(true);
setStickyButton(true);
setSticky(false);
loadWindowState();
setVisible(mShow, isSticky());
enableVisibleSound(true);
}
开发者ID:KaneHart,项目名称:Elmlor-Client,代码行数:36,代码来源:minimap.cpp
示例17: Window
ServerInfoWindow::ServerInfoWindow(ServerInfo &serverInfo) :
// TRANSLATORS: servers dialog name
Window(_("Server info"), Modal_false, nullptr, "serverinfo.xml"),
LinkHandler(),
mServerInfo(serverInfo),
mBrowserBox(new StaticBrowserBox(this, Opaque_true,
"browserbox.xml")),
mScrollArea(new ScrollArea(this, mBrowserBox,
Opaque_true, "serverinfo_background.xml"))
{
setMinWidth(300);
setMinHeight(220);
setContentSize(455, 350);
setWindowName("ServerInfoWindow");
setCloseButton(true);
setResizable(true);
setStickyButtonLock(true);
setDefaultSize(500, 400, ImagePosition::CENTER, 0, 0);
mBrowserBox->setOpaque(Opaque_false);
mBrowserBox->setLinkHandler(this);
if (gui != nullptr)
mBrowserBox->setFont(gui->getHelpFont());
mBrowserBox->setProcessVars(true);
mBrowserBox->setEnableTabs(true);
place(0, 0, mScrollArea, 5, 3).setPadding(3);
Layout &layout = getLayout();
layout.setRowHeight(0, LayoutType::SET);
loadWindowState();
enableVisibleSound(true);
widgetResized(Event(nullptr));
}
开发者ID:mekolat,项目名称:ManaPlus,代码行数:36,代码来源:serverinfowindow.cpp
示例18: DocumentWindow
//==============================================================================
MainAppWindow::MainAppWindow(ApplicationCommandManager* commandManager)
:
// Initialise the base 'DocumentWindow'...
DocumentWindow ( T("MyJuceApp"),
Colours::lightgrey,
DocumentWindow::allButtons,
true
)
{
setResizable (true, false); // resizability is a property of ResizableWindow, which is
setTitleBarHeight (25); // Set the height of the titlebar on our window.
MainComponent* contentComponent = new MainComponent (this, commandManager);
setContentComponent (contentComponent);
#if defined(LINUX)
setMenuBar(contentComponent);
#endif
//setMenuBar(setMacMainMenu(contentComponent));
}
开发者ID:ptrv,项目名称:MyJuceApp,代码行数:25,代码来源:MainAppWindow.cpp
示例19: Window
EditServerDialog::EditServerDialog(ServerDialog *parent, ServerInfo server,
int index) :
Window(_("Edit Server"), true, parent),
mServerDialog(parent),
mServer(server),
mIndex(index)
{
setWindowName("EditServerDialog");
Label *nameLabel = new Label(_("Name:"));
Label *serverAdressLabel = new Label(_("Address:"));
Label *portLabel = new Label(_("Port:"));
Label *typeLabel = new Label(_("Server type:"));
Label *descriptionLabel = new Label(_("Description:"));
mServerAddressField = new TextField(std::string());
mPortField = new TextField(std::string());
mPortField->setNumeric(true);
mPortField->setRange(1, 65535);
mTypeListModel = new TypeListModel();
mTypeField = new DropDown(mTypeListModel);
mTypeField->setSelected(0); // TmwAthena by default for now.
mNameField = new TextField(std::string());
mDescriptionField = new TextField(std::string());
mOkButton = new Button(_("OK"), "addServer", this);
mCancelButton = new Button(_("Cancel"), "cancel", this);
mServerAddressField->addActionListener(this);
mPortField->addActionListener(this);
place(0, 0, nameLabel);
place(1, 0, mNameField, 4).setPadding(3);
place(0, 1, serverAdressLabel);
place(1, 1, mServerAddressField, 4).setPadding(3);
place(0, 2, portLabel);
place(1, 2, mPortField, 4).setPadding(3);
place(0, 3, typeLabel);
place(1, 3, mTypeField).setPadding(3);
place(0, 4, descriptionLabel);
place(1, 4, mDescriptionField, 4).setPadding(3);
place(4, 5, mOkButton);
place(3, 5, mCancelButton);
// Do this manually instead of calling reflowLayout so we can enforce a
// minimum width.
int width = 0, height = 0;
getLayout().reflow(width, height);
if (width < 300)
{
width = 300;
getLayout().reflow(width, height);
}
if (height < 120)
{
height = 120;
getLayout().reflow(width, height);
}
setContentSize(width, height);
setMinWidth(getWidth());
setMinHeight(getHeight());
setDefaultSize(getWidth(), getHeight(), ImageRect::CENTER);
setResizable(false);
addKeyListener(this);
loadWindowState();
mNameField->setText(mServer.name);
mDescriptionField->setText(mServer.description);
mServerAddressField->setText(mServer.hostname);
mPortField->setText(toString(mServer.port));
switch (mServer.type)
{
#ifdef EATHENA_SUPPORT
case ServerInfo::EATHENA:
mTypeField->setSelected(2);
break;
case ServerInfo::MANASERV:
#ifdef MANASERV_SUPPORT
mTypeField->setSelected(3);
break;
#endif
#else
case ServerInfo::MANASERV:
#ifdef MANASERV_SUPPORT
mTypeField->setSelected(2);
break;
#endif
#endif
default:
case ServerInfo::UNKNOWN:
case ServerInfo::TMWATHENA:
mTypeField->setSelected(0);
break;
case ServerInfo::EVOL:
//.........这里部分代码省略.........
开发者ID:EvolOnline,项目名称:ManaPlus,代码行数:101,代码来源:editserverdialog.cpp
示例20: DocumentWindow
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
StupidWindow::StupidWindow(const String& commandLine, bool startHidden):
DocumentWindow(L"Pedalboard 2", Colours::black, DocumentWindow::allButtons)
{
//Make sure we've loaded all the available plugin formats before we create
//the main panel.
{
InternalPluginFormat *internalFormat = new InternalPluginFormat;
//LADSPAPluginFormat *ladspaFormat = new LADSPAPluginFormat;
//VSTPluginFormat *vstFormat = new VSTPluginFormat;
//NiallsAudioPluginFormat *napFormat = new NiallsAudioPluginFormat;
AudioPluginFormatManagerSingleton::getInstance().addFormat(internalFormat);
//AudioPluginFormatManager::getInstance()->addFormat(napFormat);
//AudioPluginFormatManager::getInstance()->addFormat(vstFormat);
//AudioPluginFormatManager::getInstance()->addFormat(ladspaFormat);
}
//Load correct colour scheme.
{
String scheme = PropertiesSingleton::getInstance().getUserSettings()->getValue(L"colourScheme");
if(scheme != String::empty)
ColourScheme::getInstance().loadPreset(scheme);
}
LookAndFeel::setDefaultLookAndFeel(laf = new BranchesLAF());
setResizable(true, false);
setContentOwned(mainPanel = new MainPanel(&commandManager), true);
//mainPanel->setCommandManager(&commandManager);
centreWithSize(1024, 580);
setUsingNativeTitleBar(true);
//setDropShadowEnabled(false);
if(!startHidden)
setVisible(true);
#ifndef __APPLE__
setMenuBar(mainPanel);
#endif
//Attempts to associate our icon with the window's titlebar.
getPeer()->setIcon(ImageCache::getFromMemory(Images::icon512_png,
Images::icon512_pngSize));
commandManager.registerAllCommandsForTarget(mainPanel);
commandManager.registerAllCommandsForTarget(JUCEApplication::getInstance());
commandManager.getKeyMappings()->resetToDefaultMappings();
loadKeyMappings();
addKeyListener(commandManager.getKeyMappings());
restoreWindowStateFromString(PropertiesSingleton::getInstance().getUserSettings()->getValue("WindowState"));
//See if we can load a .pdl file from the commandline.
File initialFile(commandLine);
if(initialFile.existsAsFile())
{
if(initialFile.getFileExtension() == L".pdl")
{
mainPanel->loadDocument(initialFile);
mainPanel->setLastDocumentOpened(initialFile);
mainPanel->setFile(initialFile);
mainPanel->setChangedFlag(false);
}
}
}
开发者ID:eriser,项目名称:guitareffectvst,代码行数:69,代码来源:App.cpp
注:本文中的setResizable函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论