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