19#include <glibmm/i18n.h>
34 if (f(
item, hide_or_lock)) {
106 show_output(
"hide_lock_unhide_below: no selection!");
110 bool changed =
false;
111 for (
auto item : selection->items()) {
129 show_output(
"hide_lock_unhide_below: no selection!");
133 bool changed =
false;
134 for (
auto item : selection->items()) {
152 show_output(
"hide_lock_hide_selected: no selection!");
156 bool changed =
false;
157 for (
auto item : selection->items()) {
176 show_output(
"hide_lock_lock_selected: no selection!");
180 bool changed =
false;
181 for (
auto item : selection->items()) {
194const Glib::ustring
SECTION = NC_(
"Action Section",
"Hide and Lock");
199 {
"app.unhide-all", N_(
"Unhide All"),
SECTION, N_(
"Unhide all objects") },
200 {
"app.unlock-all", N_(
"Unlock All"),
SECTION, N_(
"Unlock all objects") },
202 {
"app.selection-hide", N_(
"Hide selection"),
SECTION, N_(
"Hide all selected objects") },
203 {
"app.selection-unhide", N_(
"Unhide selection"),
SECTION, N_(
"Unhide all selected objects") },
204 {
"app.selection-unhide-below", N_(
"Unhide descendents"),
SECTION, N_(
"Unhide all items inside selected objects") },
206 {
"app.selection-lock", N_(
"Lock selection"),
SECTION, N_(
"Lock all selected objects") },
207 {
"app.selection-unlock", N_(
"Unlock selection"),
SECTION, N_(
"Unlock all selected objects") },
208 {
"app.selection-unlock-below", N_(
"Unlock descendents"),
SECTION, N_(
"Unlock all items inside selected objects") },
void show_output(Glib::ustring const &data, bool const is_cerr)
bool hide_lock_hide(SPItem *item, bool hide)
const Glib::ustring SECTION
void hide_lock_unhide_below(InkscapeApplication *app)
std::vector< std::vector< Glib::ustring > > raw_data_hide_lock
bool hide_lock_lock(SPItem *item, bool lock)
void hide_lock_unlock_all(InkscapeApplication *app)
void hide_lock_lock_selected(InkscapeApplication *app, bool lock)
void hide_lock_hide_selected(InkscapeApplication *app, bool hide)
void hide_lock_unlock_below(InkscapeApplication *app)
static bool hide_lock_recurse(bool(*f)(SPItem *, bool), SPItem *item, bool hide_or_lock)
void add_actions_hide_lock(InkscapeApplication *app)
void hide_lock_unhide_all(InkscapeApplication *app)
Authors: Sushant A A sushant.co19@gmail.com
InkActionExtraData & get_action_extra_data()
Gio::Application * gio_app()
The Gio application instance, never NULL.
SPDocument * get_active_document()
Inkscape::Selection * get_active_selection()
static void done(SPDocument *document, Glib::ustring const &event_description, Glib::ustring const &undo_icon, unsigned int object_modified_tag=0)
SPRoot * getRoot()
Returns our SPRoot.
Base class for visual SVG elements.
void setLocked(bool lock, bool recursive=false)
void setHidden(bool hidden)
TODO: insert short description here.
SPRoot: SVG <svg> implementation.