X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fmotion%2Fmotionwindow.C;h=b8930e206f813f612a4292e9244c3cea9dfb1db5;hb=47462c7a88ed4f844fa4eaf32a84533aa847b7d5;hp=289db8348a64eb148a3fd46dcf860300f4112a42;hpb=5a1b2bb96f2bd6b7ef4f8031763683726c02219d;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/motion/motionwindow.C b/cinelerra-5.1/plugins/motion/motionwindow.C index 289db834..b8930e20 100644 --- a/cinelerra-5.1/plugins/motion/motionwindow.C +++ b/cinelerra-5.1/plugins/motion/motionwindow.C @@ -21,22 +21,18 @@ #include "bcdisplayinfo.h" #include "clip.h" +#include "edl.h" +#include "fonts.h" +#include "edlsession.h" #include "language.h" #include "motion.h" #include "motionscan.h" #include "motionwindow.h" - - - - - - - - - +#include "mwindow.h" +#include "pluginserver.h" MotionWindow::MotionWindow(MotionMain *plugin) - : PluginClientWindow(plugin, 600, 650, 600, 650, 0) + : PluginClientWindow(plugin, 800, 640, 800, 640, 0) { this->plugin = plugin; } @@ -47,54 +43,38 @@ MotionWindow::~MotionWindow() void MotionWindow::create_objects() { - int x1 = 10, x = 10, y = 10; - int x2 = 310; + int x = 10, y = 10; + int x1 = x, x2 = get_w() / 2; BC_Title *title; - - -// add_subwindow(global = new MotionGlobal(plugin, -// this, -// x1, -// y)); - - add_subwindow(rotate = new MotionRotate(plugin, - this, - x2, - y)); + add_subwindow(global = new MotionGlobal(plugin, this, x1, y)); + add_subwindow(rotate = new MotionRotate(plugin, this, x2, y)); y += 50; - add_subwindow(title = new BC_Title(x1, - y, + add_subwindow(title = new BC_Title(x1, y, _("Translation search radius:\n(W/H Percent of image)"))); add_subwindow(global_range_w = new GlobalRange(plugin, - x1 + title->get_w() + 10, - y, + x1 + title->get_w() + 10, y, &plugin->config.global_range_w)); add_subwindow(global_range_h = new GlobalRange(plugin, - x1 + title->get_w() + 10 + global_range_w->get_w(), - y, + x1 + title->get_w() + 10 + global_range_w->get_w(), y, &plugin->config.global_range_h)); - add_subwindow(title = new BC_Title(x2, - y, + add_subwindow(title = new BC_Title(x2, y, _("Rotation search radius:\n(Degrees)"))); add_subwindow(rotation_range = new RotationRange(plugin, - x2 + title->get_w() + 10, - y)); + x2 + title->get_w() + 10, y)); y += 50; - add_subwindow(title = new BC_Title(x1, - y, + add_subwindow(title = new BC_Title(x1, y, _("Translation block size:\n(W/H Percent of image)"))); - add_subwindow(global_block_w = new BlockSize(plugin, - x1 + title->get_w() + 10, - y, + add_subwindow(global_block_w = + new BlockSize(plugin, x1 + title->get_w() + 10, y, &plugin->config.global_block_w)); - add_subwindow(global_block_h = new BlockSize(plugin, - x1 + title->get_w() + 10 + global_block_w->get_w(), - y, - &plugin->config.global_block_h)); + add_subwindow(global_block_h = + new BlockSize(plugin, x1 + title->get_w() + 10 + + global_block_w->get_w(), y, + &plugin->config.global_block_h)); // add_subwindow(title = new BC_Title(x2, // y, @@ -108,20 +88,16 @@ void MotionWindow::create_objects() // y, // &plugin->config.rotation_block_h)); -// y += 50; -// add_subwindow(title = new BC_Title(x1, y, _("Translation search steps:"))); -// add_subwindow(global_search_positions = new GlobalSearchPositions(plugin, -// x1 + title->get_w() + 10, -// y, -// 80)); -// global_search_positions->create_objects(); -// -// add_subwindow(title = new BC_Title(x2, y, _("Rotation search steps:"))); -// add_subwindow(rotation_search_positions = new RotationSearchPositions(plugin, -// x2 + title->get_w() + 10, -// y, -// 80)); -// rotation_search_positions->create_objects(); + y += 50; + add_subwindow(title = new BC_Title(x1, y, _("Translation search steps:"))); + add_subwindow(global_search_positions = + new GlobalSearchPositions(plugin, x1 + title->get_w() + 10, y, 80)); + global_search_positions->create_objects(); + + add_subwindow(title = new BC_Title(x2, y, _("Rotation search steps:"))); + add_subwindow(rotation_search_positions = + new RotationSearchPositions(plugin, x2 + title->get_w() + 10, y, 80)); + rotation_search_positions->create_objects(); y += 50; add_subwindow(title = new BC_Title(x, y, _("Translation direction:"))); @@ -132,49 +108,42 @@ void MotionWindow::create_objects() track_direction->create_objects(); y += 40; + add_subwindow(title = new BC_Title(x2, y, _("Tracking file:"))); + add_subwindow(tracking_file = new MotionTrackingFile(plugin, + plugin->config.tracking_file, this, x2+title->get_w() + 20, y)); + + int y1 = y; add_subwindow(title = new BC_Title(x, y + 10, _("Block X:"))); - add_subwindow(block_x = new MotionBlockX(plugin, - this, - x + title->get_w() + 10, - y)); - add_subwindow(block_x_text = new MotionBlockXText(plugin, - this, - x + title->get_w() + 10 + block_x->get_w() + 10, - y + 10)); + add_subwindow(block_x = + new MotionBlockX(plugin, this, x + title->get_w() + 10, y)); + add_subwindow(block_x_text = + new MotionBlockXText(plugin, this, + x + title->get_w() + 10 + block_x->get_w() + 10, y + 10)); + y += 40; add_subwindow(title = new BC_Title(x2, y, _("Rotation center:"))); - add_subwindow(rotation_center = new RotationCenter(plugin, - x2 + title->get_w() + 10, - y)); - - + add_subwindow(rotation_center = + new RotationCenter(plugin, x2 + title->get_w() + 10, y)); - int y1 = y; - y += 50; + y += 40; add_subwindow(title = new BC_Title(x2, y + 10, _("Maximum angle offset:"))); - add_subwindow(rotate_magnitude = new MotionRMagnitude(plugin, - x2 + title->get_w() + 10, - y)); + add_subwindow(rotate_magnitude = + new MotionRMagnitude(plugin, x2 + title->get_w() + 10, y)); y += 40; add_subwindow(title = new BC_Title(x2, y + 10, _("Rotation settling speed:"))); - add_subwindow(rotate_return_speed = new MotionRReturnSpeed(plugin, - x2 + title->get_w() + 10, - y)); - - - - y = y1; + add_subwindow(rotate_return_speed = + new MotionRReturnSpeed(plugin, x2 + title->get_w() + 10, y)); y += 40; + add_subwindow(vectors = new MotionDrawVectors(plugin, this, x2, y)); + + y = y1 + 60; add_subwindow(title = new BC_Title(x, y + 10, _("Block Y:"))); - add_subwindow(block_y = new MotionBlockY(plugin, - this, - x + title->get_w() + 10, - y)); - add_subwindow(block_y_text = new MotionBlockYText(plugin, - this, - x + title->get_w() + 10 + block_y->get_w() + 10, - y + 10)); + add_subwindow(block_y = + new MotionBlockY(plugin, this, x + title->get_w() + 10, y)); + add_subwindow(block_y_text = + new MotionBlockYText(plugin, this, + x + title->get_w() + 10 + block_y->get_w() + 10, y + 10)); y += 50; add_subwindow(title = new BC_Title(x, y + 10, _("Maximum absolute offset:"))); @@ -184,115 +153,93 @@ void MotionWindow::create_objects() y += 40; add_subwindow(title = new BC_Title(x, y + 10, _("Motion settling speed:"))); - add_subwindow(return_speed = new MotionReturnSpeed(plugin, - x + title->get_w() + 10, - y)); - - + add_subwindow(return_speed = + new MotionReturnSpeed(plugin, x + title->get_w() + 10, y)); y += 40; - add_subwindow(vectors = new MotionDrawVectors(plugin, - this, - x, - y)); - - - y += 40; - add_subwindow(track_single = new TrackSingleFrame(plugin, - this, - x, - y)); - add_subwindow(title = new BC_Title(x + track_single->get_w() + 20, - y, - _("Frame number:"))); - add_subwindow(track_frame_number = new TrackFrameNumber(plugin, - this, - x + track_single->get_w() + title->get_w() + 20, - y)); - + add_subwindow(track_single = + new TrackSingleFrame(plugin, this, x, y)); y += 20; - add_subwindow(track_previous = new TrackPreviousFrame(plugin, - this, - x, - y)); - + add_subwindow(track_previous = + new TrackPreviousFrame(plugin, this, x, y)); y += 20; - add_subwindow(previous_same = new PreviousFrameSameBlock(plugin, - this, - x, - y)); + add_subwindow(previous_same = + new PreviousFrameSameBlock(plugin, this, x, y)); y += 40; - y1 = y; + x1 = x; y1 = y; + add_subwindow(title = + new BC_Title(x1=x2, y1, _("Frame number:"))); + add_subwindow(track_frame_number = + new TrackFrameNumber(plugin, this, x1 += title->get_w(), y1)); + if(plugin->config.tracking_object != MotionScan::TRACK_SINGLE) + track_frame_number->disable(); + + add_subwindow(addtrackedframeoffset = + new AddTrackedFrameOffset(plugin, this, x1=x2, y1+=track_frame_number->get_h())); + int pef = client->server->mwindow->edl->session->video_every_frame; + add_subwindow(pef_title = new BC_Title(x1=x2+50, y1+=addtrackedframeoffset->get_h() + 5, + !pef ? _("For best results\n" + " Set: Play every frame\n" + " Preferences-> Playback-> Video Out") : + _("Currently using: Play every frame"), MEDIUMFONT, + !pef ? RED : GREEN)); + add_subwindow(title = new BC_Title(x, y, _("Master layer:"))); add_subwindow(master_layer = new MasterLayer(plugin, - this, - x + title->get_w() + 10, - y)); + this, x + title->get_w() + 10, y)); master_layer->create_objects(); y += 30; - add_subwindow(title = new BC_Title(x, y, _("Action:"))); add_subwindow(action_type = new ActionType(plugin, - this, - x + title->get_w() + 10, - y)); + this, x + title->get_w() + 10, y)); action_type->create_objects(); y += 30; - - - add_subwindow(title = new BC_Title(x, y, _("Calculation:"))); add_subwindow(tracking_type = new TrackingType(plugin, - this, - x + title->get_w() + 10, - y)); + this, x + title->get_w() + 10, y)); tracking_type->create_objects(); - - show_window(1); } void MotionWindow::update_mode() { global_range_w->update(plugin->config.global_range_w, - MIN_RADIUS, - MAX_RADIUS); + MIN_RADIUS, MAX_RADIUS); global_range_h->update(plugin->config.global_range_h, - MIN_RADIUS, - MAX_RADIUS); + MIN_RADIUS, MAX_RADIUS); rotation_range->update(plugin->config.rotation_range, - MIN_ROTATION, - MAX_ROTATION); + MIN_ROTATION, MAX_ROTATION); vectors->update(plugin->config.draw_vectors); -// global->update(plugin->config.global); + tracking_file->update(plugin->config.tracking_file); + global->update(plugin->config.global); rotate->update(plugin->config.rotate); + addtrackedframeoffset->update(plugin->config.addtrackedframeoffset); } +MotionTrackingFile::MotionTrackingFile(MotionMain *plugin, + const char *filename, MotionWindow *gui, int x, int y) + : BC_TextBox(x, y, 150, 1, filename) +{ + this->plugin = plugin; + this->gui = gui; +}; - - - - - - - - - +int MotionTrackingFile::handle_event() +{ + strcpy(plugin->config.tracking_file, get_text()); + plugin->send_configure_change(); + return 1; +} GlobalRange::GlobalRange(MotionMain *plugin, - int x, - int y, - int *value) - : BC_IPot(x, - y, - (int64_t)*value, - (int64_t)MIN_RADIUS, - (int64_t)MAX_RADIUS) + int x, int y, int *value) + : BC_IPot(x, y, (int64_t)*value, + (int64_t)MIN_RADIUS, (int64_t)MAX_RADIUS) { this->plugin = plugin; this->value = value; @@ -309,14 +256,9 @@ int GlobalRange::handle_event() -RotationRange::RotationRange(MotionMain *plugin, - int x, - int y) - : BC_IPot(x, - y, - (int64_t)plugin->config.rotation_range, - (int64_t)MIN_ROTATION, - (int64_t)MAX_ROTATION) +RotationRange::RotationRange(MotionMain *plugin, int x, int y) + : BC_IPot(x, y, (int64_t)plugin->config.rotation_range, + (int64_t)MIN_ROTATION, (int64_t)MAX_ROTATION) { this->plugin = plugin; } @@ -330,16 +272,9 @@ int RotationRange::handle_event() } - - -RotationCenter::RotationCenter(MotionMain *plugin, - int x, - int y) - : BC_IPot(x, - y, - (int64_t)plugin->config.rotation_center, - (int64_t)-MAX_ROTATION, - (int64_t)MAX_ROTATION) +RotationCenter::RotationCenter(MotionMain *plugin, int x, int y) + : BC_IPot(x, y, (int64_t)plugin->config.rotation_center, + (int64_t)-MAX_ROTATION, (int64_t)MAX_ROTATION) { this->plugin = plugin; } @@ -353,10 +288,6 @@ int RotationCenter::handle_event() } - - - - BlockSize::BlockSize(MotionMain *plugin, int x, int y, @@ -380,108 +311,69 @@ int BlockSize::handle_event() } +GlobalSearchPositions::GlobalSearchPositions(MotionMain *plugin, + int x, int y, int w) + : BC_PopupMenu(x, y, w, "", 1) +{ + this->plugin = plugin; +} +void GlobalSearchPositions::create_objects() +{ + add_item(new BC_MenuItem("16")); + add_item(new BC_MenuItem("32")); + add_item(new BC_MenuItem("64")); + add_item(new BC_MenuItem("128")); + add_item(new BC_MenuItem("256")); + add_item(new BC_MenuItem("512")); + add_item(new BC_MenuItem("1024")); + add_item(new BC_MenuItem("2048")); + add_item(new BC_MenuItem("4096")); + add_item(new BC_MenuItem("8192")); + add_item(new BC_MenuItem("16384")); + add_item(new BC_MenuItem("32768")); + add_item(new BC_MenuItem("65536")); + add_item(new BC_MenuItem("131072")); + char string[BCTEXTLEN]; + sprintf(string, "%d", plugin->config.global_positions); + set_text(string); +} + +int GlobalSearchPositions::handle_event() +{ + plugin->config.global_positions = atoi(get_text()); + plugin->send_configure_change(); + return 1; +} +RotationSearchPositions::RotationSearchPositions(MotionMain *plugin, + int x, int y, int w) + : BC_PopupMenu(x, y, w, "", 1) +{ + this->plugin = plugin; +} +void RotationSearchPositions::create_objects() +{ + add_item(new BC_MenuItem("4")); + add_item(new BC_MenuItem("8")); + add_item(new BC_MenuItem("16")); + add_item(new BC_MenuItem("32")); + char string[BCTEXTLEN]; + sprintf(string, "%d", plugin->config.rotate_positions); + set_text(string); +} +int RotationSearchPositions::handle_event() +{ + plugin->config.rotate_positions = atoi(get_text()); + plugin->send_configure_change(); + return 1; +} - - - - - - -// GlobalSearchPositions::GlobalSearchPositions(MotionMain *plugin, -// int x, -// int y, -// int w) -// : BC_PopupMenu(x, -// y, -// w, -// "", -// 1) -// { -// this->plugin = plugin; -// } -// void GlobalSearchPositions::create_objects() -// { -// add_item(new BC_MenuItem("16")); -// add_item(new BC_MenuItem("32")); -// add_item(new BC_MenuItem("64")); -// add_item(new BC_MenuItem("128")); -// add_item(new BC_MenuItem("256")); -// add_item(new BC_MenuItem("512")); -// add_item(new BC_MenuItem("1024")); -// add_item(new BC_MenuItem("2048")); -// add_item(new BC_MenuItem("4096")); -// add_item(new BC_MenuItem("8192")); -// add_item(new BC_MenuItem("16384")); -// add_item(new BC_MenuItem("32768")); -// add_item(new BC_MenuItem("65536")); -// add_item(new BC_MenuItem("131072")); -// char string[BCTEXTLEN]; -// sprintf(string, "%d", plugin->config.global_positions); -// set_text(string); -// } -// -// int GlobalSearchPositions::handle_event() -// { -// plugin->config.global_positions = atoi(get_text()); -// plugin->send_configure_change(); -// return 1; -// } -// -// -// -// -// -// -// -// RotationSearchPositions::RotationSearchPositions(MotionMain *plugin, -// int x, -// int y, -// int w) -// : BC_PopupMenu(x, -// y, -// w, -// "", -// 1) -// { -// this->plugin = plugin; -// } -// void RotationSearchPositions::create_objects() -// { -// add_item(new BC_MenuItem("4")); -// add_item(new BC_MenuItem("8")); -// add_item(new BC_MenuItem("16")); -// add_item(new BC_MenuItem("32")); -// char string[BCTEXTLEN]; -// sprintf(string, "%d", plugin->config.rotate_positions); -// set_text(string); -// } -// -// int RotationSearchPositions::handle_event() -// { -// plugin->config.rotate_positions = atoi(get_text()); -// plugin->send_configure_change(); -// return 1; -// } - - - - - - - - -MotionMagnitude::MotionMagnitude(MotionMain *plugin, - int x, - int y) - : BC_IPot(x, - y, - (int64_t)plugin->config.magnitude, - (int64_t)0, - (int64_t)100) +MotionMagnitude::MotionMagnitude(MotionMain *plugin, int x, int y) + : BC_IPot(x, y, + (int64_t)plugin->config.magnitude, (int64_t)0, (int64_t)100) { this->plugin = plugin; } @@ -494,14 +386,9 @@ int MotionMagnitude::handle_event() } -MotionReturnSpeed::MotionReturnSpeed(MotionMain *plugin, - int x, - int y) - : BC_IPot(x, - y, - (int64_t)plugin->config.return_speed, - (int64_t)0, - (int64_t)100) +MotionReturnSpeed::MotionReturnSpeed(MotionMain *plugin, int x, int y) + : BC_IPot(x, y, + (int64_t)plugin->config.return_speed, (int64_t)0, (int64_t)100) { this->plugin = plugin; } @@ -515,14 +402,26 @@ int MotionReturnSpeed::handle_event() -MotionRMagnitude::MotionRMagnitude(MotionMain *plugin, - int x, - int y) - : BC_IPot(x, - y, - (int64_t)plugin->config.rotate_magnitude, - (int64_t)0, - (int64_t)90) +AddTrackedFrameOffset::AddTrackedFrameOffset(MotionMain *plugin, + MotionWindow *gui, int x, int y) + : BC_CheckBox(x, y, plugin->config.addtrackedframeoffset, + _("Add (loaded) offset from tracked frame")) +{ + this->plugin = plugin; + this->gui = gui; +} + +int AddTrackedFrameOffset::handle_event() +{ + plugin->config.addtrackedframeoffset = get_value(); + plugin->send_configure_change(); + return 1; +} + + +MotionRMagnitude::MotionRMagnitude(MotionMain *plugin, int x, int y) + : BC_IPot(x, y, + (int64_t)plugin->config.rotate_magnitude, (int64_t)0, (int64_t)90) { this->plugin = plugin; } @@ -536,14 +435,9 @@ int MotionRMagnitude::handle_event() -MotionRReturnSpeed::MotionRReturnSpeed(MotionMain *plugin, - int x, - int y) - : BC_IPot(x, - y, - (int64_t)plugin->config.rotate_return_speed, - (int64_t)0, - (int64_t)100) +MotionRReturnSpeed::MotionRReturnSpeed(MotionMain *plugin, int x, int y) + : BC_IPot(x, y, + (int64_t)plugin->config.rotate_return_speed, (int64_t)0, (int64_t)100) { this->plugin = plugin; } @@ -556,37 +450,24 @@ int MotionRReturnSpeed::handle_event() } +MotionGlobal::MotionGlobal(MotionMain *plugin, + MotionWindow *gui, int x, int y) + : BC_CheckBox(x, y, plugin->config.global, _("Track translation")) +{ + this->plugin = plugin; + this->gui = gui; +} - - -// MotionGlobal::MotionGlobal(MotionMain *plugin, -// MotionWindow *gui, -// int x, -// int y) -// : BC_CheckBox(x, -// y, -// plugin->config.global, -// _("Track translation")) -// { -// this->plugin = plugin; -// this->gui = gui; -// } -// -// int MotionGlobal::handle_event() -// { -// plugin->config.global = get_value(); -// plugin->send_configure_change(); -// return 1; -// } +int MotionGlobal::handle_event() +{ + plugin->config.global = get_value(); + plugin->send_configure_change(); + return 1; +} MotionRotate::MotionRotate(MotionMain *plugin, - MotionWindow *gui, - int x, - int y) - : BC_CheckBox(x, - y, - plugin->config.rotate, - _("Track rotation")) + MotionWindow *gui, int x, int y) + : BC_CheckBox(x, y, plugin->config.rotate, _("Track rotation")) { this->plugin = plugin; this->gui = gui; @@ -600,18 +481,9 @@ int MotionRotate::handle_event() } - - - MotionBlockX::MotionBlockX(MotionMain *plugin, - MotionWindow *gui, - int x, - int y) - : BC_FPot(x, - y, - plugin->config.block_x, - (float)0, - (float)100) + MotionWindow *gui, int x, int y) + : BC_FPot(x, y, plugin->config.block_x, (float)0, (float)100) { this->plugin = plugin; this->gui = gui; @@ -626,8 +498,6 @@ int MotionBlockX::handle_event() } - - MotionBlockY::MotionBlockY(MotionMain *plugin, MotionWindow *gui, int x, @@ -651,14 +521,8 @@ int MotionBlockY::handle_event() } MotionBlockXText::MotionBlockXText(MotionMain *plugin, - MotionWindow *gui, - int x, - int y) - : BC_TextBox(x, - y, - 75, - 1, - (float)plugin->config.block_x) + MotionWindow *gui, int x, int y) + : BC_TextBox(x, y, 75, 1, (float)plugin->config.block_x) { this->plugin = plugin; this->gui = gui; @@ -677,14 +541,8 @@ int MotionBlockXText::handle_event() MotionBlockYText::MotionBlockYText(MotionMain *plugin, - MotionWindow *gui, - int x, - int y) - : BC_TextBox(x, - y, - 75, - 1, - (float)plugin->config.block_y) + MotionWindow *gui, int x, int y) + : BC_TextBox(x, y, 75, 1, (float)plugin->config.block_y) { this->plugin = plugin; this->gui = gui; @@ -700,24 +558,8 @@ int MotionBlockYText::handle_event() } - - - - - - - - - - - - - - MotionDrawVectors::MotionDrawVectors(MotionMain *plugin, - MotionWindow *gui, - int x, - int y) + MotionWindow *gui, int x, int y) : BC_CheckBox(x, y, plugin->config.draw_vectors, @@ -735,12 +577,6 @@ int MotionDrawVectors::handle_event() } - - - - - - TrackSingleFrame::TrackSingleFrame(MotionMain *plugin, MotionWindow *gui, int x, @@ -764,13 +600,6 @@ int TrackSingleFrame::handle_event() return 1; } - - - - - - - TrackFrameNumber::TrackFrameNumber(MotionMain *plugin, MotionWindow *gui, int x, @@ -779,7 +608,6 @@ TrackFrameNumber::TrackFrameNumber(MotionMain *plugin, { this->plugin = plugin; this->gui = gui; - if(plugin->config.tracking_object != MotionScan::TRACK_SINGLE) disable(); } int TrackFrameNumber::handle_event() @@ -790,11 +618,6 @@ int TrackFrameNumber::handle_event() } - - - - - TrackPreviousFrame::TrackPreviousFrame(MotionMain *plugin, MotionWindow *gui, int x, @@ -818,12 +641,6 @@ int TrackPreviousFrame::handle_event() } - - - - - - PreviousFrameSameBlock::PreviousFrameSameBlock(MotionMain *plugin, MotionWindow *gui, int x, @@ -847,12 +664,6 @@ int PreviousFrameSameBlock::handle_event() } - - - - - - MasterLayer::MasterLayer(MotionMain *plugin, MotionWindow *gui, int x, int y) : BC_PopupMenu(x, y, @@ -896,12 +707,6 @@ int MasterLayer::calculate_w(MotionWindow *gui) } - - - - - - ActionType::ActionType(MotionMain *plugin, MotionWindow *gui, int x, int y) : BC_PopupMenu(x, y, @@ -968,9 +773,6 @@ int ActionType::calculate_w(MotionWindow *gui) } - - - TrackingType::TrackingType(MotionMain *plugin, MotionWindow *gui, int x, int y) : BC_PopupMenu(x, y, @@ -990,16 +792,16 @@ int TrackingType::handle_event() void TrackingType::create_objects() { - add_item(new BC_MenuItem(to_text(MotionScan::NO_CALCULATE))); - add_item(new BC_MenuItem(to_text(MotionScan::CALCULATE))); add_item(new BC_MenuItem(to_text(MotionScan::SAVE))); add_item(new BC_MenuItem(to_text(MotionScan::LOAD))); + add_item(new BC_MenuItem(to_text(MotionScan::CALCULATE))); + add_item(new BC_MenuItem(to_text(MotionScan::NO_CALCULATE))); } int TrackingType::from_text(char *text) { - if(!strcmp(text, _("Save coords to /tmp"))) return MotionScan::SAVE; - if(!strcmp(text, _("Load coords from /tmp"))) return MotionScan::LOAD; + if(!strcmp(text, _("Save coords to tracking file"))) return MotionScan::SAVE; + if(!strcmp(text, _("Load coords from tracking file"))) return MotionScan::LOAD; if(!strcmp(text, _("Recalculate"))) return MotionScan::CALCULATE; //if(!strcmp(text, _("Don't Calculate"))) return MotionScan::NO_CALCULATE; return MotionScan::NO_CALCULATE; @@ -1009,15 +811,11 @@ char* TrackingType::to_text(int mode) { switch(mode) { - case MotionScan::SAVE: - return _("Save coords to /tmp"); - case MotionScan::LOAD: - return _("Load coords from /tmp"); - case MotionScan::CALCULATE: - return _("Recalculate"); + case MotionScan::SAVE: return _("Save coords to tracking file"); + case MotionScan::LOAD: return _("Load coords from tracking file"); + case MotionScan::CALCULATE: return _("Recalculate"); default: - case MotionScan::NO_CALCULATE: - return _("Don't Calculate"); + case MotionScan::NO_CALCULATE: return _("Don't Calculate"); } } @@ -1032,14 +830,6 @@ int TrackingType::calculate_w(MotionWindow *gui) } - - - - - - - - TrackDirection::TrackDirection(MotionMain *plugin, MotionWindow *gui, int x, int y) : BC_PopupMenu(x, y,