AnalogTapeModel

Physical modelling signal processing for analog tape recording
Log | Files | Refs | Submodules | README | LICENSE

TitleComp.h (1101B)


      1 #ifndef TITLECOMP_H_INCLUDED
      2 #define TITLECOMP_H_INCLUDED
      3 
      4 #include <JuceHeader.h>
      5 
      6 class TitleComp : public Component,
      7                   public SettableTooltipClient
      8 {
      9 public:
     10     TitleComp();
     11 
     12     enum ColourIDs
     13     {
     14         text1ColourID,
     15         text2ColourID,
     16     };
     17 
     18     void paint (Graphics& g) override;
     19     void setStrings (String newTitle, String newSubtitle, float font);
     20 
     21 private:
     22     String title;
     23     String subtitle;
     24     float font = 0.0f;
     25 
     26     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TitleComp)
     27 };
     28 
     29 class TitleItem : public foleys::GuiItem
     30 {
     31 public:
     32     FOLEYS_DECLARE_GUI_FACTORY (TitleItem)
     33 
     34     static const Identifier title;
     35     static const Identifier subtitle;
     36     static const Identifier font;
     37 
     38     TitleItem (foleys::MagicGUIBuilder& builder, const ValueTree& node);
     39 
     40     void update() override;
     41     std::vector<foleys::SettableProperty> getSettableProperties() const override;
     42 
     43     Component* getWrappedComponent() override { return &comp; }
     44 
     45 private:
     46     TitleComp comp;
     47 
     48     JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TitleItem)
     49 };
     50 
     51 #endif // TITLECOMP_H_INCLUDED