Gtk::Table options_table;
Gtk::Entry entry_id;
Gtk::CheckButton checkbutton_layer_region;
- Gtk::CheckButton checkbutton_layer_bline;
+ Gtk::CheckButton checkbutton_layer_outline;
Gtk::CheckButton checkbutton_layer_curve_gradient;
Gtk::CheckButton checkbutton_layer_plant;
Gtk::CheckButton checkbutton_layer_link_offsets;
int layers_to_create()const
{
return
- get_layer_region_flag()+
- get_layer_bline_flag()+
+ get_layer_region_flag() +
+ get_layer_outline_flag() +
get_layer_curve_gradient_flag() +
get_layer_plant_flag();
}
bool get_layer_region_flag()const { return checkbutton_layer_region.get_active(); }
void set_layer_region_flag(bool x) { return checkbutton_layer_region.set_active(x); }
- bool get_layer_bline_flag()const { return checkbutton_layer_bline.get_active(); }
- void set_layer_bline_flag(bool x) { return checkbutton_layer_bline.set_active(x); }
+ bool get_layer_outline_flag()const { return checkbutton_layer_outline.get_active(); }
+ void set_layer_outline_flag(bool x) { return checkbutton_layer_outline.set_active(x); }
bool get_layer_curve_gradient_flag()const { return checkbutton_layer_curve_gradient.get_active(); }
void set_layer_curve_gradient_flag(bool x) { return checkbutton_layer_curve_gradient.set_active(x); }
else
set_layer_region_flag(true);
- if(settings.get_value("bline.layer_bline",value) && value=="0")
- set_layer_bline_flag(false);
+ if(settings.get_value("bline.layer_outline",value) && value=="0")
+ set_layer_outline_flag(false);
else
- set_layer_bline_flag(true);
+ set_layer_outline_flag(true);
if(settings.get_value("bline.layer_curve_gradient",value) && value=="1")
set_layer_curve_gradient_flag(true);
StateBLine_Context::save_settings()
{
sanity_check();
- settings.set_value("bline.layer_bline",get_layer_bline_flag()?"1":"0");
+ settings.set_value("bline.layer_outline",get_layer_outline_flag()?"1":"0");
settings.set_value("bline.layer_region",get_layer_region_flag()?"1":"0");
settings.set_value("bline.layer_curve_gradient",get_layer_curve_gradient_flag()?"1":"0");
settings.set_value("bline.layer_plant",get_layer_plant_flag()?"1":"0");
settings(synfigapp::Main::get_selected_input_device()->settings()),
entry_id(),
checkbutton_layer_region(_("Fill")),
- checkbutton_layer_bline(_("Outline")),
+ checkbutton_layer_outline(_("Outline")),
checkbutton_layer_curve_gradient(_("Gradient")),
checkbutton_layer_plant(_("Plant")),
checkbutton_layer_link_offsets(_("Link Offsets")),
// Set up the tool options dialog
//options_table.attach(*manage(new Gtk::Label(_("BLine Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
options_table.attach(entry_id, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- options_table.attach(checkbutton_layer_region, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- options_table.attach(checkbutton_layer_bline, 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- options_table.attach(checkbutton_layer_curve_gradient, 0, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
- options_table.attach(checkbutton_layer_plant, 0, 2, 5, 6, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ options_table.attach(checkbutton_layer_outline, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ options_table.attach(checkbutton_layer_region, 0, 2, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ options_table.attach(checkbutton_layer_plant, 0, 2, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
+ options_table.attach(checkbutton_layer_curve_gradient, 0, 2, 5, 6, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
options_table.attach(checkbutton_layer_link_offsets, 0, 2, 6, 7, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
options_table.attach(checkbutton_auto_export, 0, 2, 7, 8, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
options_table.attach(*manage(new Gtk::Label(_("Feather"))), 0, 1, 10, 11, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);
synfigapp::SelectionManager::LayerList layer_selection;
///////////////////////////////////////////////////////////////////////////
- // R E G I O N
+ // C U R V E G R A D I E N T
///////////////////////////////////////////////////////////////////////////
- if(get_layer_region_flag())
+ if(get_layer_curve_gradient_flag())
{
synfigapp::PushMode push_mode(get_canvas_interface(),synfigapp::MODE_NORMAL);
- Layer::Handle layer(get_canvas_interface()->add_layer_to("region",canvas,depth));
+ Layer::Handle layer(get_canvas_interface()->add_layer_to("curve_gradient",canvas,depth));
assert(layer);
layer_selection.push_back(layer);
- layer->set_description(get_id()+_(" Region"));
+ layer->set_description(get_id()+_(" Gradient"));
get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description());
- if(get_feather())
- {
- layer->set_param("feather",get_feather());
- get_canvas_interface()->signal_layer_param_changed()(layer,"feather");
- }
-
- if(get_layer_bline_flag())
- layer->set_param("color",synfigapp::Main::get_background_color());
-
- // I don't know if it's safe to reuse the same layer_param_connect action, so I'm
- // using 2 separate ones.
{
synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
assert(action);
if(!get_canvas_interface()->get_instance()->perform_action(action))
{
- //get_canvas_view()->get_ui_interface()->error(_("Unable to create Region layer"));
+ //get_canvas_view()->get_ui_interface()->error(_("Unable to create BLine layer"));
group.cancel();
- throw String(_("Unable to create Region layer"));
+ throw String(_("Unable to create Gradient layer"));
return false;
}
}
if(!get_canvas_interface()->get_instance()->perform_action(action))
{
- //get_canvas_view()->get_ui_interface()->error(_("Unable to create Region layer"));
+ //get_canvas_view()->get_ui_interface()->error(_("Unable to create BLine layer"));
group.cancel();
- throw String(_("Unable to create Region layer"));
+ throw String(_("Unable to create Gradient layer"));
return false;
}
}
}
///////////////////////////////////////////////////////////////////////////
- // O U T L I N E
+ // P L A N T
///////////////////////////////////////////////////////////////////////////
- if(get_layer_bline_flag())
+ if(get_layer_plant_flag())
{
synfigapp::PushMode push_mode(get_canvas_interface(),synfigapp::MODE_NORMAL);
- Layer::Handle layer(get_canvas_interface()->add_layer_to("outline",canvas,depth));
+ Layer::Handle layer(get_canvas_interface()->add_layer_to("plant",canvas,depth));
assert(layer);
layer_selection.push_back(layer);
- layer->set_description(get_id()+_(" Outline"));
+ layer->set_description(get_id()+_(" Plant"));
get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description());
- if(get_feather())
- {
- layer->set_param("feather",get_feather());
- get_canvas_interface()->signal_layer_param_changed()(layer,"feather");
- }
{
synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
{
//get_canvas_view()->get_ui_interface()->error(_("Unable to create BLine layer"));
group.cancel();
- throw String(_("Unable to create Outline layer"));
+ throw String(_("Unable to create Plant layer"));
return false;
}
}
+ // plants don't have offsets?
if (get_layer_link_offsets_flag())
{
synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
{
//get_canvas_view()->get_ui_interface()->error(_("Unable to create BLine layer"));
group.cancel();
- throw String(_("Unable to create Outline layer"));
+ throw String(_("Unable to create Plant layer"));
return false;
}
}
}
///////////////////////////////////////////////////////////////////////////
- // C U R V E G R A D I E N T
+ // R E G I O N
///////////////////////////////////////////////////////////////////////////
- if(get_layer_curve_gradient_flag())
+ if(get_layer_region_flag())
{
synfigapp::PushMode push_mode(get_canvas_interface(),synfigapp::MODE_NORMAL);
- Layer::Handle layer(get_canvas_interface()->add_layer_to("curve_gradient",canvas,depth));
+ Layer::Handle layer(get_canvas_interface()->add_layer_to("region",canvas,depth));
assert(layer);
layer_selection.push_back(layer);
- layer->set_description(get_id()+_(" Gradient"));
+ layer->set_description(get_id()+_(" Region"));
get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description());
+ if(get_feather())
+ {
+ layer->set_param("feather",get_feather());
+ get_canvas_interface()->signal_layer_param_changed()(layer,"feather");
+ }
+
+ if(get_layer_outline_flag())
+ layer->set_param("color",synfigapp::Main::get_background_color());
+
+ // I don't know if it's safe to reuse the same layer_param_connect action, so I'm
+ // using 2 separate ones.
{
synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
assert(action);
if(!get_canvas_interface()->get_instance()->perform_action(action))
{
- //get_canvas_view()->get_ui_interface()->error(_("Unable to create BLine layer"));
+ //get_canvas_view()->get_ui_interface()->error(_("Unable to create Region layer"));
group.cancel();
- throw String(_("Unable to create Gradient layer"));
+ throw String(_("Unable to create Region layer"));
return false;
}
}
if(!get_canvas_interface()->get_instance()->perform_action(action))
{
- //get_canvas_view()->get_ui_interface()->error(_("Unable to create BLine layer"));
+ //get_canvas_view()->get_ui_interface()->error(_("Unable to create Region layer"));
group.cancel();
- throw String(_("Unable to create Gradient layer"));
+ throw String(_("Unable to create Region layer"));
return false;
}
}
}
///////////////////////////////////////////////////////////////////////////
- // P L A N T
+ // O U T L I N E
///////////////////////////////////////////////////////////////////////////
- if(get_layer_plant_flag())
+ if(get_layer_outline_flag())
{
synfigapp::PushMode push_mode(get_canvas_interface(),synfigapp::MODE_NORMAL);
- Layer::Handle layer(get_canvas_interface()->add_layer_to("plant",canvas,depth));
+ Layer::Handle layer(get_canvas_interface()->add_layer_to("outline",canvas,depth));
assert(layer);
layer_selection.push_back(layer);
- layer->set_description(get_id()+_(" Plant"));
+ layer->set_description(get_id()+_(" Outline"));
get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description());
+ if(get_feather())
+ {
+ layer->set_param("feather",get_feather());
+ get_canvas_interface()->signal_layer_param_changed()(layer,"feather");
+ }
{
synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
{
//get_canvas_view()->get_ui_interface()->error(_("Unable to create BLine layer"));
group.cancel();
- throw String(_("Unable to create Plant layer"));
+ throw String(_("Unable to create Outline layer"));
return false;
}
}
- // plants don't have offsets?
if (get_layer_link_offsets_flag())
{
synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
{
//get_canvas_view()->get_ui_interface()->error(_("Unable to create BLine layer"));
group.cancel();
- throw String(_("Unable to create Plant layer"));
+ throw String(_("Unable to create Outline layer"));
return false;
}
}