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