summaryrefslogtreecommitdiff
path: root/src/wx/markers_panel.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-07-14 22:51:44 +0200
committerCarl Hetherington <cth@carlh.net>2025-09-27 22:41:38 +0200
commit1dddce26733fc87e559e547003890357969350ca (patch)
treecb6be65361fb492e88d7a008f08be9f5cf5372c9 /src/wx/markers_panel.h
parent4e6e9f6303a0ea00c2bbc2978bde6f9284f6e02f (diff)
Draw markers better next to the position slider (#3005).
Diffstat (limited to 'src/wx/markers_panel.h')
-rw-r--r--src/wx/markers_panel.h25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/wx/markers_panel.h b/src/wx/markers_panel.h
index 45caf9c4e..760df23ac 100644
--- a/src/wx/markers_panel.h
+++ b/src/wx/markers_panel.h
@@ -21,6 +21,7 @@
#include "lib/dcpomatic_time.h"
#include "lib/film_property.h"
+#include "lib/layout_markers.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
@@ -40,36 +41,22 @@ public:
private:
void paint();
+ void size();
void mouse_moved(wxMouseEvent& ev);
void mouse_left_down();
void mouse_right_down(wxMouseEvent& ev);
- int position(dcpomatic::DCPTime time, int width) const;
void move_marker_to_current_position();
void remove_marker();
void add_marker(wxCommandEvent& ev);
void film_changed(ChangeType type, FilmProperty property);
- void update_from_film(std::shared_ptr<Film> film);
+ void layout();
wxTipWindow* _tip = nullptr;
- class Marker {
- public:
- Marker() {}
-
- Marker(dcpomatic::DCPTime t, bool b)
- : time(t)
- , line_before_label(b)
- {}
-
- dcpomatic::DCPTime time;
- int width = 0;
- bool line_before_label = false;
- };
-
std::weak_ptr<Film> _film;
- std::map<dcp::Marker, Marker> _markers;
- boost::optional<dcp::Marker> _over;
+ std::vector<MarkerLayoutComponent> _components;
+ MarkerLayoutComponent const* _over = nullptr;
FilmViewer& _viewer;
- boost::optional<dcp::Marker> _menu_marker;
+ MarkerLayoutComponent const* _menu_marker = nullptr;
};