projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
opengl edge glitch, opengl projector fix, zoom slider, label close fix
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
patchgui.C
diff --git
a/cinelerra-5.1/cinelerra/patchgui.C
b/cinelerra-5.1/cinelerra/patchgui.C
index 3a20d44c32db3e1636475ff578c175e2ee176aab..9ae8c4ef8cae7068ac69c36ac5d00d205321cd6f 100644
(file)
--- a/
cinelerra-5.1/cinelerra/patchgui.C
+++ b/
cinelerra-5.1/cinelerra/patchgui.C
@@
-42,7
+42,7
@@
#include "tracks.h"
#include "transportque.h"
#include "vframe.h"
#include "tracks.h"
#include "transportque.h"
#include "vframe.h"
-
+#include "zwindow.h"
PatchGUI::PatchGUI(MWindow *mwindow,
PatchGUI::PatchGUI(MWindow *mwindow,
@@
-65,22
+65,24
@@
PatchGUI::PatchGUI(MWindow *mwindow,
mute = 0;
expand = 0;
nudge = 0;
mute = 0;
expand = 0;
nudge = 0;
+ mix = 0;
change_source = 0;
change_source = 0;
- track_id = -1;
-
if(track) track_id = track->get_id()
;
+ track_id =
track ? track->get_id() :
-1;
+
mixer = 0
;
}
PatchGUI::~PatchGUI()
{
}
PatchGUI::~PatchGUI()
{
- if(title) delete title;
- if(record) delete record;
- if(play) delete play;
-// if(automate) delete automate;
- if(gang) delete gang;
- if(draw) delete draw;
- if(mute) delete mute;
- if(expand) delete expand;
- if(nudge) delete nudge;
+ delete title;
+ delete record;
+ delete play;
+// delete automate;
+ delete gang;
+ delete draw;
+ delete mute;
+ delete expand;
+ delete nudge;
+ delete mix;
}
void PatchGUI::create_objects()
}
void PatchGUI::create_objects()
@@
-423,6
+425,10
@@
int RecordPatch::button_press_event()
get_value(),
this,
&patch->track->record);
get_value(),
this,
&patch->track->record);
+ patch->title->set_back_color(patch->track->record ?
+ get_resources()->text_background :
+ get_resources()->text_background_disarmed);
+ patch->title->set_text_row(0);
return 1;
}
return 0;
return 1;
}
return 0;
@@
-656,19
+662,23
@@
int ExpandPatch::button_release_event()
}
}
-
-
-
TitlePatch::TitlePatch(MWindow *mwindow, PatchGUI *patch, int x, int y)
TitlePatch::TitlePatch(MWindow *mwindow, PatchGUI *patch, int x, int y)
- : BC_TextBox(x,
- y,
- patch->patchbay->get_w() - 10,
- 1,
- patch->track->title,
- 1, MEDIUMFONT, 1)
+ : BC_TextBox(x, y, patch->patchbay->get_w() - 10, 1,
+ patch->track->title, 1, MEDIUMFONT, 1)
{
this->mwindow = mwindow;
this->patch = patch;
{
this->mwindow = mwindow;
this->patch = patch;
+ set_back_color(patch->track->record ?
+ get_resources()->text_background :
+ get_resources()->text_background_disarmed);
+}
+
+void TitlePatch::update(const char *text)
+{
+ set_back_color(patch->track->record ?
+ get_resources()->text_background :
+ get_resources()->text_background_disarmed);
+ BC_TextBox::update(text);
}
int TitlePatch::handle_event()
}
int TitlePatch::handle_event()
@@
-682,13
+692,6
@@
int TitlePatch::handle_event()
}
}
-
-
-
-
-
-
-
NudgePatch::NudgePatch(MWindow *mwindow,
PatchGUI *patch,
int x,
NudgePatch::NudgePatch(MWindow *mwindow,
PatchGUI *patch,
int x,
@@
-789,5
+792,34
@@
void NudgePatch::update()
}
}
+MixPatch::MixPatch(MWindow *mwindow, PatchGUI *patch, int x, int y)
+ : BC_Toggle(x, y, mwindow->theme->get_image_set("mixpatch_data"),
+ patch->mixer, "", 0, 0, 0)
+{
+ this->mwindow = mwindow;
+ this->patch = patch;
+}
+MixPatch::~MixPatch()
+{
+}
+
+int MixPatch::handle_event()
+{
+ int v = patch->track ? get_value() : 0;
+ if( patch->mixer != v ) {
+ if( patch->track )
+ mwindow->gui->update_mixers(patch->track, v);
+ else
+ update(v);
+ mwindow->update_mixer_tracks();
+ }
+ return 1;
+}
+
+void MixPatch::update(int v)
+{
+ patch->mixer = v;
+ BC_Toggle::update(v);
+}