DEFINE_ACTION("copy", Gtk::StockID("gtk-copy"));
DEFINE_ACTION("paste", Gtk::StockID("gtk-paste"));
DEFINE_ACTION("select-all-ducks", _("Select All Ducks"));
+ DEFINE_ACTION("unselect-all-ducks", _("Unselect All Ducks"));
+ DEFINE_ACTION("select-all-layers", _("Select All Layers"));
DEFINE_ACTION("unselect-all-layers", _("Unselect All Layers"));
DEFINE_ACTION("properties", _("Properties"));
" <menuitem action='copy'/>"
" <menuitem action='paste'/>"
" <separator name='bleh06'/>"
-" <menuitem action='select-all-ducks'/>"
+" <menuitem action='select-all-layers'/>"
" <menuitem action='unselect-all-layers'/>"
+" <menuitem action='select-all-ducks'/>"
+" <menuitem action='unselect-all-ducks'/>"
" <separator name='bleh07'/>"
" <menuitem action='properties'/>"
" </menu>"
}
ACCEL("<Actions>//select-all-ducks","<Control>a");
- ACCEL("<Actions>//unselect-all-layers","<Control>d");
+ ACCEL("<Actions>//unselect-all-ducks","<Control>d");
+ ACCEL("<Actions>//select-all-layers","<Control><Shift>a");
+ ACCEL("<Actions>//unselect-all-layers","<Control><Shift>d");
ACCEL("<Actions>//render","F9");
ACCEL("<Actions>//preview","F11");
ACCEL("<Actions>//properties","F8");
sigc::mem_fun(*work_area,&studio::WorkArea::select_all_ducks)
);
+ action_group->add( Gtk::Action::create("unselect-all-ducks", _("Unselect All Ducks")),
+ sigc::mem_fun(*work_area,&studio::WorkArea::unselect_all_ducks)
+ );
+
+ action_group->add( Gtk::Action::create("select-all-layers", _("Select All Layers")),
+ sigc::mem_fun(*this,&CanvasView::on_select_layers)
+ );
+
action_group->add( Gtk::Action::create("unselect-all-layers", _("Unselect All Layers")),
sigc::mem_fun(*this,&CanvasView::on_unselect_layers)
);
// editmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-paste"),NOT_IMPLEMENTED_SLOT));
// editmenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem());
// editmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Select All Ducks"),Gtk::AccelKey('E',Gdk::CONTROL_MASK),sigc::mem_fun(*work_area,&studio::WorkArea::select_all_ducks)));
+// editmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Unselect All Ducks"),Gtk::AccelKey('E',Gdk::CONTROL_MASK),sigc::mem_fun(*work_area,&studio::WorkArea::unselect_all_ducks)));
+// editmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Select All Layers"),Gtk::AccelKey('A',Gdk::CONTROL_MASK),sigc::mem_fun(*this,&CanvasView::on_select_layers)));
// editmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Unselect All Layers"),Gtk::AccelKey('D',Gdk::CONTROL_MASK),sigc::mem_fun(*this,&CanvasView::on_unselect_layers)));
// editmenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem());
//
}
void
+CanvasView::on_select_layers()
+{
+ Canvas::Handle canvas(get_canvas());
+ for (CanvasBase::iterator iter = canvas->begin(); iter != canvas->end(); iter++)
+ layer_tree->select_all_children_layers(*iter);
+}
+
+void
CanvasView::on_unselect_layers()
{
layer_tree->clear_selected_layers();
private:
+ void on_select_layers();
void on_unselect_layers();
void on_input_device_changed(GdkDevice*);
}
void
+Duckmatic::unselect_all_ducks()
+{
+ DuckMap::const_iterator iter;
+ for(iter=duck_map.begin();iter!=duck_map.end();++iter)
+ unselect_duck(iter->second);
+}
+
+void
Duckmatic::toggle_select_ducks_in_box(const synfig::Vector& tl,const synfig::Vector& br)
{
Vector vmin, vmax;
Type get_type_mask()const { return type_mask; }
void select_all_ducks();
+ void unselect_all_ducks();
void clear_ducks();