Added clipboard code back (has issues)
This commit is contained in:
parent
3df74095a3
commit
fb3b13d303
22 changed files with 181 additions and 53 deletions
|
|
@ -28,6 +28,10 @@ bool DrawingProgramLayerManager::is_a_layer_being_edited() {
|
|||
return !editingLayer.expired();
|
||||
}
|
||||
|
||||
uint32_t DrawingProgramLayerManager::edited_layer_component_count() {
|
||||
return editingLayer.lock()->get_layer().components->size();
|
||||
}
|
||||
|
||||
void DrawingProgramLayerManager::draw(SkCanvas* canvas, const DrawData& drawData) {
|
||||
if(layerTreeRoot)
|
||||
layerTreeRoot->draw(canvas, drawData);
|
||||
|
|
@ -39,6 +43,12 @@ std::vector<CanvasComponentContainer::ObjInfoSharedPtr> DrawingProgramLayerManag
|
|||
return toRet;
|
||||
}
|
||||
|
||||
std::vector<DrawingProgramLayerListItem*> DrawingProgramLayerManager::get_flattened_layer_list() {
|
||||
std::vector<DrawingProgramLayerListItem*> toRet;
|
||||
layerTreeRoot->get_flattened_layer_list(toRet);
|
||||
return toRet;
|
||||
}
|
||||
|
||||
bool DrawingProgramLayerManager::layer_tree_root_exists() {
|
||||
return layerTreeRoot;
|
||||
}
|
||||
|
|
@ -66,3 +76,17 @@ bool DrawingProgramLayerManager::component_passes_layer_selector(const CanvasCom
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<CanvasComponentContainer::ObjInfoSharedPtr> DrawingProgramLayerManager::add_many_components_to_layer_being_edited(const std::vector<std::pair<uint32_t, CanvasComponentContainer*>>& newObjs) {
|
||||
auto editLayerPtr = editingLayer.lock();
|
||||
if(!editLayerPtr)
|
||||
return {};
|
||||
return editLayerPtr->get_layer().components->insert_ordered_list_and_send_create(editLayerPtr->get_layer().components, newObjs);
|
||||
}
|
||||
|
||||
CanvasComponentContainer::ObjInfoSharedPtr DrawingProgramLayerManager::add_component_to_layer_being_edited(CanvasComponentContainer* newObj) {
|
||||
auto editLayerPtr = editingLayer.lock();
|
||||
if(!editLayerPtr)
|
||||
return nullptr;
|
||||
return editLayerPtr->get_layer().components->push_back_and_send_create(editLayerPtr->get_layer().components, newObj);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue