MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / SubtitlesPreview

Method SubtitlesPreview

src/subs_preview.cpp:48–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46#include <wx/msgdlg.h>
47
48SubtitlesPreview::SubtitlesPreview(wxWindow *parent, wxSize size, int winStyle, agi::Color col)
49: wxWindow(parent, -1, wxDefaultPosition, size, winStyle)
50, style(new AssStyle)
51, back_color(col)
52, sub_file(std::make_unique<AssFile>())
53, line(new AssDialogue)
54{
55 line->Text = "{\\q2}preview";
56
57 SetStyle(*style);
58
59 sub_file->LoadDefault();
60 sub_file->Styles.push_back(*style);
61 sub_file->Events.push_back(*line);
62
63 SetSizeHints(size.GetWidth(), size.GetHeight(), -1, -1);
64 wxSizeEvent evt(size);
65 OnSize(evt);
66 UpdateBitmap();
67
68 Bind(wxEVT_PAINT, &SubtitlesPreview::OnPaint, this);
69 Bind(wxEVT_SIZE, &SubtitlesPreview::OnSize, this);
70}
71
72SubtitlesPreview::~SubtitlesPreview() {
73}

Callers

nothing calls this directly

Calls 4

LoadDefaultMethod · 0.80
push_backMethod · 0.80
GetWidthMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected