mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Added ImGuiWrapper
This commit is contained in:
parent
5c054d11ca
commit
57e9d28a84
9 changed files with 772 additions and 0 deletions
|
@ -137,6 +137,10 @@ public:
|
|||
|
||||
virtual void create_external_gizmo_widgets(wxWindow *parent);
|
||||
|
||||
#if ENABLE_IMGUI
|
||||
void render_input_window(float x, float y, const GLCanvas3D::Selection& selection) const { on_render_input_window(x, y, selection); }
|
||||
#endif // ENABLE_IMGUI
|
||||
|
||||
protected:
|
||||
virtual bool on_init() = 0;
|
||||
virtual std::string on_get_name() const = 0;
|
||||
|
@ -155,6 +159,10 @@ protected:
|
|||
virtual void on_render(const GLCanvas3D::Selection& selection) const = 0;
|
||||
virtual void on_render_for_picking(const GLCanvas3D::Selection& selection) const = 0;
|
||||
|
||||
#if ENABLE_IMGUI
|
||||
virtual void on_render_input_window(float x, float y, const GLCanvas3D::Selection& selection) const {}
|
||||
#endif // ENABLE_IMGUI
|
||||
|
||||
float picking_color_component(unsigned int id) const;
|
||||
void render_grabbers(const BoundingBoxf3& box) const;
|
||||
void render_grabbers_for_picking(const BoundingBoxf3& box) const;
|
||||
|
@ -291,6 +299,10 @@ protected:
|
|||
g.render_for_picking(selection);
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_IMGUI
|
||||
virtual void on_render_input_window(float x, float y, const GLCanvas3D::Selection& selection) const;
|
||||
#endif // ENABLE_IMGUI
|
||||
};
|
||||
|
||||
class GLGizmoScale3D : public GLGizmoBase
|
||||
|
@ -328,6 +340,10 @@ protected:
|
|||
virtual void on_render(const GLCanvas3D::Selection& selection) const;
|
||||
virtual void on_render_for_picking(const GLCanvas3D::Selection& selection) const;
|
||||
|
||||
#if ENABLE_IMGUI
|
||||
virtual void on_render_input_window(float x, float y, const GLCanvas3D::Selection& selection) const;
|
||||
#endif // ENABLE_IMGUI
|
||||
|
||||
private:
|
||||
void render_grabbers_connection(unsigned int id_1, unsigned int id_2) const;
|
||||
|
||||
|
@ -368,6 +384,10 @@ protected:
|
|||
virtual void on_render(const GLCanvas3D::Selection& selection) const;
|
||||
virtual void on_render_for_picking(const GLCanvas3D::Selection& selection) const;
|
||||
|
||||
#if ENABLE_IMGUI
|
||||
virtual void on_render_input_window(float x, float y, const GLCanvas3D::Selection& selection) const;
|
||||
#endif // ENABLE_IMGUI
|
||||
|
||||
private:
|
||||
double calc_projection(const UpdateData& data) const;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue