00001 #ifndef PATCHBAY_H
00002 #define PATCHBAY_H
00003
00004 #include "guicast.h"
00005 #include "filexml.inc"
00006 #include "mwindow.inc"
00007 #include "mwindowgui.inc"
00008 #include "overlayframe.inc"
00009 #include "patch.h"
00010 #include "patchbay.inc"
00011 #include "patchgui.inc"
00012
00013 class NudgePopupSeconds;
00014 class NudgePopupNative;
00015 class NudgePopup;
00016
00017 class PatchBay : public BC_SubWindow
00018 {
00019 public:
00020 PatchBay(MWindow *mwindow, MWindowGUI *gui);
00021 ~PatchBay();
00022
00023 int delete_all_patches();
00024 int create_objects();
00025 void resize_event();
00026 int button_press_event();
00027 int cursor_motion_event();
00028 BC_Pixmap* mode_to_icon(int mode);
00029 int icon_to_mode(BC_Pixmap *icon);
00030
00031 PatchGUI* get_patch_of(Track *track);
00032
00033
00034 int update();
00035 void update_meters(ArrayList<double> *module_levels);
00036 void stop_meters();
00037 void synchronize_nudge(int64_t value, Track *skip);
00038 void synchronize_faders(float value, int data_type, Track *skip);
00039 void change_meter_format(int mode, int min, int max);
00040 void reset_meters();
00041
00042 ArrayList<PatchGUI*> patches;
00043
00044
00045
00046
00047
00048
00049
00050
00051 int resize_event(int top, int bottom);
00052 Track *is_over_track();
00053
00054 MWindow *mwindow;
00055 MWindowGUI *gui;
00056
00057 int button_down, new_status, drag_operation, reconfigure_trigger;
00058 BC_Pixmap *mode_icons[TRANSFER_TYPES];
00059
00060 NudgePopup *nudge_popup;
00061 };
00062
00063
00064 class NudgePopup : public BC_PopupMenu
00065 {
00066 public:
00067 NudgePopup(MWindow *mwindow, PatchBay *patchbay);
00068 ~NudgePopup();
00069
00070 void create_objects();
00071 void activate_menu(PatchGUI *gui);
00072
00073 MWindow *mwindow;
00074 PatchBay *patchbay;
00075 NudgePopupSeconds *seconds_item;
00076 NudgePopupNative *native_item;
00077 };
00078
00079
00080 class NudgePopupSeconds : public BC_MenuItem
00081 {
00082 public:
00083 NudgePopupSeconds(NudgePopup *popup);
00084 int handle_event();
00085 NudgePopup *popup;
00086 };
00087
00088
00089 class NudgePopupNative : public BC_MenuItem
00090 {
00091 public:
00092 NudgePopupNative(NudgePopup *popup);
00093 int handle_event();
00094 NudgePopup *popup;
00095 };
00096
00097 #endif