Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
dannye committed Oct 20, 2024
1 parent 0e85ff7 commit 5288463
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
42 changes: 21 additions & 21 deletions src/main-window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,59 +304,59 @@ Main_Window::Main_Window(int x, int y, int w, int h, const char *) : Fl_Double_W
SYS_MENU_ITEM("Pencil &Mode", '`', (Fl_Callback *)pencil_mode_cb, this, FL_MENU_TOGGLE),
SYS_MENU_ITEM("&Format Painter", '~', (Fl_Callback *)format_painter_cb, this, FL_MENU_TOGGLE | FL_MENU_DIVIDER),
SYS_MENU_ITEM("Channel &1", '1', (Fl_Callback *)channel_1_cb, this,
FL_MENU_RADIO | (selected_channel() == 1 ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (selected_channel() == 1 ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("Channel &2", '2', (Fl_Callback *)channel_2_cb, this,
FL_MENU_RADIO | (selected_channel() == 2 ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (selected_channel() == 2 ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("Channel &3", '3', (Fl_Callback *)channel_3_cb, this,
FL_MENU_RADIO | (selected_channel() == 3 ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (selected_channel() == 3 ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("Channel &4", '4', (Fl_Callback *)channel_4_cb, this,
FL_MENU_RADIO | (selected_channel() == 4 ? FL_MENU_VALUE : 0u) | FL_MENU_DIVIDER),
FL_MENU_RADIO | (selected_channel() == 4 ? FL_MENU_VALUE : 0) | FL_MENU_DIVIDER),
SYS_MENU_ITEM("&Next Channel", FL_Tab, (Fl_Callback *)next_channel_cb, this, 0),
SYS_MENU_ITEM("&Previous Channel", FL_SHIFT + FL_Tab, (Fl_Callback *)previous_channel_cb, this, 0),
{},
OS_SUBMENU("&View"),
SYS_MENU_ITEM("&Theme", 0, NULL, NULL, FL_SUBMENU | FL_MENU_DIVIDER),
SYS_MENU_ITEM("&Classic", 0, (Fl_Callback *)classic_theme_cb, this,
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::CLASSIC ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::CLASSIC ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("&Aero", 0, (Fl_Callback *)aero_theme_cb, this,
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::AERO ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::AERO ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("&Metro", 0, (Fl_Callback *)metro_theme_cb, this,
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::METRO ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::METRO ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("A&qua", 0, (Fl_Callback *)aqua_theme_cb, this,
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::AQUA ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::AQUA ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("&Greybird", 0, (Fl_Callback *)greybird_theme_cb, this,
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::GREYBIRD ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::GREYBIRD ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("&Ocean", 0, (Fl_Callback *)ocean_theme_cb, this,
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::OCEAN ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::OCEAN ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("&Blue", 0, (Fl_Callback *)blue_theme_cb, this,
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::BLUE ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::BLUE ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("Oli&ve", 0, (Fl_Callback *)olive_theme_cb, this,
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::OLIVE ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::OLIVE ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("&Rose Gold", 0, (Fl_Callback *)rose_gold_theme_cb, this,
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::ROSE_GOLD ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::ROSE_GOLD ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("&Dark", 0, (Fl_Callback *)dark_theme_cb, this,
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::DARK ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::DARK ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("Brushed Me&tal", 0, (Fl_Callback *)brushed_metal_theme_cb, this,
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::BRUSHED_METAL ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::BRUSHED_METAL ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("&High Contrast", 0, (Fl_Callback *)high_contrast_theme_cb, this,
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::HIGH_CONTRAST ? FL_MENU_VALUE : 0u)),
FL_MENU_RADIO | (OS::current_theme() == OS::Theme::HIGH_CONTRAST ? FL_MENU_VALUE : 0)),
{},
SYS_MENU_ITEM("Zoom &Out", FL_COMMAND + '-', (Fl_Callback *)zoom_out_cb, this, 0),
SYS_MENU_ITEM("Zoom &In", FL_COMMAND + '=', (Fl_Callback *)zoom_in_cb, this, 0),
SYS_MENU_ITEM("&Zoom Reset", FL_COMMAND + '0', (Fl_Callback *)zoom_reset_cb, this, FL_MENU_DIVIDER),
SYS_MENU_ITEM("&Key Labels", FL_COMMAND + 'k', (Fl_Callback *)key_labels_cb, this,
FL_MENU_TOGGLE | (key_labels_config ? FL_MENU_VALUE : 0u)),
FL_MENU_TOGGLE | (key_labels_config ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("&Note Labels", FL_COMMAND + 'K', (Fl_Callback *)note_labels_cb, this,
FL_MENU_DIVIDER | FL_MENU_TOGGLE | (note_labels_config ? FL_MENU_VALUE : 0u)),
FL_MENU_DIVIDER | FL_MENU_TOGGLE | (note_labels_config ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("&Ruler", FL_COMMAND + 'r', (Fl_Callback *)ruler_cb, this,
FL_MENU_TOGGLE | (ruler_config ? FL_MENU_VALUE : 0u)),
FL_MENU_TOGGLE | (ruler_config ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("&Configure Ruler...", FL_COMMAND + 'R', (Fl_Callback *)configure_ruler_cb, this, FL_MENU_DIVIDER),
SYS_MENU_ITEM("&Decrease Spacing", FL_SHIFT + '-', (Fl_Callback *)decrease_spacing_cb, this, 0),
SYS_MENU_ITEM("Incr&ease Spacing", FL_SHIFT + '=', (Fl_Callback *)increase_spacing_cb, this, FL_MENU_DIVIDER),
SYS_MENU_ITEM("Approximate &BPM", FL_COMMAND + 'b', (Fl_Callback *)bpm_cb, this,
FL_MENU_DIVIDER | FL_MENU_TOGGLE | (bpm_config ? FL_MENU_VALUE : 0u)),
FL_MENU_DIVIDER | FL_MENU_TOGGLE | (bpm_config ? FL_MENU_VALUE : 0)),
SYS_MENU_ITEM("Full &Screen", FULLSCREEN_KEY, (Fl_Callback *)full_screen_cb, this,
FL_MENU_TOGGLE | (fullscreen ? FL_MENU_VALUE : 0u)),
FL_MENU_TOGGLE | (fullscreen ? FL_MENU_VALUE : 0)),
{},
OS_SUBMENU("&Help"),
#ifdef __APPLE__
Expand Down
6 changes: 3 additions & 3 deletions src/widgets.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
#endif

#define OS_SUBMENU(l) {l, 0, NULL, NULL, FL_SUBMENU, FL_NORMAL_LABEL, OS_FONT, OS_FONT_SIZE, FL_FOREGROUND_COLOR}
#define OS_NULL_MENU_ITEM(s, c, d, f) {"", s, c, d, (int)(f), FL_NORMAL_LABEL, OS_FONT, OS_FONT_SIZE, FL_FOREGROUND_COLOR}
#define OS_MENU_ITEM(l, s, c, d, f) {OS_MENU_ITEM_PREFIX l OS_MENU_ITEM_SUFFIX, s, c, d, (int)(f), FL_NORMAL_LABEL, OS_FONT, OS_FONT_SIZE, FL_FOREGROUND_COLOR}
#define SYS_MENU_ITEM(l, s, c, d, f) {SYS_MENU_ITEM_PREFIX l SYS_MENU_ITEM_SUFFIX, s, c, d, (int)(f), FL_NORMAL_LABEL, OS_FONT, OS_FONT_SIZE, FL_FOREGROUND_COLOR}
#define OS_NULL_MENU_ITEM(s, c, d, f) {"", s, c, d, f, FL_NORMAL_LABEL, OS_FONT, OS_FONT_SIZE, FL_FOREGROUND_COLOR}
#define OS_MENU_ITEM(l, s, c, d, f) {OS_MENU_ITEM_PREFIX l OS_MENU_ITEM_SUFFIX, s, c, d, f, FL_NORMAL_LABEL, OS_FONT, OS_FONT_SIZE, FL_FOREGROUND_COLOR}
#define SYS_MENU_ITEM(l, s, c, d, f) {SYS_MENU_ITEM_PREFIX l SYS_MENU_ITEM_SUFFIX, s, c, d, f, FL_NORMAL_LABEL, OS_FONT, OS_FONT_SIZE, FL_FOREGROUND_COLOR}

class DnD_Receiver : public Fl_Box {
public:
Expand Down

0 comments on commit 5288463

Please sign in to comment.