mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 23:01:22 -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
83
src/slic3r/GUI/wxMediaCtrl2.h
Normal file
83
src/slic3r/GUI/wxMediaCtrl2.h
Normal file
|
@ -0,0 +1,83 @@
|
|||
//
|
||||
// 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 * 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 */
|
Loading…
Add table
Add a link
Reference in a new issue