Files
OrcaSlicer/src/slic3r/GUI/IMEXFilamentPickerPopover.hpp
T
Clifford GarwoodandClaude Opus 5.5 53dad9f4fb Include what the IMEX code uses
Upstream's clang-tidy gate now checks that the lines a pull request changes
include the header for every symbol they use. The IMEX sources, their tests,
and the lines this PR adds to shared files relied on the precompiled header and
transitive includes. This adds the includes clang-tidy names; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 11:55:18 -04:00

51 lines
1.4 KiB
C++

#ifndef slic3r_IMEXFilamentPickerPopover_hpp_
#define slic3r_IMEXFilamentPickerPopover_hpp_
#include <libslic3r/Config.hpp>
#include <wx/popupwin.h>
#include <wx/panel.h>
#include <wx/sizer.h>
#include <functional>
#include "libslic3r/PrintConfig.hpp"
namespace Slic3r {
namespace GUI {
class PartPlate;
class IMEXFilamentPickerPopover : public wxPopupTransientWindow
{
public:
using CommitCallback = std::function<void()>;
IMEXFilamentPickerPopover(wxWindow* parent, PartPlate* plate,
const ConfigOptionInts& pem, int physical_head,
CommitCallback on_commit);
void popup_at_cursor();
private:
// Destroys the popover: the ghost-click handler creates one per click and keeps no
// reference, so every click would otherwise leak a live top-level window parented to the
// GL canvas. Only DismissAndNotify() reaches this -- plain Dismiss() just hides.
void OnDismiss() override;
void build_row();
void on_filament_selected(int slot_1_based);
PartPlate* m_plate;
// Owned by value: callers may pass a stack-local derived pem
// (e.g. effective_physical_extruder_map result) that won't outlive
// the popover's async lifetime.
ConfigOptionInts m_pem;
int m_physical_head;
CommitCallback m_on_commit;
wxSizer* m_root_sizer = nullptr;
};
}} // namespace Slic3r::GUI
#endif