mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 20:57:53 -06:00
Add the full source of BambuStudio
using version 1.0.10
This commit is contained in:
parent
30bcadab3e
commit
1555904bef
3771 changed files with 1251328 additions and 0 deletions
65
src/slic3r/GUI/MarkdownTip.hpp
Normal file
65
src/slic3r/GUI/MarkdownTip.hpp
Normal file
|
@ -0,0 +1,65 @@
|
|||
#ifndef slic3r_MarkdownTip_hpp_
|
||||
#define slic3r_MarkdownTip_hpp_
|
||||
|
||||
#include <wx/popupwin.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/webview.h>
|
||||
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
class MarkdownTip : public wxPopupTransientWindow
|
||||
{
|
||||
public:
|
||||
static bool ShowTip(std::string const &tip, std::string const &tooltip, wxPoint pos);
|
||||
|
||||
static void ExitTip();
|
||||
|
||||
static void Reload();
|
||||
|
||||
static void Recreate(wxWindow *parent);
|
||||
|
||||
static wxWindow* AttachTo(wxWindow * parent);
|
||||
|
||||
static wxWindow* DetachFrom(wxWindow * parent);
|
||||
|
||||
private:
|
||||
static MarkdownTip* markdownTip(bool create = true);
|
||||
|
||||
MarkdownTip();
|
||||
|
||||
void LoadStyle();
|
||||
|
||||
bool ShowTip(wxPoint pos, std::string const &tip, std::string const & tooltip);
|
||||
|
||||
std::string LoadTip(std::string const &tip, std::string const &tooltip);
|
||||
|
||||
void RunScript(std::string const& script);
|
||||
|
||||
private:
|
||||
wxWebView* CreateTipView(wxWindow* parent);
|
||||
|
||||
void OnLoaded(wxWebViewEvent& event);
|
||||
|
||||
void OnTitleChanged(wxWebViewEvent& event);
|
||||
|
||||
void OnError(wxWebViewEvent& event);
|
||||
|
||||
void OnTimer(wxTimerEvent& event);
|
||||
|
||||
private:
|
||||
wxWebView* _tipView = NULL;
|
||||
std::string _lastTip;
|
||||
std::string _pendingScript = " ";
|
||||
std::string _language;
|
||||
wxPoint _requestPos;
|
||||
double _lastHeight = 0;
|
||||
wxTimer* _timer;
|
||||
bool _hide = false;
|
||||
bool _data_dir = false;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue