Horizon
Loading...
Searching...
No Matches
part_preview.hpp
1#pragma once
2#include <gtkmm.h>
3#include <set>
4#include "common/common.hpp"
5#include "util/uuid.hpp"
6#include "preview_base.hpp"
7#include "generic_combo_box.hpp"
8#include "util/paned_state_store.hpp"
9#include <optional>
10
11namespace horizon {
12class PartPreview : public Gtk::Box, public PreviewBase {
13public:
14 PartPreview(class IPool &pool, bool show_goto = true, const std::string &instance = "");
15
16 void load(const class Part *part);
17
18private:
19 class IPool &pool;
20 const bool show_goto;
21 const class Part *part = nullptr;
22 class EntityPreview *entity_preview = nullptr;
23
24 class PreviewCanvas *canvas_package = nullptr;
25 GenericComboBox<UUID> *combo_package = nullptr;
26
27 Gtk::Label *label_MPN = nullptr;
28 Gtk::Label *label_manufacturer = nullptr;
29 Gtk::Label *label_value = nullptr;
30 Gtk::Label *label_description = nullptr;
31 Gtk::Label *label_datasheet = nullptr;
32 Gtk::Label *label_entity = nullptr;
33 Gtk::Box *box_orderable_MPNs = nullptr;
34 Gtk::Label *label_orderable_MPNs_title = nullptr;
35
36 void handle_package_sel();
37 std::optional<PanedStateStore> state_store;
38};
39} // namespace horizon
Definition entity_preview.hpp:11
Definition generic_combo_box.hpp:5
Definition ipool.hpp:15
Definition part_preview.hpp:12
Definition part.hpp:15
Definition preview_base.hpp:9
Definition preview_canvas.hpp:7