Horizon
Loading...
Searching...
No Matches
preview_canvas.hpp
1#pragma once
2#include "util/uuid.hpp"
3#include "util/placement.hpp"
4#include <gtkmm.h>
5
6namespace horizon {
7class PreviewCanvas : public Gtk::Overlay {
8public:
9 PreviewCanvas(class IPool &pool, bool layered);
10 void load(ObjectType ty, const UUID &uu, const Placement &pl = Placement(), bool fit = true);
11 void load_symbol(const UUID &uu, const Placement &pl = Placement(), bool fit = true, const UUID &uu_part = UUID(),
12 const UUID &uu_gate = UUID());
13 void load(class Package &pkg, bool fit = true);
14 class CanvasGL &get_canvas();
15 void set_has_scale(bool has_scale);
16 void clear();
17
18private:
19 class IPool &pool;
20 class CanvasGL *canvas = nullptr;
21 Gtk::Label *scale_label = nullptr;
22 Gtk::Frame *frame = nullptr;
23 class ScaleBar *scale_bar = nullptr;
24 bool update_scale();
25 void update_scale_deferred();
26 sigc::connection timeout_connection;
27};
28} // namespace horizon
Definition canvas_gl.hpp:20
Definition ipool.hpp:15
Definition package.hpp:29
Definition placement.hpp:8
Definition preview_canvas.hpp:7
Definition preview_canvas.cpp:18
This class encapsulates a UUID and allows it to be uses as a value type.
Definition uuid.hpp:16