search.h (558B)
1 #pragma once 2 3 #include "juce_gui_basics/juce_gui_basics.h" 4 5 namespace jucePluginEditorLib::patchManager 6 { 7 class Search : public juce::TextEditor, juce::TextEditor::Listener 8 { 9 public: 10 Search(); 11 12 void textEditorTextChanged(juce::TextEditor&) override; 13 14 static std::string lowercase(const std::string& _s); 15 16 virtual void onTextChanged(const std::string& _text); 17 18 void paint(juce::Graphics& g) override; 19 20 const std::string& getSearchText() const { return m_text; } 21 22 private: 23 void setText(const std::string& _text); 24 25 std::string m_text; 26 }; 27 }