| 1 | // SPDX-FileCopyrightText: 2009 Ingo Ruhnke <[email protected]> |
| 2 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 3 | |
| 4 | #ifndef HEADER_JSTEST_GTK_THROTTLE_WIDGET_HPP |
| 5 | #define HEADER_JSTEST_GTK_THROTTLE_WIDGET_HPP |
| 6 | |
| 7 | #include <gtkmm/drawingarea.h> |
| 8 | |
| 9 | class ThrottleWidget : public Gtk::DrawingArea |
| 10 | { |
| 11 | private: |
| 12 | bool invert; |
| 13 | double pos; |
| 14 | |
| 15 | public: |
| 16 | ThrottleWidget(int width, int height, bool invert = false); |
| 17 | |
| 18 | bool on_draw(const ::Cairo::RefPtr< ::Cairo::Context>& cr) override; |
| 19 | void set_pos(double p); |
| 20 | |
| 21 | private: |
| 22 | ThrottleWidget(const ThrottleWidget&); |
| 23 | ThrottleWidget& operator=(const ThrottleWidget&); |
| 24 | }; |
| 25 | |
| 26 | #endif |
| 27 | |
| 28 | /* EOF */ |