1 /* 2 * Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/> 3 * (C) 2020 Vladimir Sadovnikov <sadko4u@gmail.com> 4 * 5 * This file is part of lsp-plugins 6 * Created on: 27 июл. 2017 г. 7 * 8 * lsp-plugins is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * any later version. 12 * 13 * lsp-plugins is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License 19 * along with lsp-plugins. If not, see <https://www.gnu.org/licenses/>. 20 */ 21 22 #ifndef UI_CTL_CTLTEXT_H_ 23 #define UI_CTL_CTLTEXT_H_ 24 25 namespace lsp 26 { 27 namespace ctl 28 { 29 class CtlText: public CtlWidget 30 { 31 public: 32 static const ctl_class_t metadata; 33 34 protected: 35 CtlPort *pPort; 36 CtlExpression sCoord; 37 CtlExpression sBasis; 38 CtlColor sColor; 39 40 protected: 41 void update_coords(); 42 void update_text(); 43 44 public: 45 explicit CtlText(CtlRegistry *src, LSPText *text); 46 virtual ~CtlText(); 47 48 public: 49 virtual void init(); 50 51 virtual void end(); 52 53 virtual void set(const char *name, const char *value); 54 55 virtual void set(widget_attribute_t att, const char *value); 56 57 virtual void notify(CtlPort *port); 58 }; 59 60 } /* namespace ctl */ 61 } /* namespace lsp */ 62 63 #endif /* UI_CTL_CTLTEXT_H_ */ 64