#include "wx/hints_dialog.h"
#include "wx/html_dialog.h"
#include "wx/i18n_hook.h"
+#include "wx/id.h"
#include "wx/job_manager_view.h"
#include "wx/kdm_dialog.h"
#include "wx/nag_dialog.h"
map<wxMenuItem*, int> menu_items;
enum {
- ID_file_new = 1,
+ ID_file_new = DCPOMATIC_MAIN_MENU,
ID_file_open,
ID_file_save,
ID_file_save_as_template,
ID_file_duplicate_and_open,
ID_file_history,
/* Allow spare IDs after _history for the recent files list */
- ID_file_close = 100,
+ ID_file_close = DCPOMATIC_MAIN_MENU + 100,
ID_edit_copy,
ID_edit_paste,
ID_edit_select_all,
#include "wx/about_dialog.h"
#include "wx/dcpomatic_button.h"
#include "wx/full_config_dialog.h"
+#include "wx/id.h"
#include "wx/job_manager_view.h"
#include "wx/servers_list_dialog.h"
#include "wx/wx_ptr.h"
enum {
- ID_file_add_film = 1,
+ ID_file_add_film = DCPOMATIC_MAIN_MENU,
ID_tools_encoding_servers,
ID_help_about
};
#ifdef DCPOMATIC_OSX
enum {
- ID_tools_uninstall = 1,
+ ID_tools_uninstall = DCPOMATIC_MAIN_MENU,
};
#endif
#include "wx/about_dialog.h"
#include "wx/editable_list.h"
+#include "wx/id.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
#include "lib/constants.h"
enum {
- ID_file_open = 1,
+ ID_file_open = DCPOMATIC_MAIN_MENU,
ID_file_save,
};
#include "wx/about_dialog.h"
#include "wx/dcpomatic_button.h"
#include "wx/editable_list.h"
+#include "wx/id.h"
#include "wx/invalid_certificate_period_dialog.h"
#include "wx/file_dialog.h"
#include "wx/file_picker_ctrl.h"
enum {
- ID_help_report_a_problem = 1,
+ ID_help_report_a_problem = DCPOMATIC_MAIN_MENU,
};
#include "wx/about_dialog.h"
#include "wx/file_dialog.h"
#include "wx/film_viewer.h"
+#include "wx/id.h"
#include "wx/nag_dialog.h"
#include "wx/player_config_dialog.h"
#include "wx/player_information.h"
enum {
- ID_file_open = 1,
+ ID_file_open = DCPOMATIC_MAIN_MENU,
ID_file_add_ov,
ID_file_add_kdm,
ID_file_save_frame,
ID_file_history,
/* Allow spare IDs after _history for the recent files list */
- ID_file_close = 100,
+ ID_file_close = DCPOMATIC_MAIN_MENU + 100,
ID_view_cpl,
/* Allow spare IDs for CPLs */
- ID_view_full_screen = 200,
+ ID_view_full_screen = DCPOMATIC_MAIN_MENU + 200,
ID_view_dual_screen,
ID_view_closed_captions,
ID_view_scale_appropriate,
*/
+#include "wx/id.h"
#include "wx/static_text.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
enum {
- ID_status = 1,
+ ID_status = DCPOMATIC_MAIN_MENU,
ID_quit,
ID_timer
};
#include "audio_gain_dialog.h"
#include "audio_mapping_view.h"
+#include "id.h"
#include "wx_util.h"
#include "lib/audio_mapping.h"
#include "lib/maths_util.h"
enum {
- ID_off = 1,
- ID_minus6dB = 2,
- ID_0dB = 3,
- ID_plus3dB = 4,
- ID_edit = 5
+ ID_off = DCPOMATIC_AUDIO_GAIN_MENU,
+ ID_minus6dB,
+ ID_0dB,
+ ID_plus3dB,
+ ID_edit
};
#include "dir_dialog.h"
#include "file_dialog.h"
#include "film_viewer.h"
+#include "id.h"
#include "repeat_dialog.h"
#include "timeline_video_content_view.h"
#include "timeline_audio_content_view.h"
enum {
- /* Start at 256 so we can have IDs on _cpl_menu from 1 to 255 */
- ID_repeat = 256,
+ ID_repeat = DCPOMATIC_CONTENT_MENU,
ID_join,
ID_find_missing,
ID_properties,
try {
auto cpls = dcp::find_and_resolve_cpls (dcp->directories(), true);
_choose_cpl->Enable (cpls.size() > 1);
- /* We can't have 0 as a menu item ID on OS X */
- int id = 1;
+ int id = DCPOMATIC_CPL_MENU;
for (auto i: cpls) {
auto item = _cpl_menu->AppendRadioItem (
id++,
--- /dev/null
+/*
+ Copyright (C) 2024 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#define DCPOMATIC_MARKERS_PANEL_MENU wxID_HIGHEST
+#define DCPOMATIC_MAIN_MENU (wxID_HIGHEST + 500)
+#define DCPOMATIC_CPL_MENU (wxID_HIGHEST + 1000)
+#define DCPOMATIC_CONTENT_MENU (wxID_HIGHEST + 1500)
+#define DCPOMATIC_AUDIO_GAIN_MENU (wxID_HIGHEST + 2000)
+
#include "film_viewer.h"
+#include "id.h"
#include "markers.h"
#include "markers_panel.h"
#include "wx_util.h"
enum {
- ID_move_marker_to_current_position,
+ ID_move_marker_to_current_position = DCPOMATIC_MARKERS_PANEL_MENU,
ID_remove_marker,
ID_add_marker,
/* Leave some space after this one as we use an ID for each marker type