LoopPlayback::LoopPlayback(MWindow *mwindow) : BC_MenuItem(_("Loop Playback"), "Shift+L", 'L') { this->mwindow = mwindow; set_checked(mwindow->edl->local_session->loop_playback); set_shift(); }
void InputEventWithModifiers::set_modifiers_from_event(const InputEventWithModifiers *event) { set_alt(event->get_alt()); set_shift(event->get_shift()); set_control(event->get_control()); set_metakey(event->get_metakey()); }
RegistrationResult::RegistrationResult() { ccc_ = 0.0; name_ = ""; image_index_ = 0; projection_index_ = 0; set_shift(algebra::Vector2D(0., 0.)); set_rotation(0, 0, 0); }
PreferencesMenuitem::PreferencesMenuitem(MWindow *mwindow) : BC_MenuItem(_("Preferences..."), "Shift+P", 'P') { this->mwindow = mwindow; set_shift(1); thread = new PreferencesThread(mwindow); }
RegistrationResult::RegistrationResult(double phi, double theta, double psi, algebra::Vector2D shift, int projection_index, int image_index, String name) { set_rotation(phi, theta, psi); set_shift(shift); projection_index_ = projection_index; image_index_ = image_index; name_ = name; }
RegistrationResult::RegistrationResult(algebra::Rotation3D R, algebra::Vector2D shift, int projection_index, int image_index, String name) { ccc_ = 0.0; set_rotation(R); set_shift(shift); projection_index_ = projection_index; image_index_ = image_index; name_ = name; }
CreateDVD_MenuItem::CreateDVD_MenuItem(MWindow *mwindow) : BC_MenuItem(_("DVD Render..."), "Shift-D", 'D') { set_shift(1); this->mwindow = mwindow; }
MoveTracksDown::MoveTracksDown(MWindow *mwindow) : BC_MenuItem(_("Move tracks down"), "Shift+Down", DOWN) { set_shift(); this->mwindow = mwindow; }
MoveTracksUp::MoveTracksUp(MWindow *mwindow) : BC_MenuItem(_("Move tracks up"), "Shift+Up", UP) { set_shift(); this->mwindow = mwindow; }
DefaultVTransition::DefaultVTransition(MWindow *mwindow) : BC_MenuItem(_("Default Transition"), "Shift-U", 'U') { set_shift(); this->mwindow = mwindow; }
AddVideoTrack::AddVideoTrack(MWindow *mwindow) : BC_MenuItem(_("Add track"), "Shift-T", 'T') { set_shift(); this->mwindow = mwindow; }
PasteSilence::PasteSilence(MWindow *mwindow) : BC_MenuItem(_("Paste silence"), "Shift+Space", ' ') { this->mwindow = mwindow; set_shift(); }
void Extension::check_type() { switch (ext.type) { case MIXT_DEVROOT: set_type("MIXT_DEVROOT"); break; case MIXT_SLIDER: set_shift(0); set_value_mask(~0); set_type("MIXT_SLIDER"); break; case MIXT_STEREOSLIDER: set_shift(8); set_value_mask(0xff); set_type("MIXT_STEREOSLIDER"); break; case MIXT_STEREOSLIDER16: set_shift(16); set_value_mask(0xffff); set_type("MIXT_STEREOSLIDER16"); break; case MIXT_MONOSLIDER: set_shift(0); set_value_mask(0xff); set_type("MIXT_MONOSLIDER"); break; case MIXT_MONOSLIDER16: set_shift(0); set_value_mask(0xffff); set_type("MIXT_MONOSLIDER16"); break; case MIXT_MONOPEAK: set_shift(0); set_value_mask(0xff); set_type("MIXT_MONOPEAK"); break; case MIXT_STEREOPEAK: set_shift(8); set_value_mask(0xff); set_type("MIXT_STEREOPEAK"); break; case MIXT_GROUP: set_type("MIXT_GROUP"); break; case MIXT_RADIOGROUP: set_type("MIXT_RADIOGROUP"); break; case MIXT_ONOFF: set_type("MIXT_ONOFF"); break; case MIXT_MUTE: set_type("MIXT_MUTE"); break; case MIXT_ENUM: set_type("MIXT_ENUM"); break; case MIXT_HEXVALUE: set_type("MIXT_HEXVALUE"); break; case MIXT_MESSAGE: set_type("MIXT_MESSAGE"); break; default: break; } }
/* if not, set *psp to the first character beyond the number and return 1. */ int scan_number(register const byte *sp, const byte *end, int sign, ref *pref, const byte **psp) { /* Powers of 10 up to 6 can be represented accurately as */ /* a single-precision float. */ #define num_powers_10 6 static const float powers_10[num_powers_10+1] = { 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6 }; static const double neg_powers_10[num_powers_10+1] = { 1e0, 1e-1, 1e-2, 1e-3, 1e-4, 1e-5, 1e-6 }; int ival; long lval; double dval; int exp10; int code = 0; register int c, d; register const byte _ds *decoder = scan_char_decoder; ngetc(c, sp, return_error(e_syntaxerror)); #define would_overflow(val, d, maxv)\ (val >= maxv / 10 && (val > maxv / 10 || d > (int)(maxv % 10))) if ( !is_digit(d, c) ) { if ( c != '.' ) return_error(e_syntaxerror); /* Might be a number starting with '.'. */ ngetc(c, sp, return_error(e_syntaxerror)); if ( !is_digit(d, c) ) return_error(e_syntaxerror); ival = 0; goto i2r; } /* Accumulate an integer in ival. */ /* Do up to 4 digits without a loop, */ /* since we know this can't overflow and since */ /* most numbers have 4 (integer) digits or fewer. */ ival = d; if ( end - sp >= 3 ) /* just check once */ { if ( !is_digit(d, (c = *sp)) ) { sp++; goto ind; } ival = ival * 10 + d; if ( !is_digit(d, (c = sp[1])) ) { sp += 2; goto ind; } ival = ival * 10 + d; sp += 3; if ( !is_digit(d, (c = sp[-1])) ) goto ind; ival = ival * 10 + d; } for ( ; ; ival = ival * 10 + d ) { ngetc(c, sp, goto iret); if ( !is_digit(d, c) ) break; if ( would_overflow(ival, d, max_int) ) goto i2l; } ind: switch ( c ) { case '.': ngetc(c, sp, c = EOFC); goto i2r; default: *psp = sp; code = 1; break; case 'e': case 'E': if ( sign < 0 ) ival = -ival; dval = ival; exp10 = 0; goto fe; case '#': { ulong uval = 0, lmax; #define radix (uint)ival if ( sign || radix < min_radix || radix > max_radix ) return_error(e_syntaxerror); /* Avoid multiplies for power-of-2 radix. */ if ( !(radix & (radix - 1)) ) { int shift; switch ( radix ) { #define set_shift(n)\ shift = n; lmax = max_ulong >> n case 2: set_shift(1); break; case 4: set_shift(2); break; case 8: set_shift(3); break; case 16: set_shift(4); break; case 32: set_shift(5); break; #undef set_shift default: /* can't happen */ return_error(e_rangecheck); } for ( ; ; uval = (uval << shift) + d ) { ngetc(c, sp, break); d = decoder[c]; if ( d >= radix ) { *psp = sp; code = 1; break; } if ( uval > lmax ) return_error(e_limitcheck); } } else { int lrem = max_ulong % radix; lmax = max_ulong / radix; for ( ; ; uval = uval * radix + d ) { ngetc(c, sp, break); d = decoder[c]; if ( d >= radix ) { *psp = sp; code = 1; break; } if ( uval >= lmax && (uval > lmax || d > lrem) ) return_error(e_limitcheck); } } #undef radix make_int_new(pref, uval); return code; }
RenderItem::RenderItem(MWindow *mwindow) : BC_MenuItem(_("Render..."), "Shift+R", 'R') { this->mwindow = mwindow; set_shift(1); }
CutKeyframes::CutKeyframes(MWindow *mwindow) : BC_MenuItem(_("Cut keyframes"), "Shift-X", 'X') { set_shift(); this->mwindow = mwindow; }
Redo::Redo(MWindow *mwindow) : BC_MenuItem(_("Redo"), "Shift+Z", 'Z') { set_shift(1); this->mwindow = mwindow; }
ConcatenateTracks::ConcatenateTracks(MWindow *mwindow) : BC_MenuItem(_("Concatenate tracks")) { set_shift(); this->mwindow = mwindow; }
ExportEDLItem::ExportEDLItem(MWindow *mwindow) : BC_MenuItem(_("Export EDL..."), "Shift+E", 'E') { this->mwindow = mwindow; set_shift(1); }
BatchRenderMenuItem::BatchRenderMenuItem(MWindow *mwindow) : BC_MenuItem(_("Batch Render..."), "Shift-B", 'B') { set_shift(1); this->mwindow = mwindow; }
CopyKeyframes::CopyKeyframes(MWindow *mwindow) : BC_MenuItem(_("Copy keyframes"), "Shift-C", 'C') { set_shift(); this->mwindow = mwindow; }
ClearKeyframes::ClearKeyframes(MWindow *mwindow) : BC_MenuItem(_("Clear keyframes"), "Shift-Del", DELETE) { set_shift(); this->mwindow = mwindow; }
PasteKeyframes::PasteKeyframes(MWindow *mwindow) : BC_MenuItem(_("Paste keyframes"), "Shift-V", 'V') { set_shift(); this->mwindow = mwindow; }
inline void pulse_shift() { set_shift(0); set_shift(1); }