projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add olaf's neophyte update, add binfolder apply btn
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
gwindowgui.C
diff --git
a/cinelerra-5.1/cinelerra/gwindowgui.C
b/cinelerra-5.1/cinelerra/gwindowgui.C
index b18920349d34ccb8516030ba3e63209a995c9a4c..c5248b4839b18591c02913405e7ebd2cd12f4c13 100644
(file)
--- a/
cinelerra-5.1/cinelerra/gwindowgui.C
+++ b/
cinelerra-5.1/cinelerra/gwindowgui.C
@@
-60,7
+60,7
@@
void GWindowGUI::start_color_thread(GWindowColorButton *color_button)
{
unlock_window();
delete color_thread;
{
unlock_window();
delete color_thread;
- color_thread = new GWindowColorThread(color_button);
+ color_thread = new GWindowColorThread(
this,
color_button);
int color = auto_colors[color_button->auto_toggle->info->ref];
color_thread->start(color);
lock_window("GWindowGUI::start_color_thread");
int color = auto_colors[color_button->auto_toggle->info->ref];
color_thread->start(color);
lock_window("GWindowGUI::start_color_thread");
@@
-71,7
+71,7
@@
const char *GWindowGUI::other_text[NON_AUTOMATION_TOTAL] =
N_("Assets"),
N_("Titles"),
N_("Transitions"),
N_("Assets"),
N_("Titles"),
N_("Transitions"),
- N_("Plugin
Auto
s")
+ N_("Plugin
Keyframe
s")
};
const char *GWindowGUI::auto_text[AUTOMATION_TOTAL] =
};
const char *GWindowGUI::auto_text[AUTOMATION_TOTAL] =
@@
-191,7
+191,7
@@
GWindowColorButton::GWindowColorButton(GWindowToggle *auto_toggle, int x, int y,
this->auto_toggle = auto_toggle;
this->color = 0;
for( int i=0; i<3; ++i ) {
this->auto_toggle = auto_toggle;
this->color = 0;
for( int i=0; i<3; ++i ) {
- vframes[i] = new VFrame(w, w, BC_RGBA8888
, -1
);
+ vframes[i] = new VFrame(w, w, BC_RGBA8888);
vframes[i]->clear_frame();
}
}
vframes[i]->clear_frame();
}
}
@@
-249,11
+249,12
@@
void GWindowColorButton::update_gui(int color)
draw_face();
}
draw_face();
}
-GWindowColorThread::GWindowColorThread(GWindowColorButton *color_button)
+GWindowColorThread::GWindowColorThread(GWindow
GUI *gui, GWindow
ColorButton *color_button)
: ColorPicker(0, color_button->auto_toggle->caption)
{
: ColorPicker(0, color_button->auto_toggle->caption)
{
- this->
color = 0
;
+ this->
gui = gui
;
this->color_button = color_button;
this->color_button = color_button;
+ this->color = 0;
color_update = new GWindowColorUpdate(this);
}
color_update = new GWindowColorUpdate(this);
}
@@
-271,7
+272,6
@@
void GWindowColorThread::start(int color)
void GWindowColorThread::handle_done_event(int result)
{
color_update->stop();
void GWindowColorThread::handle_done_event(int result)
{
color_update->stop();
- GWindowGUI *gui = color_button->auto_toggle->gui;
int ref = color_button->auto_toggle->info->ref;
gui->lock_window("GWindowColorThread::handle_done_event");
if( !result ) {
int ref = color_button->auto_toggle->info->ref;
gui->lock_window("GWindowColorThread::handle_done_event");
if( !result ) {
@@
-284,7
+284,7
@@
void GWindowColorThread::handle_done_event(int result)
color_button->update_gui(color);
}
gui->unlock_window();
color_button->update_gui(color);
}
gui->unlock_window();
- MWindowGUI *mwindow_gui =
color_button->auto_toggle->
gui->mwindow->gui;
+ MWindowGUI *mwindow_gui = gui->mwindow->gui;
mwindow_gui->lock_window("GWindowColorUpdate::run");
mwindow_gui->draw_overlays(1);
mwindow_gui->unlock_window();
mwindow_gui->lock_window("GWindowColorUpdate::run");
mwindow_gui->draw_overlays(1);
mwindow_gui->unlock_window();
@@
-299,7
+299,9
@@
int GWindowColorThread::handle_new_color(int color, int alpha)
void GWindowColorThread::update_gui()
{
void GWindowColorThread::update_gui()
{
+ gui->lock_window("GWindowColorThread::update_gui");
color_button->update_gui(color);
color_button->update_gui(color);
+ gui->unlock_window();
}
GWindowColorUpdate::GWindowColorUpdate(GWindowColorThread *color_thread)
}
GWindowColorUpdate::GWindowColorUpdate(GWindowColorThread *color_thread)
@@
-353,7
+355,7
@@
int GWindowColorButton::handle_event()
void GWindowGUI::create_objects()
{
int x = 10, y = 10;
void GWindowGUI::create_objects()
{
int x = 10, y = 10;
- lock_window("GWindowGUI::create_objects
1
");
+ lock_window("GWindowGUI::create_objects");
for( int i=0; i<(int)(sizeof(toggle_order)/sizeof(toggle_order[0])); ++i ) {
toggleinfo *tp = &toggle_order[i];
for( int i=0; i<(int)(sizeof(toggle_order)/sizeof(toggle_order[0])); ++i ) {
toggleinfo *tp = &toggle_order[i];
@@
-373,7
+375,7
@@
void GWindowGUI::create_objects()
}
const char *label = _(tp->isauto ? auto_text[tp->ref] : other_text[tp->ref]);
int color = !tp->isauto ? -1 : auto_colors[tp->ref];
}
const char *label = _(tp->isauto ? auto_text[tp->ref] : other_text[tp->ref]);
int color = !tp->isauto ? -1 : auto_colors[tp->ref];
- GWindowToggle *toggle = new GWindowToggle(
mwindow,
this, x, y, label, color, tp);
+ GWindowToggle *toggle = new GWindowToggle(this, x, y, label, color, tp);
add_tool(toggles[i] = toggle);
if( vframe )
draw_vframe(vframe, get_w()-vframe->get_w()-10, y);
add_tool(toggles[i] = toggle);
if( vframe )
draw_vframe(vframe, get_w()-vframe->get_w()-10, y);
@@
-447,11
+449,10
@@
int GWindowGUI::keypress_event()
}
}
-GWindowToggle::GWindowToggle(
MWindow *mwindow,
GWindowGUI *gui, int x, int y,
+GWindowToggle::GWindowToggle(GWindowGUI *gui, int x, int y,
const char *text, int color, toggleinfo *info)
const char *text, int color, toggleinfo *info)
- : BC_CheckBox(x, y, *get_main_value(mwindow, info), text, MEDIUMFONT, color)
+ : BC_CheckBox(x, y, *get_main_value(
gui->
mwindow, info), text, MEDIUMFONT, color)
{
{
- this->mwindow = mwindow;
this->gui = gui;
this->info = info;
this->color = color;
this->gui = gui;
this->info = info;
this->color = color;
@@
-466,12
+467,13
@@
GWindowToggle::~GWindowToggle()
int GWindowToggle::handle_event()
{
int value = get_value();
int GWindowToggle::handle_event()
{
int value = get_value();
- *get_main_value(mwindow, info) = value;
+ *get_main_value(
gui->
mwindow, info) = value;
gui->update_mwindow();
// Update stuff in MWindow
unlock_window();
gui->update_mwindow();
// Update stuff in MWindow
unlock_window();
+ MWindow *mwindow = gui->mwindow;
mwindow->gui->lock_window("GWindowToggle::handle_event");
if( info->isauto ) {
int autogroup_type = -1;
mwindow->gui->lock_window("GWindowToggle::handle_event");
if( info->isauto ) {
int autogroup_type = -1;
@@
-538,7
+540,7
@@
int* GWindowToggle::get_main_value(MWindow *mwindow, toggleinfo *info)
void GWindowToggle::update()
{
void GWindowToggle::update()
{
- int *vp = get_main_value(mwindow, info);
+ int *vp = get_main_value(
gui->
mwindow, info);
if( !vp ) return;
set_value(*vp);
}
if( !vp ) return;
set_value(*vp);
}