Background.cpp 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*\
  2. |*| Copyright 2015 bill-auger <https://github.com/bill-auger/av-caster/issues>
  3. |*|
  4. |*| This file is part of the AvCaster program.
  5. |*|
  6. |*| AvCaster is free software: you can redistribute it and/or modify
  7. |*| it under the terms of the GNU Lesser General Public License version 3
  8. |*| as published by the Free Software Foundation.
  9. |*|
  10. |*| AvCaster is distributed in the hope that it will be useful,
  11. |*| but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. |*| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. |*| GNU Lesser General Public License for more details.
  14. |*|
  15. |*| You should have received a copy of the GNU Lesser General Public License
  16. |*| along with AvCaster. If not, see <http://www.gnu.org/licenses/>.
  17. \*/
  18. //[Headers] You can add your own extra header files here...
  19. //[/Headers]
  20. #include "Background.h"
  21. //[MiscUserDefs] You can add your own user definitions and misc code here...
  22. //[/MiscUserDefs]
  23. //==============================================================================
  24. Background::Background ()
  25. {
  26. //[UserPreSize]
  27. //[/UserPreSize]
  28. setSize (600, 400);
  29. //[Constructor] You can add your own custom stuff here..
  30. //[/Constructor]
  31. }
  32. Background::~Background()
  33. {
  34. //[Destructor_pre]. You can add your own custom destruction code here..
  35. //[/Destructor_pre]
  36. //[Destructor]. You can add your own custom destruction code here..
  37. //[/Destructor]
  38. }
  39. //==============================================================================
  40. void Background::paint (Graphics& g)
  41. {
  42. //[UserPrePaint] Add your own custom painting code here..
  43. //[/UserPrePaint]
  44. g.fillAll (Colour (0xff101010));
  45. g.setColour (Colour (0xff202020));
  46. g.fillRoundedRectangle (8.0f, 8.0f, static_cast<float> (getWidth() - 16), static_cast<float> (getHeight() - 40), 10.000f);
  47. g.setColour (Colours::white);
  48. g.drawRoundedRectangle (8.0f, 8.0f, static_cast<float> (getWidth() - 16), static_cast<float> (getHeight() - 40), 10.000f, 1.000f);
  49. //[UserPaint] Add your own custom painting code here..
  50. //[/UserPaint]
  51. }
  52. void Background::resized()
  53. {
  54. //[UserPreResize] Add your own custom resize code here..
  55. //[/UserPreResize]
  56. //[UserResized] Add your own custom resize handling here..
  57. //[/UserResized]
  58. }
  59. //[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
  60. //[/MiscUserCode]
  61. //==============================================================================
  62. #if 0
  63. /* -- Introjucer information section --
  64. This is where the Introjucer stores the metadata that describe this GUI layout, so
  65. make changes in here at your peril!
  66. BEGIN_JUCER_METADATA
  67. <JUCER_COMPONENT documentType="Component" className="Background" componentName=""
  68. parentClasses="public Component" constructorParams="" variableInitialisers=""
  69. snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
  70. fixedSize="0" initialWidth="600" initialHeight="400">
  71. <BACKGROUND backgroundColour="ff101010">
  72. <ROUNDRECT pos="8 8 16M 40M" cornerSize="10" fill="solid: ff202020" hasStroke="1"
  73. stroke="1, mitered, butt" strokeColour="solid: ffffffff"/>
  74. </BACKGROUND>
  75. </JUCER_COMPONENT>
  76. END_JUCER_METADATA
  77. */
  78. #endif
  79. //[EndFile] You can add extra defines here...
  80. //[/EndFile]