Audio plugin host https://kx.studio/carla
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.

38 lines
1.1KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. Fl_Osc_ListView.H - OSC Based List View
  4. Copyright (C) 2016 Mark McCurry
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. */
  10. #pragma once
  11. #include <string>
  12. #include <vector>
  13. #include "Fl_Osc_Widget.H"
  14. #include <FL/Fl_Browser.H>
  15. #include "Osc_SimpleListModel.h"
  16. class Fl_Osc_ListView:public Fl_Browser, Fl_Osc_Widget
  17. {
  18. public:
  19. Fl_Osc_ListView(int x,int y, int w, int h, const char *label=0);
  20. virtual ~Fl_Osc_ListView(void);
  21. void init(const char *path_);
  22. void doUpdate(Osc_SimpleListModel::list_t l);
  23. void update(void);
  24. void insert(std::string s, int offset);
  25. void append(std::string s);
  26. void doMove(int i, int j);
  27. void doRemove(int offset);
  28. private:
  29. void sendUpdate() const;
  30. std::string path;
  31. Osc_SimpleListModel *data;
  32. };