Lines Matching defs:layer

32 #include "layer-fns.h"
33 #include "layer-manager.h"
204 // Make sure selected layer hasn't changed since the action was triggered
320 void LayersPanel::_updateLayer( SPObject *layer ) {
321 _store->foreach( sigc::bind<SPObject*>(sigc::mem_fun(*this, &LayersPanel::_checkForUpdated), layer) );
324 bool LayersPanel::_checkForUpdated(const Gtk::TreePath &/*path*/, const Gtk::TreeIter& iter, SPObject* layer)
328 if ( layer == row[_model->_colObject] )
331 * We get notified of layer update here (from layer->setLabel()) before layer->label() is set
335 //row[_model->_colLabel] = layer->label() ? layer->label() : layer->getId();
336 gchar const *label = layer->getAttribute("inkscape:label");
337 row[_model->_colLabel] = label ? label : layer->getId();
338 row[_model->_colVisible] = SP_IS_ITEM(layer) ? !SP_ITEM(layer)->isHidden() : false;
339 row[_model->_colLocked] = SP_IS_ITEM(layer) ? SP_ITEM(layer)->isLocked() : false;
347 void LayersPanel::_selectLayer( SPObject *layer ) {
348 if ( !layer || (_desktop && _desktop->doc() && (layer == _desktop->doc()->getRoot())) ) {
353 _store->foreach( sigc::bind<SPObject*>(sigc::mem_fun(*this, &LayersPanel::_checkForSelected), layer) );
359 bool LayersPanel::_checkForSelected(const Gtk::TreePath &path, const Gtk::TreeIter& iter, SPObject* layer)
364 if ( layer == row[_model->_colObject] )
400 void LayersPanel::_addLayer( SPDocument* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level )
402 if ( _desktop && _desktop->layer_manager && layer && (level < _maxNestDepth) ) {
403 unsigned int counter = _desktop->layer_manager->childCount(layer);
405 SPObject *child = _desktop->layer_manager->nthChildOf(layer, i);
408 g_message(" %3d layer:%p {%s} [%s]", level, child, child->getId(), child->label() );
525 newValue? _("Unhide layer") : _("Hide layer"));
536 newValue? _("Lock layer") : _("Unlock layer"));
554 // Edit the layer label
624 DocumentUndo::maybeDone(_desktop->doc(), "layer:solo", SP_VERB_LAYER_SOLO, _("Toggle layer solo"));
627 DocumentUndo::maybeDone(_desktop->doc(), "layer:lockothers", SP_VERB_LAYER_LOCK_OTHERS, _("Lock other layers"));
660 * Save the drag source and drop target SPObjects and if its a drag between layers or into (sublayer) a layer
674 // Are we before, inside or after the drop layer
712 * Move a layer in response to a drag & drop action
730 _("Move layer"));
758 _("Rename layer"));
954 _watchingNonTop.push_back( &_addPopupItem( targetDesktop, SP_VERB_LAYER_RAISE, INKSCAPE_ICON("layer-raise"), "Up", (int)BUTTON_UP ) );
955 _watchingNonBottom.push_back( &_addPopupItem( targetDesktop, SP_VERB_LAYER_LOWER, INKSCAPE_ICON("layer-lower"), "Down", (int)BUTTON_DOWN ) );