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: 18 июл. 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_TK_LSPGRAPHITEM_H_
23 #define UI_TK_LSPGRAPHITEM_H_
24 
25 namespace lsp
26 {
27     namespace tk
28     {
29         class LSPGraph;
30 
31         class LSPGraphItem: public LSPWidget
32         {
33             public:
34                 static const w_class_t    metadata;
35 
36             protected:
37                 bool        bSmooth;
38 
39             public:
40                 explicit LSPGraphItem(LSPDisplay *dpy);
41                 virtual ~LSPGraphItem();
42 
43             public:
44                 LSPGraph        *graph();
45 
46             public:
is_smooth()47                 inline bool is_smooth() const   { return bSmooth;               };
48 
49             public:
50                 void        set_smooth(bool value = true);
51 
52                 inline void set_sharp(bool value = true)    { set_smooth(!value); }
53 
54             public:
55                 virtual bool inside(ssize_t x, ssize_t y);
56         };
57 
58     } /* namespace tk */
59 } /* namespace lsp */
60 
61 #endif /* UI_TK_LSPGRAPHITEM_H_ */
62