r956: README.BUILD - add more library recommendations
[cinelerra_cv/ct.git] / cinelerra / patchgui.h
blob1083f65dc0b62b57b3582aedcc4ff2f4b66dfcee
1 #ifndef PATCHGUI_H
2 #define PATCHGUI_H
4 #include "guicast.h"
5 #include "mwindow.inc"
6 #include "patchbay.inc"
7 #include "intauto.inc"
8 #include "track.inc"
13 class TitlePatch;
14 class PlayPatch;
15 class RecordPatch;
16 class AutoPatch;
17 class GangPatch;
18 class DrawPatch;
19 class MutePatch;
20 class ExpandPatch;
21 class NudgePatch;
23 class PatchGUI
25 public:
26 PatchGUI(MWindow *mwindow,
27 PatchBay *patchbay,
28 Track *track,
29 int x,
30 int y);
31 virtual ~PatchGUI();
33 virtual int create_objects();
34 virtual int reposition(int x, int y);
35 void toggle_behavior(int type,
36 int value,
37 BC_Toggle *toggle,
38 int *output);
39 virtual int update(int x, int y);
40 virtual void synchronize_fade(float change) {};
41 void synchronize_faders(float change, int audio, int video);
42 char* calculate_nudge_text(int *changed);
43 int64_t calculate_nudge(char *string);
45 MWindow *mwindow;
46 PatchBay *patchbay;
47 Track *track;
48 // Used by update routines so non-existent track doesn't need to be dereferenced
49 // to know it doesn't match the current EDL.
50 int track_id;
51 int data_type;
52 int x, y;
53 // Don't synchronize the fader if this is true.
54 int change_source;
56 TitlePatch *title;
57 RecordPatch *record;
58 PlayPatch *play;
59 // AutoPatch *automate;
60 GangPatch *gang;
61 DrawPatch *draw;
62 MutePatch *mute;
63 ExpandPatch *expand;
64 NudgePatch *nudge;
65 char string_return[BCTEXTLEN];
70 class PlayPatch : public BC_Toggle
72 public:
73 PlayPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
74 int button_press_event();
75 int button_release_event();
76 MWindow *mwindow;
77 PatchGUI *patch;
80 class RecordPatch : public BC_Toggle
82 public:
83 RecordPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
84 int button_press_event();
85 int button_release_event();
86 MWindow *mwindow;
87 PatchGUI *patch;
90 class TitlePatch : public BC_TextBox
92 public:
93 TitlePatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
94 int handle_event();
95 MWindow *mwindow;
96 PatchGUI *patch;
99 class AutoPatch : public BC_Toggle
101 public:
102 AutoPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
103 int button_press_event();
104 int button_release_event();
105 MWindow *mwindow;
106 PatchGUI *patch;
109 class GangPatch : public BC_Toggle
111 public:
112 GangPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
113 int button_press_event();
114 int button_release_event();
115 MWindow *mwindow;
116 PatchGUI *patch;
119 class DrawPatch : public BC_Toggle
121 public:
122 DrawPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
123 int button_press_event();
124 int button_release_event();
125 MWindow *mwindow;
126 PatchGUI *patch;
129 class MutePatch : public BC_Toggle
131 public:
132 MutePatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
133 int button_press_event();
134 int button_release_event();
135 static IntAuto* get_keyframe(MWindow *mwindow, PatchGUI *patch);
136 MWindow *mwindow;
137 PatchGUI *patch;
140 class ExpandPatch : public BC_Toggle
142 public:
143 ExpandPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
144 int button_press_event();
145 int button_release_event();
146 MWindow *mwindow;
147 PatchGUI *patch;
150 class NudgePatch : public BC_TextBox
152 public:
153 NudgePatch(MWindow *mwindow, PatchGUI *patch, int x, int y, int w);
154 int handle_event();
155 int button_press_event();
156 void update();
157 void set_value(int64_t value);
158 int64_t calculate_increment();
160 MWindow *mwindow;
161 PatchGUI *patch;
165 #endif