OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
wxMediaCtrl3.h File Reference
#include <chrono>
#include <wx/event.h>
#include <wx/gdicmn.h>
#include <wx/string.h>
#include <memory>
#include <mutex>
#include <cstdint>
#include "wx/window.h"
#include "wx/bitmap.h"
#include "wx/uri.h"
#include "wx/mediactrl.h"
#include "IMediaController.hpp"
#include <atomic>
#include <condition_variable>
#include <thread>
#include <wx/image.h>
#include "Printer/BambuTunnel.h"
Include dependency graph for wxMediaCtrl3.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  wxMediaCtrl3

Macros

#define BAMBU_DYNAMIC

Functions

 wxDECLARE_EVENT (EVT_MEDIA_CTRL_STAT, wxCommandEvent)
void wxMediaCtrl_OnSize (wxWindow *ctrl, wxSize const &videoSize, int width, int height)

Macro Definition Documentation

◆ BAMBU_DYNAMIC

#define BAMBU_DYNAMIC

Function Documentation

◆ wxDECLARE_EVENT()

wxDECLARE_EVENT ( EVT_MEDIA_CTRL_STAT ,
wxCommandEvent  )

◆ wxMediaCtrl_OnSize()

void wxMediaCtrl_OnSize ( wxWindow * ctrl,
wxSize const & videoSize,
int width,
int height )
1116{
1117 wxSize size = videoSize;
1118 if (!size.IsFullySpecified()) size = {16, 9};
1119 int maxHeight = (width * size.GetHeight() + size.GetHeight() - 1) / size.GetWidth();
1120 if (maxHeight != ctrl->GetMaxHeight()) {
1121 // BOOST_LOG_TRIVIAL(info) << "wxMediaCtrl_OnSize: width: " << width << ", height: " << height << ", maxHeight: " << maxHeight;
1122 ctrl->SetMaxSize({-1, maxHeight});
1123 ctrl->CallAfter([ctrl] {
1124 if (auto p = ctrl->GetParent()) {
1125 p->Layout();
1126 p->Refresh();
1127 }
1128 });
1129 }
1130}
coord_t width(const BoundingBox &box)
Definition Arrange.cpp:1184

Referenced by wxMediaCtrl3::DoSetSize().

Here is the caller graph for this function: