}
+CWindowMaskTrack::CWindowMaskTrack(MWindow *mwindow, CWindowMaskGUI *gui,
+ int x, int y, const char *text)
+ : BC_Title(x, y, text, MEDIUMFONT, get_resources()->button_highlighted)
+{
+ this->mwindow = mwindow;
+ this->gui = gui;
+}
+
+CWindowMaskTrack::~CWindowMaskTrack()
+{
+}
+
CWindowMaskName::CWindowMaskName(MWindow *mwindow, CWindowMaskGUI *gui,
int x, int y, const char *text)
: BC_PopupTextBox(gui, 0, text, x, y, 100, 160)
{
this->mwindow = mwindow;
this->gui = gui;
- set_tooltip("Center for rotate/scale");
+ set_tooltip(_("Center for rotate/scale"));
}
CWindowMaskFocus::~CWindowMaskFocus()
return 1;
}
+CWindowMaskDrawCenter::CWindowMaskDrawCenter(MWindow *mwindow, CWindowToolGUI *gui, int x, int y)
+ : BC_CheckBox(x, y, ((CWindowMaskGUI*)gui)->center_mark, _("Center Mark"))
+{
+ this->mwindow = mwindow;
+ this->gui = gui;
+ set_tooltip(_("show center of mask points"));
+}
+
+CWindowMaskDrawCenter::~CWindowMaskDrawCenter()
+{
+}
+
+int CWindowMaskDrawCenter::handle_event()
+{
+ ((CWindowMaskGUI*)gui)->center_mark = get_value();
+ gui->update();
+ gui->update_preview();
+ return 1;
+}
+
CWindowMaskDrawMarkers::CWindowMaskDrawMarkers(MWindow *mwindow, CWindowToolGUI *gui, int x, int y)
: BC_CheckBox(x, y, ((CWindowMaskGUI*)gui)->markers, _("Markers"))
{
CWindowMaskGUI::CWindowMaskGUI(MWindow *mwindow, CWindowTool *thread)
: CWindowToolGUI(mwindow, thread,
- _(PROGRAM_NAME ": Mask"), 360, 500)
+ _(PROGRAM_NAME ": Mask"), 360, 620)
{
this->mwindow = mwindow;
this->thread = thread;
fade = 0;
feather = 0;
focused = 0;
+ center_mark = 0;
markers = 1;
boundary = 1;
}
// keyframe = (MaskAuto*)mwindow->cwindow->calculate_affected_auto(track->automation->autos[AUTOMATION_MASK], 0);
lock_window("CWindowMaskGUI::create_objects");
+ BC_TitleBar *title_bar;
+ add_subwindow(title_bar = new BC_TitleBar(x, y, get_w()-2*x, 20, 10, _("Masks on Track")));
+ y += title_bar->get_h() + margin;
+ int x1 = x + 70;
+ add_subwindow(mask_track = new CWindowMaskTrack(mwindow, this, x1, y, ""));
+ y += mask_track->get_h() + margin;
+ add_subwindow(title_bar = new BC_TitleBar(x, y, get_w()-2*x, 20, 10, _("Masks")));
+ y += title_bar->get_h() + margin;
BC_Title *title;
add_subwindow(title = new BC_Title(x, y, _("Mask:")));
- int x1 = x + 70;
name = new CWindowMaskName(mwindow, this, x1, y, "");
name->create_objects();
add_subwindow(clr_mask = new CWindowMaskClrMask(mwindow, this, clr_x, y));
mask_blabels[i] = new BC_Title(x2+tx, y, text);
add_subwindow(mask_blabels[i]);
}
- y += bh + 2*margin;
+ y += mask_blabels[0]->get_h() + 2*margin;
+ add_subwindow(title_bar = new BC_TitleBar(x, y, get_w()-2*x, 20, 10, _("Fade & Feather")));
+ y += title_bar->get_h() + margin;
add_subwindow(title = new BC_Title(x, y, _("Fade:")));
fade = new CWindowMaskFade(mwindow, this, x1, y);
feather_slider = new CWindowMaskFeatherSlider(mwindow, this, x2, y, w2, 0);
add_subwindow(feather_slider);
add_subwindow(gang_feather = new CWindowMaskGangFeather(mwindow, this, clr_x, y));
- y += feather->get_h() + 3*margin;
+ y += feather->get_h() + 2*margin;
+ add_subwindow(title_bar = new BC_TitleBar(x, y, get_w()-2*x, 20, 10, _("Mask Points")));
+ y += title_bar->get_h() + margin;
add_subwindow(title = new BC_Title(x, y, _("Point:")));
active_point = new CWindowMaskAffectedPoint(mwindow, this, x1, y);
this->y = new CWindowCoord(this, x1, y, (float)0.0);
this->y->create_objects();
add_subwindow(draw_boundary = new CWindowMaskDrawBoundary(mwindow, this, del_x, y));
- y += this->y->get_h() + margin;
- BC_Bar *bar;
- add_subwindow(bar = new BC_Bar(x, y, get_w()-2*x));
- y += bar->get_h() + margin;
+ y += this->y->get_h() + 2*margin;
+ add_subwindow(title_bar = new BC_TitleBar(x, y, get_w()-2*x, 20, 10, _("Pivot Point")));
+ y += title_bar->get_h() + margin;
add_subwindow(title = new BC_Title(x, y, "X:"));
focus_x = new CWindowCoord(this, x1, y, (float)0.0);
add_subwindow(title = new BC_Title(x, y, "Y:"));
focus_y = new CWindowCoord(this, x1, y, (float)0.0);
focus_y->create_objects();
- y += focus_x->get_h() + margin;
+ add_subwindow(draw_center = new CWindowMaskDrawCenter(mwindow, this, del_x, y));
+ y += focus_x->get_h() + 2*margin;
+ BC_Bar *bar;
+ add_subwindow(bar = new BC_Bar(x, y, get_w()-2*x));
+ y += bar->get_h() + margin;
add_subwindow(this->apply_before_plugins = new CWindowMaskBeforePlugins(this, 10, y));
y += this->apply_before_plugins->get_h();
add_subwindow(this->disable_opengl_masking = new CWindowDisableOpenGLMasking(this, 10, y));
//printf("CWindowMaskGUI::update 1\n");
get_keyframe(track, autos, keyframe, mask, point, 0);
+ mask_track->update(!track ? "" : track->title);
name->update_items(keyframe);
const char *text = "";
int sz = !keyframe ? 0 : keyframe->masks.size();