1 #ifndef _subtitles__hpp__included__
2 #define _subtitles__hpp__included__
7 #include "library/command.hpp"
9 namespace lua
{ class render_context
; }
11 class moviefile_subtiming
14 moviefile_subtiming(uint64_t frame
);
15 moviefile_subtiming(uint64_t first
, uint64_t length
);
16 bool operator<(const moviefile_subtiming
& a
) const;
17 bool operator==(const moviefile_subtiming
& a
) const;
18 bool inrange(uint64_t x
) const;
19 uint64_t get_frame() const;
20 uint64_t get_length() const;
28 class emu_framebuffer
;
29 class emulator_dispatch
;
31 struct subtitle_commentary
34 subtitle_commentary(movie_logic
& _mlogic
, emu_framebuffer
& _fbuf
, emulator_dispatch
& _dispatch
,
35 command::group
& _cmd
);
36 std::set
<std::pair
<uint64_t, uint64_t>> get_all();
37 std::string
get(uint64_t f
, uint64_t l
);
38 void set(uint64_t f
, uint64_t l
, const std::string
& x
);
39 static std::string
s_unescape(std::string x
);
40 static std::string
s_escape(std::string x
);
41 void render(lua::render_context
& ctx
);
43 void do_editsub(const std::string
& a
);
45 void do_savesub(const std::string
& a
);
47 emu_framebuffer
& fbuf
;
48 emulator_dispatch
& edispatch
;
50 command::_fnptr
<const std::string
&> editsub
;
51 command::_fnptr
<> listsub
;
52 command::_fnptr
<command::arg_filename
> savesub
;