return is_fullscreen;
}
-void Canvas::set_fullscreen(int value)
-{
- is_fullscreen = value;
-}
-
// Get dimensions given a zoom
void Canvas::calculate_sizes(float aspect_ratio,
int output_w, int output_h, float zoom,
}
}
-
-int Canvas::use_fullscreen(int on)
+int Canvas::set_fullscreen(int on, int unlock)
{
+ int ret = 0;
+ BC_WindowBase *window = get_canvas();
+ if( unlock )
+ window->unlock_window();
if( on && !get_fullscreen() ) {
start_fullscreen();
- return 1;
+ ret = 1;
}
if( !on && get_fullscreen() ) {
stop_fullscreen();
- return 1;
+ ret = 1;
}
- return 0;
+ if( unlock )
+ window->lock_window("Canvas::set_fullscreen");
+ return ret;
}
void Canvas::start_fullscreen()
{
- set_fullscreen(1);
+ is_fullscreen = 1;
create_canvas();
}
void Canvas::stop_fullscreen()
{
- set_fullscreen(0);
+ is_fullscreen = 0;
create_canvas();
}
}
-
int Canvas::cursor_leave_event_base(BC_WindowBase *caller)
{
int result = 0;
int Canvas::keypress_event(BC_WindowBase *caller)
{
int key = caller->get_keypress();
+ int on = -1;
switch( key ) {
case 'f':
- caller->unlock_window();
- use_fullscreen(get_fullscreen() ? 0 : 1);
- caller->lock_window("Canvas::keypress_event 1");
+ on = get_fullscreen() ? 0 : 1;
break;
case ESC:
- caller->unlock_window();
- use_fullscreen(0);
- caller->lock_window("Canvas::keypress_event 2");
+ on = 0;
break;
default:
return 0;
}
+ if( on >= 0 )
+ set_fullscreen(on);
return 1;
}
{
// It isn't a problem to delete the canvas from in here because the event
// dispatcher is the canvas subwindow.
- canvas->subwindow->unlock_window();
- canvas->use_fullscreen(0);
- canvas->subwindow->lock_window("CanvasSubWindowItem::handle_event");
+ canvas->set_fullscreen(0);
return 1;
}
char* CanvasToggleControls::calculate_text(int cwindow_controls)
{
- if(!cwindow_controls)
- return _("Show controls");
- else
- return _("Hide controls");
+ return !cwindow_controls ? _("Show controls") : _("Hide controls");
}
-
-
-
-
-
CanvasFullScreenItem::CanvasFullScreenItem(Canvas *canvas)
: BC_MenuItem(_("Fullscreen"), "f", 'f')
{
}
int CanvasFullScreenItem::handle_event()
{
- canvas->subwindow->unlock_window();
- canvas->use_fullscreen(1);
- canvas->subwindow->lock_window("CanvasFullScreenItem::handle_event");
+ canvas->set_fullscreen(1);
return 1;
}
-
-
-
-
-
-
-
CanvasPopupRemoveSource::CanvasPopupRemoveSource(Canvas *canvas)
: BC_MenuItem(_("Close source"))
{
virtual void toggle_controls() {}
virtual int get_cwindow_controls() { return 0; }
virtual int get_fullscreen();
- virtual void set_fullscreen(int value);
virtual int get_clear_color();
- virtual int use_fullscreen(int on);
+ virtual int set_fullscreen(int on, int unlock=1);
int cursor_leave_event_base(BC_WindowBase *caller);
int cursor_enter_event_base(BC_WindowBase *caller);
case 'e':
break;
case 'f': {
- Canvas *canvas = mwindow_gui->mwindow->cwindow->gui->canvas;
- canvas->use_fullscreen(canvas->get_fullscreen() ? 0 : 1);
+ CWindowCanvas *canvas = mwindow_gui->mwindow->cwindow->gui->canvas;
+ int on = canvas->get_fullscreen() ? 0 : 1;
+ canvas->Canvas::set_fullscreen(on, 0);
return 1; }
default:
return -1;
result = 1;
break;
case 'f':
- unlock_window();
- canvas->use_fullscreen(canvas->get_fullscreen() ? 0 : 1);
- lock_window("CWindowGUI::keypress_event 1");
+ canvas->set_fullscreen(canvas->get_fullscreen() ? 0 : 1);
+ result = 1;
+ break;
+ case ESC:
+ canvas->set_fullscreen(0);
result = 1;
break;
case 'x':
lock_window("CWindowGUI::keypress_event 3");
result = 1;
break;
- case ESC:
- unlock_window();
- canvas->use_fullscreen(0);
- lock_window("CWindowGUI::keypress_event 4");
- result = 1;
- break;
case LEFT:
if( !ctrl_down() ) {
int alt_down = this->alt_down();
{
this->mwindow = mwindow;
this->gui = gui;
+ last_xscroll = 0;
+ last_yscroll = 0;
+ last_zoom = 0;
}
void CWindowCanvas::status_event()
mwindow->edl->session->cwindow_scrollbars = use_scrollbars;
}
-int CWindowCanvas::use_fullscreen(int on)
+int CWindowCanvas::set_fullscreen(int on)
{
- if( Canvas::use_fullscreen(on) ) {
- gui->lock_window("CWindowCanvas::use_fullscreen");
+ int ret = 0;
+ if( on && !get_fullscreen() ) {
+ last_xscroll = get_xscroll();
+ last_yscroll = get_yscroll();
+ last_zoom = get_zoom();
+ Canvas::set_fullscreen(1);
zoom_auto();
- if( !on ) gui->zoom_panel->update(0);
- gui->unlock_window();
+ ret = 1;
}
- return 1;
+ if( !on && get_fullscreen() ) {
+ Canvas::set_fullscreen(0);
+ gui->zoom_panel->update(get_zoom());
+ update_zoom(last_xscroll, last_yscroll, last_zoom);
+ gui->update_canvas();
+ ret = 1;
+ }
+ return ret;
}
int CWindowCanvas::get_xscroll()
void reset_camera();
void reset_projector();
void draw_crophandle(int x, int y);
- int use_fullscreen(int on);
- void start_fullscreen();
- void stop_fullscreen();
+ int set_fullscreen(int on);
// Draw the camera/projector overlay in different colors.
void draw_outlines(int do_camera);
MWindow *mwindow;
CWindowGUI *gui;
+ float last_xscroll, last_yscroll;
+ float last_zoom;
};
#endif
: Canvas(gui->dwindow->mwindow, gui, x, y, w, h, w, h, 0)
{
this->gui = gui;
- this->is_fullscreen = 0;
}
DbWindowCanvas::
{
public:
DbWindowGUI *gui;
- int is_fullscreen;
DbWindowCanvas(DbWindowGUI *gui, int x, int y, int w, int h);
~DbWindowCanvas();
void draw_frame(VFrame *frame, int x, int y, int w, int h);
int button_press_event() { return 0; }
int keypress_event() { return 0; }
- int get_fullscreen() { return is_fullscreen; }
- void set_fullscreen(int value) { is_fullscreen = value; }
};
class DbWindowVIcon : public VIcon
channel_down();
break;
case 'f': {
- Canvas *canvas = record_monitor->window->canvas;
- canvas->use_fullscreen(canvas->get_fullscreen() ? 0 : 1);
+ RecordMonitorCanvas *canvas = record_monitor->window->canvas;
+ int on = canvas->get_fullscreen() ? 0 : 1;
+ canvas->Canvas::set_fullscreen(on, 0);
break; }
default:
return -1;
return 1;
}
+int RecordMonitorCanvas::keypress_event(RecordMonitorGUI *window)
+{
+ return Canvas::keypress_event(window);
+}
+
RecordMonitorFullsize::RecordMonitorFullsize(MWindow *mwindow,
RecordMonitorGUI *window)
void enable_signal_status(int enable);
MeterPanel *meters;
- Canvas *canvas;
+ RecordMonitorCanvas *canvas;
// RecordTransport *record_transport;
#ifdef HAVE_FIREWIRE
AVC1394Transport *avc1394_transport;
int cursor_enter_event();
void reset_translation();
int keypress_event();
+ int keypress_event(RecordMonitorGUI *window);
int get_output_w();
int get_output_h();
input_position = 0;
}
+/* This algorithm from:
+ * SIGNAL PROCESSING ALGORITHMS IN FORTRAN AND C
+ * S.D. Stearns and R.A. David, Prentice-Hall, 1992 */
void Resample::blackman(double fcn, int filter_l)
{
double wcn = M_PI * fcn;
#define REPOMAINTXT "git://git.cinelerra-gg.org/goodguy/cinelerra.git\n"
#define COPYRIGHT_DATE "2019"
#define COPYRIGHTTEXT1 "(c) 2006-2019 Heroine Virtual Ltd. by Adam Williams\n"
-#define COPYRIGHTTEXT2 "(c) 2007-2019 cin5 derivative by W.P. Morrow aka goodguy\n"
+#define COPYRIGHTTEXT2 "2007-2020 mods for Cinelerra-GG by W.P.Morrow aka goodguy\n"
#undef COMPILEDATE
#endif
mwindow->redo_entry(this);
break;
case 'f':
- unlock_window();
- canvas->use_fullscreen(canvas->get_fullscreen() ? 0 : 1);
- lock_window("VWindowGUI::keypress_event 1");
+ canvas->set_fullscreen(canvas->get_fullscreen() ? 0 : 1);
break;
case ESC:
- unlock_window();
- if( canvas->get_fullscreen() )
- canvas->use_fullscreen(0);
- lock_window("VWindowGUI::keypress_event 2");
+ canvas->set_fullscreen(0);
break;
case KEY_F1:
case KEY_F2:
}
}
-int VWindowCanvas::use_fullscreen(int on)
-{
- if( Canvas::use_fullscreen(on) ) {
- gui->lock_window("VWindowCanvas::use_fullscreen");
- zoom_auto();
- draw_refresh(1);
- gui->unlock_window();
- }
- return 1;
-}
-
void draw_overlays();
void close_source();
void zoom_auto();
- int use_fullscreen(int on);
MWindow *mwindow;
VWindowGUI *gui;
close_event();
return 1;
}
- unlock_window();
int result = 1;
switch( key ) {
case 'f':
- canvas->use_fullscreen(canvas->get_fullscreen() ? 0 : 1);
+ canvas->set_fullscreen(canvas->get_fullscreen() ? 0 : 1);
break;
case ESC:
- canvas->use_fullscreen(0);
+ canvas->set_fullscreen(0);
break;
default:
+ unlock_window();
mwindow->gui->lock_window("ZWindowGUI::keypress_event");
result = mwindow->gui->mbuttons->transport->do_keypress(key);
mwindow->gui->unlock_window();
+ lock_window("ZWindowGUI::keypress_event 1");
}
- lock_window("ZWindowGUI::keypress_event 1");
return result;
}
Cakewalk and Neophyte themes by Olaf Wolff (CC BY 4.0,
https://creativecommons.org/licenses/by/4.0/)
.
+November 2019 New Features of note:
+ Audio improvements added for playback/speed/sampling.
+ Spanish po and website translations updated by Sergio.
+ Transcode 1:1 added to convert to a different format.
+ Compositor zoom using the wheel & panning is available.
October 2019 New Features of note:
Scaling for any size monitor now available in Preferences.
New Shape Wipe video transitions have been contributed.