Files
OrcaSlicer/src/slic3r/GUI/Gizmos/GLGizmoUtils.hpp
T
yw4z 25ec403156 Unify wiki & video guide buttons (#16159)
* init

* fix build

* Update PrintOptionsDialog.cpp

* Update TroubleshootDialog.cpp
2026-10-09 12:13:00 +08:00

40 lines
1.3 KiB
C++

#ifndef GL_GIZMO_UTIL_HPP
#define GL_GIZMO_UTIL_HPP
#include <map>
#include <utility>
#include <vector>
#include <string>
#include <wx/string.h>
#include "imgui.h"
namespace Slic3r::GUI {
// Forward declaration
class ImGuiWrapper;
class GLCanvas3D;
namespace GLGizmoUtils {
// Renders a tooltip button using the provided shortcuts
void render_tooltip_button(
ImGuiWrapper* imgui_wrapper, const GLCanvas3D& canvas, const std::vector<std::pair<wxString, wxString>>& shortcuts, float x, float y);
void render_wiki_buttons(
ImGuiWrapper* imgui_wrapper, const GLCanvas3D& canvas, const char* wiki_url, const char* video_url = "");
bool render_wiki_guide_button(const GLCanvas3D& canvas, float scale, const char* url = "");
bool render_video_guide_button(const GLCanvas3D& canvas, float scale, const char* url = "");
// Sets up ImGui to render buttons that are right-aligned within the current window, using the provided labels to calculate spacing.
void begin_right_aligned_buttons(const std::vector<wxString>& labels);
void push_orca_button_style();
void pop_orca_button_style();
bool toolbar_circular_button(ImTextureID textureID, const char* id, float scale);
} // namespace GLGizmoUtils
} // namespace Slic3r::GUI
#endif // GL_GIZMO_UTIL_HPP