MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / addLayer

Method addLayer

Source/UIComponents/CtrlrPanel/CtrlrPanelCanvasLayers.cpp:198–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void CtrlrPanelCanvas::addLayer(const ValueTree &layerTree)
199{
200 CtrlrPanelCanvasLayer *l = new CtrlrPanelCanvasLayer(*this);
201 l->addMouseListener (this, true);
202 l->addKeyListener (this);
203 l->setWantsKeyboardFocus (true);
204 l->setBounds (getBounds());
205 layers.add (l);
206 addAndMakeVisible (l);
207
208 if (layerTree.isValid())
209 {
210 l->restoreState (layerTree);
211 }
212 else
213 {
214 l->setProperty (Ids::uiPanelCanvasLayerIndex, layers.indexOf(l));
215 }
216}
217
218void CtrlrPanelCanvas::moveLayer(CtrlrPanelCanvasLayer *layerToMove, const bool moveUp)
219{

Callers

nothing calls this directly

Calls 9

addKeyListenerMethod · 0.80
setWantsKeyboardFocusMethod · 0.80
getBoundsFunction · 0.50
setBoundsMethod · 0.45
addMethod · 0.45
isValidMethod · 0.45
restoreStateMethod · 0.45
setPropertyMethod · 0.45
indexOfMethod · 0.45

Tested by

no test coverage detected