easymacro/source/easymacro/easydraw.py

31 lines
669 B
Python
Raw Normal View History

2022-08-18 22:42:32 -05:00
#!/usr/bin/env python3
from .easydoc import LODrawImpress
2023-04-23 11:08:19 -06:00
from .easydrawpage import LODrawPage
2023-12-29 16:36:40 -06:00
from .easymain import LOMain
2022-08-18 22:42:32 -05:00
class LODraw(LODrawImpress):
_type = 'draw'
def __init__(self, obj):
super().__init__(obj)
2023-04-23 11:08:19 -06:00
def __getitem__(self, index):
if isinstance(index, int):
page = self.obj.DrawPages[index]
else:
page = self.obj.DrawPages.getByName(index)
return LODrawPage(page)
2023-12-29 16:36:40 -06:00
@property
def active(self):
"""Get active page"""
return LODrawPage(self._cc.CurrentPage)
def paste(self):
"""Paste"""
LOMain.dispatch(self.frame, 'Paste')
return