mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Fixed conflicts after merge with master
This commit is contained in:
commit
f12b39be25
171 changed files with 23530 additions and 14236 deletions
|
@ -3,24 +3,24 @@
|
|||
|
||||
#include <stddef.h>
|
||||
#include <memory>
|
||||
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
#include <chrono>
|
||||
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
|
||||
#include "3DScene.hpp"
|
||||
#include "GLToolbar.hpp"
|
||||
#include "GLShader.hpp"
|
||||
#include "Event.hpp"
|
||||
#include "3DBed.hpp"
|
||||
#if !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
#include "Camera.hpp"
|
||||
#endif // !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
#include "Selection.hpp"
|
||||
#include "Gizmos/GLGizmosManager.hpp"
|
||||
#include "GUI_ObjectLayers.hpp"
|
||||
#include "GLSelectionRectangle.hpp"
|
||||
#include "MeshUtils.hpp"
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#include <wx/timer.h>
|
||||
|
||||
class wxWindow;
|
||||
class wxSizeEvent;
|
||||
class wxIdleEvent;
|
||||
class wxKeyEvent;
|
||||
|
@ -37,20 +37,16 @@ class wxGLContext;
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
class GLShader;
|
||||
class ExPolygon;
|
||||
class Bed3D;
|
||||
struct Camera;
|
||||
class BackgroundSlicingProcess;
|
||||
class GCodePreviewData;
|
||||
#if ENABLE_THUMBNAIL_GENERATOR
|
||||
struct ThumbnailData;
|
||||
#endif // ENABLE_THUMBNAIL_GENERATOR
|
||||
struct SlicingParameters;
|
||||
enum LayerHeightEditActionType : unsigned int;
|
||||
|
||||
namespace GUI {
|
||||
|
||||
class GLGizmoBase;
|
||||
|
||||
#if ENABLE_RETINA_GL
|
||||
class RetinaHelper;
|
||||
#endif
|
||||
|
@ -118,9 +114,7 @@ wxDECLARE_EVENT(EVT_GLCANVAS_RELOAD_FROM_DISK, SimpleEvent);
|
|||
|
||||
class GLCanvas3D
|
||||
{
|
||||
#if ENABLE_THUMBNAIL_GENERATOR
|
||||
static const double DefaultCameraZoomToBoxMarginFactor;
|
||||
#endif // ENABLE_THUMBNAIL_GENERATOR
|
||||
|
||||
public:
|
||||
struct GCodePreviewVolumeIndex
|
||||
|
@ -394,6 +388,24 @@ private:
|
|||
void render(const std::vector<const ModelInstance*>& sorted_instances) const;
|
||||
};
|
||||
|
||||
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
class Tooltip
|
||||
{
|
||||
std::string m_text;
|
||||
std::chrono::steady_clock::time_point m_start_time;
|
||||
// Indicator that the mouse is inside an ImGUI dialog, therefore the tooltip should be suppressed.
|
||||
bool m_in_imgui = false;
|
||||
|
||||
public:
|
||||
bool is_empty() const { return m_text.empty(); }
|
||||
void set_text(const std::string& text);
|
||||
void render(const Vec2d& mouse_position, GLCanvas3D& canvas) const;
|
||||
// Indicates that the mouse is inside an ImGUI dialog, therefore the tooltip should be suppressed.
|
||||
void set_in_imgui(bool b) { m_in_imgui = b; }
|
||||
bool is_in_imgui() const { return m_in_imgui; }
|
||||
};
|
||||
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
|
||||
public:
|
||||
enum ECursorType : unsigned char
|
||||
{
|
||||
|
@ -474,6 +486,9 @@ private:
|
|||
int m_selected_extruder;
|
||||
|
||||
Labels m_labels;
|
||||
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
mutable Tooltip m_tooltip;
|
||||
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
|
||||
public:
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
@ -576,11 +591,9 @@ public:
|
|||
bool is_dragging() const { return m_gizmos.is_dragging() || m_moving; }
|
||||
|
||||
void render();
|
||||
#if ENABLE_THUMBNAIL_GENERATOR
|
||||
// printable_only == false -> render also non printable volumes as grayed
|
||||
// parts_only == false -> render also sla support and pad
|
||||
void render_thumbnail(ThumbnailData& thumbnail_data, unsigned int w, unsigned int h, bool printable_only, bool parts_only, bool show_bed, bool transparent_background) const;
|
||||
#endif // ENABLE_THUMBNAIL_GENERATOR
|
||||
|
||||
void select_all();
|
||||
void deselect_all();
|
||||
|
@ -702,11 +715,7 @@ private:
|
|||
|
||||
BoundingBoxf3 _max_bounding_box(bool include_gizmos, bool include_bed_model) const;
|
||||
|
||||
#if ENABLE_THUMBNAIL_GENERATOR
|
||||
void _zoom_to_box(const BoundingBoxf3& box, double margin_factor = DefaultCameraZoomToBoxMarginFactor);
|
||||
#else
|
||||
void _zoom_to_box(const BoundingBoxf3& box);
|
||||
#endif // ENABLE_THUMBNAIL_GENERATOR
|
||||
void _update_camera_zoom(double zoom);
|
||||
|
||||
void _refresh_if_shown_on_screen();
|
||||
|
@ -734,8 +743,7 @@ private:
|
|||
#endif // ENABLE_SHOW_CAMERA_TARGET
|
||||
void _render_sla_slices() const;
|
||||
void _render_selection_sidebar_hints() const;
|
||||
void _render_undo_redo_stack(const bool is_undo, float pos_x) const;
|
||||
#if ENABLE_THUMBNAIL_GENERATOR
|
||||
bool _render_undo_redo_stack(const bool is_undo, float pos_x) const;
|
||||
void _render_thumbnail_internal(ThumbnailData& thumbnail_data, bool printable_only, bool parts_only, bool show_bed, bool transparent_background) const;
|
||||
// render thumbnail using an off-screen framebuffer
|
||||
void _render_thumbnail_framebuffer(ThumbnailData& thumbnail_data, unsigned int w, unsigned int h, bool printable_only, bool parts_only, bool show_bed, bool transparent_background) const;
|
||||
|
@ -743,7 +751,6 @@ private:
|
|||
void _render_thumbnail_framebuffer_ext(ThumbnailData& thumbnail_data, unsigned int w, unsigned int h, bool printable_only, bool parts_only, bool show_bed, bool transparent_background) const;
|
||||
// render thumbnail using the default framebuffer
|
||||
void _render_thumbnail_legacy(ThumbnailData& thumbnail_data, unsigned int w, unsigned int h, bool printable_only, bool parts_only, bool show_bed, bool transparent_background) const;
|
||||
#endif // ENABLE_THUMBNAIL_GENERATOR
|
||||
|
||||
void _update_volumes_hover_state() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue