projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
verision update, fix findobj missing hdrs, fix colorpicker handle_new_color callback
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
colorpicker.C
diff --git
a/cinelerra-5.1/cinelerra/colorpicker.C
b/cinelerra-5.1/cinelerra/colorpicker.C
index f40a95f8250616ffd43568ffc3df531171a95090..9a995958c27377fd0c3a1762ddb5af763ea831e4 100644
(file)
--- a/
cinelerra-5.1/cinelerra/colorpicker.C
+++ b/
cinelerra-5.1/cinelerra/colorpicker.C
@@
-96,7
+96,7
@@
void ColorPicker::update_gui(int output, int alpha)
{
ColorWindow *gui = (ColorWindow *)get_gui();
if( !gui ) return;
{
ColorWindow *gui = (ColorWindow *)get_gui();
if( !gui ) return;
- gui->lock_window();
+ gui->lock_window(
"ColorPicker::update_gui"
);
this->output = output;
this->alpha = alpha;
gui->change_values();
this->output = output;
this->alpha = alpha;
gui->change_values();
@@
-1237,6
+1237,13
@@
void ColorButton::close_picker()
delete color_picker; color_picker = 0;
}
delete color_picker; color_picker = 0;
}
+void ColorButton::update_gui(int color, int alpha)
+{
+ if( color_picker )
+ color_picker->update_gui(color, alpha);
+ update_gui(color | (~alpha<<24));
+}
+
void ColorButton::update_gui(int color)
{
set_color(color);
void ColorButton::update_gui(int color)
{
set_color(color);
@@
-1259,21
+1266,32
@@
void ColorButtonPicker::handle_done_event(int result)
color_button->handle_done_event(result);
}
color_button->handle_done_event(result);
}
-
int ColorButtonPicker::handle_new_color
(int color, int alpha)
+
void ColorButtonPicker::update
(int color, int alpha)
{
color_button->color = color;
{
color_button->color = color;
+ color_button->alpha = alpha;
color_button->color_thread->update_lock->unlock();
color_button->color_thread->update_lock->unlock();
- color_button->handle_new_color(color, alpha);
+}
+
+int ColorButtonPicker::handle_new_color(int color, int alpha)
+{
+ update(color, alpha);
return 1;
}
void ColorButtonPicker::update_gui()
{
color_button->lock_window("ColorButtonPicker::update_gui");
return 1;
}
void ColorButtonPicker::update_gui()
{
color_button->lock_window("ColorButtonPicker::update_gui");
- color_button->update_gui(color_button->color);
+ color_button->update_gui(color_button->color
, color_button->alpha
);
color_button->unlock_window();
}
color_button->unlock_window();
}
+void ColorButtonPicker::update_gui(int color, int alpha)
+{
+ ColorPicker::update_gui(color, alpha);
+ color_button->handle_new_color(color, alpha);
+}
+
ColorButtonThread::ColorButtonThread(ColorButton *color_button)
: Thread(1, 0, 0)
{
ColorButtonThread::ColorButtonThread(ColorButton *color_button)
: Thread(1, 0, 0)
{
@@
-1337,12
+1355,13
@@
void ColorBoxButton::handle_done_event(int result)
}
void ColorBoxButton::create_objects()
{
}
void ColorBoxButton::create_objects()
{
- update_gui(color);
+ update_gui(color
, alpha
);
}
void ColorBoxButton::set_color(int color)
{
}
void ColorBoxButton::set_color(int color)
{
- this->color = color;
+ this->color = (color & 0xffffff);
+ this->alpha = (~color>>24) & 0xff;
int r = (color>>16) & 0xff;
int g = (color>> 8) & 0xff;
int b = (color>> 0) & 0xff;
int r = (color>>16) & 0xff;
int g = (color>> 8) & 0xff;
int b = (color>> 0) & 0xff;
@@
-1398,12
+1417,13
@@
void ColorCircleButton::handle_done_event(int result)
}
void ColorCircleButton::create_objects()
{
}
void ColorCircleButton::create_objects()
{
- update_gui(color);
+ update_gui(color
, alpha
);
}
void ColorCircleButton::set_color(int color)
{
}
void ColorCircleButton::set_color(int color)
{
- this->color = color;
+ this->color = (color & 0xffffff);
+ this->alpha = (~color>>24) & 0xff;
int r = (color>>16) & 0xff;
int g = (color>>8) & 0xff;
int b = (color>>0) & 0xff;
int r = (color>>16) & 0xff;
int g = (color>>8) & 0xff;
int b = (color>>0) & 0xff;