ScopeToggle::ScopeToggle(ScopeGUI *gui, int x, int y, int *value) : BC_Toggle(x, y, get_image_set(gui, value), *value) { this->gui = gui; this->value = value; if(value == &gui->use_hist_parade) { set_tooltip("Histogram Parade"); } else if(value == &gui->use_hist) { set_tooltip("Histogram"); } else if(value == &gui->use_wave_parade) { set_tooltip("Waveform Parade"); } else if(value == &gui->use_wave) { set_tooltip("Waveform"); } else { set_tooltip("Vectorscope"); } }
void GLGizmoRotate::on_render(const Selection& selection) const { if (!m_grabbers[0].enabled) return; const BoundingBoxf3& box = selection.get_bounding_box(); std::string axis; switch (m_axis) { case X: { axis = "X"; break; } case Y: { axis = "Y"; break; } case Z: { axis = "Z"; break; } } if (!m_dragging && (m_hover_id == 0)) set_tooltip(axis); else if (m_dragging) set_tooltip(axis + ": " + format((float)Geometry::rad2deg(m_angle), 4) + "\u00B0"); else { m_center = box.center(); m_radius = Offset + box.radius(); m_snap_coarse_in_radius = m_radius / 3.0f; m_snap_coarse_out_radius = 2.0f * m_snap_coarse_in_radius; m_snap_fine_in_radius = m_radius; m_snap_fine_out_radius = m_radius * (1.0f + ScaleLongTooth); } glsafe(::glEnable(GL_DEPTH_TEST)); glsafe(::glPushMatrix()); transform_to_local(selection); glsafe(::glLineWidth((m_hover_id != -1) ? 2.0f : 1.5f)); glsafe(::glColor3fv((m_hover_id != -1) ? m_drag_color : m_highlight_color)); render_circle(); if (m_hover_id != -1) { render_scale(); render_snap_radii(); render_reference_radius(); } glsafe(::glColor3fv(m_highlight_color)); if (m_hover_id != -1) render_angle(); render_grabber(box); render_grabber_extension(box, false); glsafe(::glPopMatrix()); }
BC_FileBoxOK::BC_FileBoxOK(BC_FileBox *filebox) : BC_OKButton(filebox, !filebox->want_directory ? BC_WindowBase::get_resources()->ok_images : BC_WindowBase::get_resources()->filebox_descend_images) { this->filebox = filebox; if(filebox->want_directory) set_tooltip(_("Descend directory")); else set_tooltip(_("Submit the file")); }
void tcontrol::set_members(const string_map& data) { /** @todo document this feature on the wiki. */ /** @todo do we need to add the debug colors here as well? */ string_map::const_iterator itor = data.find("id"); if(itor != data.end()) { set_id(itor->second); } itor = data.find("linked_group"); if(itor != data.end()) { set_linked_group(itor->second); } itor = data.find("label"); if(itor != data.end()) { set_label(itor->second); } itor = data.find("tooltip"); if(itor != data.end()) { set_tooltip(itor->second); } itor = data.find("help"); if(itor != data.end()) { set_help_message(itor->second); } itor = data.find("use_markup"); if(itor != data.end()) { set_use_markup(utils::string_bool(itor->second)); } }
int VFadePatch::handle_event() { if(shift_down()) { update(100); set_tooltip(get_caption()); } patch->change_source = 1; float change = update_edl(); if(patch->track->gang) patch->patchbay->synchronize_faders(change, TRACK_VIDEO, patch->track); patch->change_source = 0; mwindow->gui->unlock_window(); mwindow->restart_brender(); mwindow->sync_parameters(CHANGE_PARAMS); mwindow->gui->lock_window("VFadePatch::handle_event"); if(mwindow->edl->session->auto_conf->autos[AUTOMATION_FADE]) { mwindow->gui->canvas->draw_overlays(); mwindow->gui->canvas->flash(); } return 1; }
RecordGUIActivateBatch::RecordGUIActivateBatch(MWindow *mwindow, Record *record, int x, int y) : BC_GenericButton(x, y, _("Activate")) { this->mwindow = mwindow; this->record = record; set_tooltip(_("Make the highlighted\nclip active.")); }
NewSwapExtents::NewSwapExtents(MWindow *mwindow, NewWindow *gui, int x, int y) : BC_Button(x, y, mwindow->theme->get_image_set("swap_extents")) { this->mwindow = mwindow; this->gui = gui; set_tooltip("Swap dimensions"); }
RecordGUIFillFrames::RecordGUIFillFrames(MWindow *mwindow, Record *record, int x, int y) : BC_CheckBox(x, y, record->fill_frames, _("Fill frames")) { this->mwindow = mwindow; this->record = record; set_tooltip(_("Write extra frames when behind.")); }
BrowseButton::BrowseButton(MWindow *mwindow, BC_WindowBase *parent_window, BC_TextBox *textbox, int x, int y, const char *init_directory, const char *title, const char *caption, int want_directory, const char *recent_prefix) : BC_Button(x, y, mwindow->theme->get_image_set("magnify_button")), Thread(1) { this->parent_window = parent_window; this->want_directory = want_directory; strcpy(this->title, title); this->caption = caption; this->init_directory = init_directory; this->textbox = textbox; this->mwindow = mwindow; this->recent_prefix = recent_prefix; set_tooltip(_("Look for file")); gui = 0; startup_lock = new Mutex("BrowseButton::startup_lock"); }
int BC_Pot::repeat_event(int64_t duration) { if(duration == top_level->get_resources()->tooltip_delay) { if(tooltip_on) { if(keypress_tooltip_timer > 0) { keypress_tooltip_timer -= get_resources()->tooltip_delay; } else if(status != POT_HIGH && status != POT_DN) { hide_tooltip(); } } else if(status == POT_HIGH) { if(use_caption && tooltip_text) { if(!tooltip_text[0] || isdigit(tooltip_text[0])) { set_tooltip(get_caption()); show_tooltip(50); } else show_tooltip(); tooltip_done = 1; } return 1; } } return 0; }
RecordGUIStartOver::RecordGUIStartOver(Record *record, RecordGUI *record_gui, int x, int y) : BC_GenericButton(x, y, _("Start Over")) { set_tooltip(_("Rewind the current file and erase.")); this->record = record; this->gui = record_gui; }
int BC_Pot::cursor_motion_event() { if(top_level->button_down && top_level->event_win == win && status == POT_DN) { float angle = coords_to_angle(get_cursor_x(), get_cursor_y()); if(prev_angle >= 0 && prev_angle < 90 && angle >= 270 && angle < 360) { angle_correction -= 360; } else if(prev_angle >= 270 && prev_angle < 360 && angle >= 0 && angle < 90) { angle_correction += 360; } prev_angle = angle; if(percentage_to_value( angle_to_percentage(angle + angle_correction - angle_offset))) { set_tooltip(get_caption()); draw(1); handle_event(); } return 1; } return 0; }
RecordGUIStartBatches::RecordGUIStartBatches(MWindow *mwindow, Record *record, int x, int y) : BC_GenericButton(x, y, _("Start")) { this->mwindow = mwindow; this->record = record; set_tooltip(_("Start batch recording\nfrom the current position.")); }
RecordGUINewBatch::RecordGUINewBatch(MWindow *mwindow, Record *record, int x, int y) : BC_GenericButton(x, y, _("New")) { this->mwindow = mwindow; this->record = record; set_tooltip(_("Create new clip.")); }
RecordGUIDeleteBatch::RecordGUIDeleteBatch(MWindow *mwindow, Record *record, int x, int y) : BC_GenericButton(x, y, _("Delete")) { this->mwindow = mwindow; this->record = record; set_tooltip(_("Delete clip.")); }
RecordGUIEnd::RecordGUIEnd(MWindow *mwindow, Record *record, int x, int y) : BC_Button(x, y, mwindow->theme->get_image_set("end")) { this->engine = engine; this->record = record; set_tooltip(_("Seek to end of recording")); }
RecordGUIFwd::RecordGUIFwd(MWindow *mwindow, Record *record, int x, int y) : BC_Button(x, y, mwindow->theme->get_image_set("fastfwd")) { this->engine = engine; this->record = record; set_tooltip(_("Fast forward")); }
RecordGUIRec::RecordGUIRec(MWindow *mwindow, Record *record, int x, int y) : BC_Button(x, y, mwindow->theme->get_image_set("record")) { this->mwindow = mwindow; this->record = record; set_tooltip(_("Start interactive recording\nfrom current position")); }
RecordGUICancel::RecordGUICancel(Record *record, RecordGUI *record_gui) : BC_CancelButton(record_gui) { set_tooltip(_("Quit without pasting into project.")); this->record = record; this->gui = record_gui; }
MainFFMpegToggle::MainFFMpegToggle(MWindow *mwindow, MButtons *mbuttons, int x, int y) : BC_Toggle(x - ff_images[0]->get_w(), y, &ff_images[0], mwindow->preferences->ffmpeg_early_probe) { this->mwindow = mwindow; this->mbuttons = mbuttons; set_tooltip("FFMpeg early probe"); }
void NodeUI_Label::set_text(String p_text) { name=p_text; set_tooltip(p_text); check_minimum_size(); update(); }
RecordGUIOK::RecordGUIOK(Record *record, RecordGUI *record_gui) : BC_OKButton(record_gui) { set_tooltip(_("Quit and paste into project.")); this->record = record; this->gui = record_gui; }
BC_FileBoxUseThis::BC_FileBoxUseThis(BC_FileBox *filebox) : BC_Button(filebox->get_w() / 2 - BC_WindowBase::get_resources()->usethis_button_images[0]->get_w() / 2, filebox->ok_button->get_y(), BC_WindowBase::get_resources()->usethis_button_images) { this->filebox = filebox; set_tooltip(_("Submit the directory")); }
void BC_Pot::show_value_tooltip() { if(use_caption) { set_tooltip(get_caption()); show_tooltip(50); keypress_tooltip_timer = 2000; } }
BatchRenderSaveList::BatchRenderSaveList(BatchRenderThread *thread, int x, int y) : BC_GenericButton(x, y, _("Save List")) { this->thread = thread; set_tooltip(_("Save a Batch Render List")); gui = 0; startup_lock = new Mutex("BatchRenderSaveList::startup_lock"); }
RecordGUISave::RecordGUISave(Record *record, RecordGUI *record_gui) : BC_Button(10, record_gui->get_h() - BC_WindowBase::get_resources()->ok_images[0]->get_h() - 10, BC_WindowBase::get_resources()->ok_images) { set_tooltip(_("Save the recording and quit.")); this->record = record; this->gui = record_gui; }
PhotoScaleSwapExtents::PhotoScaleSwapExtents(PhotoScaleMain *plugin, PhotoScaleWindow *gui, int x, int y) : BC_Button(x, y, plugin->get_theme()->get_image_set("swap_extents")) { this->plugin = plugin; this->gui = gui; set_tooltip("Swap dimensions"); }
ResizeTrackSwap::ResizeTrackSwap(ResizeTrackWindow *gui, ResizeTrackThread *thread, int x, int y) : BC_Button(x, y, thread->mwindow->theme->get_image_set("swap_extents")) { this->thread = thread; this->gui = gui; set_tooltip("Swap dimensions"); }
ScopeEnable::ScopeEnable(MWindow *mwindow, RecordMonitor *record_monitor, int x, int y) : BC_Toggle(x, y, mwindow->theme ? mwindow->theme->get_image_set("scope_toggle") : 0, mwindow->session->record_scope) { this->record_monitor = record_monitor; this->mwindow = mwindow; set_tooltip(_("View scope")); }
BatchRenderLoadList::BatchRenderLoadList(BatchRenderThread *thread, int x, int y) : BC_GenericButton(x, y, _("Load List")), Thread() { this->thread = thread; set_tooltip(_("Load a previously saved Batch Render List")); gui = 0; startup_lock = new Mutex("BatchRenderLoadList::startup_lock"); }