#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"
Go to the source code of this file.
◆ BAMBU_DYNAMIC
◆ 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
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().