mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 07:41:09 -06:00

1. first formal version of macos 2. add the bambu networking plugin install logic 3. auto compute the wipe volume when filament change 4. add the logic of wiping into support 5. refine the GUI layout and icons, improve the gui apperance in lots of small places 6. serveral improve to support 7. support AMS auto-mapping 8. disable lots of unstable features: such as params table, media file download, HMS 9. fix serveral kinds of bugs 10. update the document of building 11. ...
84 lines
1.5 KiB
C++
84 lines
1.5 KiB
C++
//
|
|
// wxMediaCtrl2.h
|
|
// libslic3r_gui
|
|
//
|
|
// Created by cmguo on 2021/12/7.
|
|
//
|
|
|
|
#ifndef wxMediaCtrl2_h
|
|
#define wxMediaCtrl2_h
|
|
|
|
#include "wx/uri.h"
|
|
#include "wx/mediactrl.h"
|
|
|
|
#ifdef __WXMAC__
|
|
|
|
class wxMediaCtrl2 : public wxWindow
|
|
{
|
|
public:
|
|
wxMediaCtrl2(wxWindow * parent);
|
|
|
|
void Load(wxURI url);
|
|
|
|
void Play();
|
|
|
|
void Stop();
|
|
|
|
void SetIdleImage(wxString const & image);
|
|
|
|
wxMediaState GetState() const;
|
|
|
|
wxSize GetVideoSize() const;
|
|
|
|
int GetLastError() const { return m_error; }
|
|
|
|
static constexpr wxMediaState MEDIASTATE_BUFFERING = (wxMediaState) 6;
|
|
|
|
protected:
|
|
void DoSetSize(int x, int y, int width, int height, int sizeFlags) override;
|
|
|
|
private:
|
|
void create_player();
|
|
void * m_player = nullptr;
|
|
wxMediaState m_state = wxMEDIASTATE_STOPPED;
|
|
int m_error = 0;
|
|
};
|
|
|
|
#else
|
|
|
|
class wxMediaCtrl2 : public wxMediaCtrl
|
|
{
|
|
public:
|
|
wxMediaCtrl2(wxWindow *parent);
|
|
|
|
void Load(wxURI url);
|
|
|
|
void Play();
|
|
|
|
void Stop();
|
|
|
|
void SetIdleImage(wxString const & image);
|
|
|
|
int GetLastError() const { return m_error; }
|
|
|
|
wxSize GetVideoSize() const;
|
|
|
|
protected:
|
|
wxSize DoGetBestSize() const override;
|
|
|
|
void DoSetSize(int x, int y, int width, int height, int sizeFlags) override;
|
|
|
|
#ifdef __WIN32__
|
|
WXLRESULT MSWWindowProc(WXUINT nMsg,
|
|
WXWPARAM wParam,
|
|
WXLPARAM lParam) override;
|
|
#endif
|
|
|
|
private:
|
|
wxString m_idle_image;
|
|
int m_error = 0;
|
|
};
|
|
|
|
#endif
|
|
|
|
#endif /* wxMediaCtrl2_h */
|