The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

757 lines
27KB

  1. /*
  2. ==============================================================================
  3. This is an automatically generated file created by the Jucer!
  4. Be careful when adding custom code to these files, as only the code within
  5. the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
  6. and re-saved.
  7. Created for JUCE version: JUCE v1.53.8
  8. ------------------------------------------------------------------------------
  9. JUCE and the Jucer are copyright 2004-10 by Raw Material Software ltd.
  10. ==============================================================================
  11. */
  12. //[CppHeaders] You can add your own extra header files here...
  13. #include "../Project Saving/jucer_ProjectExporter.h"
  14. #include "jucer_Module.h"
  15. #include "../Application/jucer_JuceUpdater.h"
  16. //[/CppHeaders]
  17. #include "jucer_ProjectInformationComponent.h"
  18. //[MiscUserDefs] You can add your own user definitions and misc code here...
  19. //==============================================================================
  20. class PanelBase : public PropertyPanelWithTooltips
  21. {
  22. public:
  23. PanelBase (Project& project_) : project (project_) {}
  24. virtual void rebuildProperties (Array <PropertyComponent*>& props) = 0;
  25. void visibilityChanged()
  26. {
  27. if (isVisible())
  28. refreshAll();
  29. }
  30. void refreshAll()
  31. {
  32. getPanel().clear();
  33. Array <PropertyComponent*> props;
  34. rebuildProperties (props);
  35. getPanel().addProperties (props);
  36. }
  37. protected:
  38. Project& project;
  39. };
  40. //==============================================================================
  41. class ProjectTab : public PanelBase
  42. {
  43. public:
  44. ProjectTab (Project& project_) : PanelBase (project_) {}
  45. void rebuildProperties (Array <PropertyComponent*>& props)
  46. {
  47. project.createPropertyEditors (props);
  48. }
  49. };
  50. //==============================================================================
  51. class ConfigTab : public PanelBase
  52. {
  53. public:
  54. ConfigTab (Project& project_, int configIndex_)
  55. : PanelBase (project_), configIndex (configIndex_)
  56. {
  57. }
  58. void rebuildProperties (Array <PropertyComponent*>& props)
  59. {
  60. project.getConfiguration (configIndex).createPropertyEditors (props);
  61. }
  62. private:
  63. int configIndex;
  64. };
  65. //==============================================================================
  66. class ExportTab : public PanelBase
  67. {
  68. public:
  69. ExportTab (Project& project_, int exporterIndex_)
  70. : PanelBase (project_), exporterIndex (exporterIndex_)
  71. {
  72. }
  73. void rebuildProperties (Array <PropertyComponent*>& props)
  74. {
  75. ScopedPointer <ProjectExporter> exp (project.createExporter (exporterIndex));
  76. if (exp != nullptr)
  77. exp->createPropertyEditors (props);
  78. for (int i = props.size(); --i >= 0;)
  79. props.getUnchecked(i)->setPreferredHeight (22);
  80. }
  81. private:
  82. int exporterIndex;
  83. };
  84. //==============================================================================
  85. class ModuleSettingsPanel : public PanelBase
  86. {
  87. public:
  88. ModuleSettingsPanel (Project& project_, ModuleList& moduleList_, const String& moduleID_)
  89. : PanelBase (project_), moduleList (moduleList_), moduleID (moduleID_)
  90. {
  91. setBounds ("parent.width / 2 + 1, 31, parent.width - 3, parent.height - 3");
  92. }
  93. void rebuildProperties (Array <PropertyComponent*>& props)
  94. {
  95. ScopedPointer<LibraryModule> module (moduleList.loadModule (moduleID));
  96. if (module != nullptr)
  97. {
  98. props.add (new ModuleInfoComponent (project, moduleList, moduleID));
  99. if (project.isModuleEnabled (moduleID))
  100. {
  101. const ModuleList::Module* m = moduleList.findModuleInfo (moduleID);
  102. if (m != nullptr && moduleList.getExtraDependenciesNeeded (project, *m).size() > 0)
  103. props.add (new MissingDependenciesComponent (project, moduleList, moduleID));
  104. }
  105. props.add (new BooleanPropertyComponent (project.shouldShowAllModuleFilesInProject (moduleID),
  106. "Add source to project", "Make module files browsable in projects"));
  107. props.getLast()->setTooltip ("If this is enabled, then the entire source tree from this module will be shown inside your project, "
  108. "making it easy to browse/edit the module's classes. If disabled, then only the minimum number of files "
  109. "required to compile it will appear inside your project.");
  110. props.add (new BooleanPropertyComponent (project.shouldCopyModuleFilesLocally (moduleID),
  111. "Create local copy", "Copy the module into the project folder"));
  112. props.getLast()->setTooltip ("If this is enabled, then a local copy of the entire module will be made inside your project (in the auto-generated JuceLibraryFiles folder), "
  113. "so that your project will be self-contained, and won't need to contain any references to files in other folders. "
  114. "This also means that you can check the module into your source-control system to make sure it is always in sync with your own code.");
  115. StringArray possibleValues;
  116. possibleValues.add ("(Use Default)");
  117. possibleValues.add ("Enabled");
  118. possibleValues.add ("Disabled");
  119. Array<var> mappings;
  120. mappings.add (Project::configFlagDefault);
  121. mappings.add (Project::configFlagEnabled);
  122. mappings.add (Project::configFlagDisabled);
  123. OwnedArray <Project::ConfigFlag> flags;
  124. module->getConfigFlags (project, flags);
  125. for (int i = 0; i < flags.size(); ++i)
  126. {
  127. ChoicePropertyComponent* c = new ChoicePropertyComponent (flags[i]->value, flags[i]->symbol, possibleValues, mappings);
  128. c->setTooltip (flags[i]->description);
  129. c->setPreferredHeight (22);
  130. props.add (c);
  131. }
  132. }
  133. setEnabled (project.isModuleEnabled (moduleID));
  134. }
  135. private:
  136. ModuleList& moduleList;
  137. String moduleID;
  138. //==============================================================================
  139. class ModuleInfoComponent : public PropertyComponent
  140. {
  141. public:
  142. ModuleInfoComponent (Project& project_, ModuleList& moduleList_, const String& moduleID_)
  143. : PropertyComponent ("Module", 100),
  144. project (project_), moduleList (moduleList_), moduleID (moduleID_)
  145. {
  146. }
  147. void refresh() {}
  148. void paint (Graphics& g)
  149. {
  150. g.setColour (Colours::white.withAlpha (0.4f));
  151. g.fillRect (0, 0, getWidth(), getHeight() - 1);
  152. const ModuleList::Module* module = moduleList.findModuleInfo (moduleID);
  153. if (module != nullptr)
  154. {
  155. String text;
  156. text << module->name << newLine << "Version: " << module->version << newLine << newLine
  157. << module->description;
  158. GlyphArrangement ga;
  159. ga.addJustifiedText (Font (13.0f), text, 4.0f, 16.0f, getWidth() - 8.0f, Justification::topLeft);
  160. g.setColour (Colours::black);
  161. ga.draw (g);
  162. }
  163. }
  164. private:
  165. Project& project;
  166. ModuleList& moduleList;
  167. String moduleID;
  168. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ModuleInfoComponent);
  169. };
  170. //==============================================================================
  171. class MissingDependenciesComponent : public PropertyComponent,
  172. public ButtonListener
  173. {
  174. public:
  175. MissingDependenciesComponent (Project& project_, ModuleList& moduleList_, const String& moduleID_)
  176. : PropertyComponent ("Dependencies", 100),
  177. project (project_), moduleList (moduleList_), moduleID (moduleID_),
  178. fixButton ("Enable Required Modules")
  179. {
  180. const ModuleList::Module* module = moduleList.findModuleInfo (moduleID);
  181. if (module != nullptr)
  182. missingDependencies = moduleList.getExtraDependenciesNeeded (project, *module);
  183. addAndMakeVisible (&fixButton);
  184. fixButton.setColour (TextButton::buttonColourId, Colours::red);
  185. fixButton.setColour (TextButton::textColourOffId, Colours::white);
  186. fixButton.setBounds ("right - 160, parent.height - 26, parent.width - 8, top + 22");
  187. fixButton.addListener (this);
  188. }
  189. void refresh() {}
  190. void paint (Graphics& g)
  191. {
  192. g.setColour (Colours::white.withAlpha (0.4f));
  193. g.fillRect (0, 0, getWidth(), getHeight() - 1);
  194. String text ("This module requires the following dependencies:\n");
  195. text << missingDependencies.joinIntoString (", ");
  196. GlyphArrangement ga;
  197. ga.addJustifiedText (Font (13.0f), text, 4.0f, 16.0f, getWidth() - 8.0f, Justification::topLeft);
  198. g.setColour (Colours::red);
  199. ga.draw (g);
  200. }
  201. void buttonClicked (Button*);
  202. private:
  203. Project& project;
  204. ModuleList& moduleList;
  205. String moduleID;
  206. StringArray missingDependencies;
  207. TextButton fixButton;
  208. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MissingDependenciesComponent);
  209. };
  210. };
  211. //==============================================================================
  212. class ModuleSelectionListBox : public ListBox,
  213. public ListBoxModel
  214. {
  215. public:
  216. ModuleSelectionListBox (ModuleList& list_)
  217. : list (list_), handler (nullptr)
  218. {
  219. setColour (ListBox::backgroundColourId, Colours::white.withAlpha (0.4f));
  220. }
  221. void refresh()
  222. {
  223. updateContent();
  224. repaint();
  225. }
  226. int getNumRows()
  227. {
  228. return list.modules.size();
  229. }
  230. void paintListBoxItem (int rowNumber, Graphics& g, int width, int height, bool rowIsSelected)
  231. {
  232. if (rowIsSelected)
  233. g.fillAll (findColour (TextEditor::highlightColourId));
  234. const ModuleList::Module* const m = list.modules [rowNumber];
  235. if (m != nullptr)
  236. {
  237. const float tickSize = height * 0.7f;
  238. getLookAndFeel().drawTickBox (g, *this, (height - tickSize) / 2, (height - tickSize) / 2, tickSize, tickSize,
  239. handler->isEnabled (m), true, false, false);
  240. if (handler->isEnabled (m) && handler->areDependenciesMissing (m))
  241. g.setColour (Colours::red);
  242. else
  243. g.setColour (Colours::black);
  244. g.setFont (height * 0.7f, Font::bold);
  245. g.drawFittedText (m->uid, height, 0, 200, height, Justification::centredLeft, 1);
  246. g.setFont (height * 0.55f, Font::italic);
  247. g.drawText (m->name, height + 200, 0, width - height - 200, height, Justification::centredLeft, true);
  248. }
  249. }
  250. void listBoxItemClicked (int row, const MouseEvent& e)
  251. {
  252. if (e.x < getRowHeight())
  253. flipRow (row);
  254. }
  255. void listBoxItemDoubleClicked (int row, const MouseEvent& e)
  256. {
  257. flipRow (row);
  258. }
  259. void returnKeyPressed (int row)
  260. {
  261. flipRow (row);
  262. }
  263. void selectedRowsChanged (int lastRowSelected)
  264. {
  265. handler->selectionChanged (list.modules [lastRowSelected]);
  266. }
  267. void flipRow (int row)
  268. {
  269. const ModuleList::Module* const m = list.modules [row];
  270. if (m != nullptr)
  271. handler->setEnabled (m, ! handler->isEnabled (m));
  272. }
  273. //==============================================================================
  274. class Handler
  275. {
  276. public:
  277. Handler() {}
  278. virtual ~Handler() {};
  279. virtual bool isEnabled (const ModuleList::Module* m) const = 0;
  280. virtual void setEnabled (const ModuleList::Module* m, bool enable) = 0;
  281. virtual bool areDependenciesMissing (const ModuleList::Module* m) = 0;
  282. virtual void selectionChanged (const ModuleList::Module* selectedModule) = 0;
  283. };
  284. void setHandler (Handler* h)
  285. {
  286. handler = h;
  287. setModel (this);
  288. }
  289. private:
  290. ModuleList& list;
  291. Handler* handler;
  292. };
  293. //==============================================================================
  294. class ModulesPanel : public Component,
  295. public ModuleSelectionListBox::Handler,
  296. public FilenameComponentListener,
  297. public ButtonListener
  298. {
  299. public:
  300. ModulesPanel (Project& project_)
  301. : project (project_),
  302. modulesLocation ("modules", ModuleList::getLocalModulesFolder (&project),
  303. true, true, false, "*", String::empty,
  304. "Select a folder containing your JUCE modules..."),
  305. modulesLabel (String::empty, "Module source folder:"),
  306. updateModulesButton ("Check for module updates..."),
  307. moduleListBox (moduleList)
  308. {
  309. moduleList.rescan (ModuleList::getLocalModulesFolder (&project));
  310. addAndMakeVisible (&modulesLocation);
  311. modulesLocation.setBounds ("150, 3, parent.width - 180, 28");
  312. modulesLocation.addListener (this);
  313. modulesLabel.attachToComponent (&modulesLocation, true);
  314. addAndMakeVisible (&updateModulesButton);
  315. updateModulesButton.setBounds ("parent.width - 175, 3, parent.width - 4, 28");
  316. updateModulesButton.addListener (this);
  317. moduleListBox.setHandler (this);
  318. addAndMakeVisible (&moduleListBox);
  319. moduleListBox.setBounds ("4, 31, parent.width / 2 - 4, parent.height - 3");
  320. }
  321. void filenameComponentChanged (FilenameComponent*)
  322. {
  323. moduleList.rescan (modulesLocation.getCurrentFile());
  324. modulesLocation.setCurrentFile (moduleList.getModulesFolder(), false, false);
  325. ModuleList::setLocalModulesFolder (moduleList.getModulesFolder());
  326. moduleListBox.refresh();
  327. }
  328. void buttonClicked (Button*)
  329. {
  330. JuceUpdater::show (moduleList, getTopLevelComponent(), "");
  331. filenameComponentChanged (nullptr);
  332. }
  333. bool isEnabled (const ModuleList::Module* m) const
  334. {
  335. return project.isModuleEnabled (m->uid);
  336. }
  337. void setEnabled (const ModuleList::Module* m, bool enable)
  338. {
  339. if (enable)
  340. project.addModule (m->uid, true);
  341. else
  342. project.removeModule (m->uid);
  343. refresh();
  344. }
  345. bool areDependenciesMissing (const ModuleList::Module* m)
  346. {
  347. return moduleList.getExtraDependenciesNeeded (project, *m).size() > 0;
  348. }
  349. void selectionChanged (const ModuleList::Module* selectedModule)
  350. {
  351. settings = nullptr;
  352. if (selectedModule != nullptr)
  353. addAndMakeVisible (settings = new ModuleSettingsPanel (project, moduleList, selectedModule->uid));
  354. }
  355. void refresh()
  356. {
  357. moduleListBox.refresh();
  358. if (settings != nullptr)
  359. settings->refreshAll();
  360. }
  361. private:
  362. Project& project;
  363. ModuleList moduleList;
  364. FilenameComponent modulesLocation;
  365. Label modulesLabel;
  366. TextButton updateModulesButton;
  367. ModuleSelectionListBox moduleListBox;
  368. ScopedPointer<ModuleSettingsPanel> settings;
  369. };
  370. void ModuleSettingsPanel::MissingDependenciesComponent::buttonClicked (Button*)
  371. {
  372. bool isModuleCopiedLocally = project.shouldCopyModuleFilesLocally (moduleID).getValue();
  373. for (int i = missingDependencies.size(); --i >= 0;)
  374. project.addModule (missingDependencies[i], isModuleCopiedLocally);
  375. ModulesPanel* mp = findParentComponentOfClass ((ModulesPanel*) 0);
  376. if (mp != nullptr)
  377. mp->refresh();
  378. }
  379. //[/MiscUserDefs]
  380. //==============================================================================
  381. ProjectInformationComponent::ProjectInformationComponent (Project& project_)
  382. : project (project_),
  383. configTabBox (TabbedButtonBar::TabsAtTop)
  384. {
  385. addAndMakeVisible (&configTabBox);
  386. configTabBox.setBounds ("8, 0, this.left + parent.width - 16, this.top + parent.height - 36");
  387. addAndMakeVisible (&editConfigsButton);
  388. editConfigsButton.setBounds ("8, parent.height - 30, this.left + 192, this.top + 22");
  389. editConfigsButton.setButtonText ("Add/Remove Configurations...");
  390. editConfigsButton.addListener (this);
  391. addAndMakeVisible (&openProjectButton);
  392. openProjectButton.setBounds ("608, parent.height - 30, this.left + 208, this.top + 22");
  393. openProjectButton.setButtonText ("Open Project in ");
  394. openProjectButton.addListener (this);
  395. addAndMakeVisible (&editExportersButton);
  396. editExportersButton.setBounds ("208, parent.height - 30, this.left + 160, this.top + 22");
  397. editExportersButton.setButtonText ("Add/Remove Exporters...");
  398. editExportersButton.addListener (this);
  399. addAndMakeVisible (&saveAndOpenButton);
  400. saveAndOpenButton.setBounds ("391, parent.height - 30, this.left + 208, this.top + 22");
  401. saveAndOpenButton.setButtonText ("Save And Open in");
  402. saveAndOpenButton.addListener (this);
  403. //[UserPreSize]
  404. rebuildConfigTabs();
  405. #if JUCE_MAC || JUCE_WINDOWS
  406. openProjectButton.setCommandToTrigger (commandManager, CommandIDs::openInIDE, true);
  407. openProjectButton.setButtonText (commandManager->getNameOfCommand (CommandIDs::openInIDE));
  408. saveAndOpenButton.setCommandToTrigger (commandManager, CommandIDs::saveAndOpenInIDE, true);
  409. saveAndOpenButton.setButtonText (commandManager->getNameOfCommand (CommandIDs::saveAndOpenInIDE));
  410. #else
  411. openProjectButton.setVisible (false);
  412. saveAndOpenButton.setVisible (false);
  413. #endif
  414. //[/UserPreSize]
  415. setSize (836, 427);
  416. //[Constructor] You can add your own custom stuff here..
  417. configTabBox.setOutline (1);
  418. configTabBox.setColour (TabbedComponent::outlineColourId, Colours::black.withAlpha (0.3f));
  419. editConfigsButton.setTriggeredOnMouseDown (true);
  420. project.addChangeListener (this);
  421. //[/Constructor]
  422. }
  423. ProjectInformationComponent::~ProjectInformationComponent()
  424. {
  425. //[Destructor_pre]. You can add your own custom destruction code here..
  426. project.removeChangeListener (this);
  427. //[/Destructor_pre]
  428. //[Destructor]. You can add your own custom destruction code here..
  429. //[/Destructor]
  430. }
  431. //==============================================================================
  432. void ProjectInformationComponent::resized()
  433. {
  434. //[Userresized_Pre]
  435. //[/Userresized_Pre]
  436. //[Userresized_Post]
  437. //[/Userresized_Post]
  438. }
  439. void ProjectInformationComponent::buttonClicked (Button* buttonThatWasClicked)
  440. {
  441. //[UserbuttonClicked_Pre]
  442. //[/UserbuttonClicked_Pre]
  443. if (buttonThatWasClicked == &editConfigsButton)
  444. {
  445. //[UserButtonCode_b6625dfcdb1f4755] -- add your button handler code here..
  446. showConfigMenu();
  447. //[/UserButtonCode_b6625dfcdb1f4755]
  448. }
  449. else if (buttonThatWasClicked == &openProjectButton)
  450. {
  451. //[UserButtonCode_a550a652e2666ee7] -- add your button handler code here..
  452. //[/UserButtonCode_a550a652e2666ee7]
  453. }
  454. else if (buttonThatWasClicked == &editExportersButton)
  455. {
  456. //[UserButtonCode_c1f6e5f9811b307e] -- add your button handler code here..
  457. showExporterMenu();
  458. //[/UserButtonCode_c1f6e5f9811b307e]
  459. }
  460. else if (buttonThatWasClicked == &saveAndOpenButton)
  461. {
  462. //[UserButtonCode_dRGMyYx] -- add your button handler code here..
  463. //[/UserButtonCode_dRGMyYx]
  464. }
  465. //[UserbuttonClicked_Post]
  466. //[/UserbuttonClicked_Post]
  467. }
  468. void ProjectInformationComponent::paint (Graphics& g)
  469. {
  470. //[UserPaint] Add your own custom painting code here..
  471. g.setTiledImageFill (ImageCache::getFromMemory (BinaryData::brushed_aluminium_png, BinaryData::brushed_aluminium_pngSize),
  472. 0, 0, 1.0f);
  473. g.fillAll();
  474. drawRecessedShadows (g, getWidth(), getHeight(), 14);
  475. //[/UserPaint]
  476. }
  477. //[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
  478. void ProjectInformationComponent::rebuildConfigTabs()
  479. {
  480. configTabBox.clearTabs();
  481. configTabBox.addTab ("Project Settings", Colours::lightslategrey, new ProjectTab (project), true, -1);
  482. configTabBox.addTab ("Modules", Colours::lightblue, new ModulesPanel (project), true, -1);
  483. int i;
  484. for (i = 0; i < project.getNumConfigurations(); ++i)
  485. {
  486. Component* panel = new ConfigTab (project, i);
  487. Project::BuildConfiguration config (project.getConfiguration (i));
  488. configTabBox.addTab (config.getName().toString(), Colour::greyLevel (0.65f), panel, true, -1);
  489. }
  490. for (i = 0; i < project.getNumExporters(); ++i)
  491. {
  492. ScopedPointer <ProjectExporter> exp (project.createExporter (i));
  493. if (exp != nullptr)
  494. {
  495. Component* panel = new ExportTab (project, i);
  496. configTabBox.addTab (exp->getName(), Colours::lightsteelblue, panel, true, -1);
  497. }
  498. }
  499. lastProjectType = project.getProjectTypeValue().getValue();
  500. }
  501. void ProjectInformationComponent::updateConfigTabs()
  502. {
  503. if (configTabBox.getNumTabs() != project.getNumConfigurations() + project.getNumExporters() + 2
  504. || lastProjectType != project.getProjectTypeValue().getValue())
  505. {
  506. rebuildConfigTabs();
  507. }
  508. else
  509. {
  510. for (int i = 0; i < project.getNumConfigurations(); ++i)
  511. {
  512. Project::BuildConfiguration config (project.getConfiguration (i));
  513. configTabBox.setTabName (i + 2, config.getName().toString());
  514. }
  515. }
  516. }
  517. void ProjectInformationComponent::showConfigMenu()
  518. {
  519. PopupMenu m;
  520. m.addItem (1, "Add a new empty configuration");
  521. PopupMenu createCopyMenu, removeMenu;
  522. for (int i = 0; i < project.getNumConfigurations(); ++i)
  523. {
  524. Project::BuildConfiguration config (project.getConfiguration (i));
  525. createCopyMenu.addItem (i + 10000, "Create a copy of '" + config.getName().toString() + "'");
  526. removeMenu.addItem (i + 20000, "Delete configuration '" + config.getName().toString() + "'");
  527. }
  528. m.addSubMenu ("Add a copy of an existing configuration", createCopyMenu);
  529. m.addSubMenu ("Remove configuration", removeMenu);
  530. const int r = m.showAt (&editConfigsButton);
  531. if (r >= 20000)
  532. {
  533. project.deleteConfiguration (r - 20000);
  534. }
  535. else if (r >= 10000)
  536. {
  537. Project::BuildConfiguration configToCopy (project.getConfiguration (r - 10000));
  538. project.addNewConfiguration (&configToCopy);
  539. }
  540. else if (r == 1)
  541. {
  542. project.addNewConfiguration (nullptr);
  543. }
  544. }
  545. void ProjectInformationComponent::showExporterMenu()
  546. {
  547. PopupMenu m;
  548. PopupMenu createMenu, removeMenu;
  549. int i;
  550. for (i = 0; i < project.getNumExporters(); ++i)
  551. {
  552. ScopedPointer<ProjectExporter> exp (project.createExporter (i));
  553. if (exp != nullptr)
  554. removeMenu.addItem (i + 20000, "Delete " + exp->getName());
  555. }
  556. StringArray exporters (ProjectExporter::getExporterNames());
  557. for (i = 0; i < exporters.size(); ++i)
  558. createMenu.addItem (i + 10000, "Create a new " + exporters[i] + " target");
  559. m.addSubMenu ("Create new export target", createMenu);
  560. m.addSubMenu ("Remove export target", removeMenu);
  561. const int r = m.showAt (&editExportersButton);
  562. if (r >= 20000)
  563. project.deleteExporter (r - 20000);
  564. else if (r >= 10000)
  565. project.addNewExporter (exporters [r - 10000]);
  566. }
  567. void ProjectInformationComponent::changeListenerCallback (ChangeBroadcaster*)
  568. {
  569. updateConfigTabs();
  570. }
  571. //[/MiscUserCode]
  572. //==============================================================================
  573. //======================= Jucer Information Section ==========================
  574. //==============================================================================
  575. #if 0
  576. /* This section stores the Jucer's metadata - edit it at your own risk!
  577. JUCER_COMPONENT_METADATA_START
  578. <COMPONENT id="tO9EG1a" className="ProjectInformationComponent" width="836"
  579. height="427" background="f6f9ff" parentClasses="public Component, public ChangeListener"
  580. constructorParams="Project&amp; project_" memberInitialisers="project (project_)">
  581. <COMPONENTS>
  582. <TABBEDCOMPONENT id="962c1575c4142253" memberName="configTabBox" focusOrder="0"
  583. position="8, 0, this.left + parent.width - 16, this.top + parent.height - 36"/>
  584. <TEXTBUTTON id="b6625dfcdb1f4755" memberName="editConfigsButton" focusOrder="0"
  585. text="Add/Remove Configurations..." createCallback="1" radioGroup="0"
  586. connectedLeft="0" connectedRight="0" connectedTop="0" connectedBottom="0"
  587. backgroundColour="" textColour="" backgroundColourOn="" textColourOn=""
  588. position="8, parent.height - 30, this.left + 192, this.top + 22"/>
  589. <TEXTBUTTON id="a550a652e2666ee7" memberName="openProjectButton" focusOrder="0"
  590. text="Open Project in " createCallback="1" radioGroup="0" connectedLeft="0"
  591. connectedRight="0" connectedTop="0" connectedBottom="0" backgroundColour=""
  592. textColour="" backgroundColourOn="" textColourOn="" position="608, parent.height - 30, this.left + 208, this.top + 22"/>
  593. <TEXTBUTTON id="c1f6e5f9811b307e" memberName="editExportersButton" focusOrder="0"
  594. text="Add/Remove Exporters..." createCallback="1" radioGroup="0"
  595. connectedLeft="0" connectedRight="0" connectedTop="0" connectedBottom="0"
  596. backgroundColour="" textColour="" backgroundColourOn="" textColourOn=""
  597. position="208, parent.height - 30, this.left + 160, this.top + 22"/>
  598. <TEXTBUTTON id="dRGMyYx" name="" memberName="saveAndOpenButton" position="391, parent.height - 30, this.left + 208, this.top + 22"
  599. text="Save And Open in" createCallback="1" radioGroup="0" connectedLeft="0"
  600. connectedRight="0" connectedTop="0" connectedBottom="0"/>
  601. </COMPONENTS>
  602. <MARKERS_X/>
  603. <MARKERS_Y/>
  604. <METHODS/>
  605. </COMPONENT>
  606. JUCER_COMPONENT_METADATA_END
  607. */
  608. #endif