本文整理汇总了Python中efl.elementary.entry.Entry.selection_copy方法的典型用法代码示例。如果您正苦于以下问题:Python Entry.selection_copy方法的具体用法?Python Entry.selection_copy怎么用?Python Entry.selection_copy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.entry.Entry
的用法示例。
在下文中一共展示了Entry.selection_copy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Interface
# 需要导入模块: from efl.elementary.entry import Entry [as 别名]
# 或者: from efl.elementary.entry.Entry import selection_copy [as 别名]
#.........这里部分代码省略.........
# the flip object has the file selector on one side and the GUI on the other
self.flip = Flip(self.mainWindow, size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
self.flip.part_content_set("front", self.mainBox)
self.flip.part_content_set("back", self.fileBox)
self.mainWindow.resize_object_add(self.flip)
self.flip.show()
self.isSaved = True
self.isNewFile = False
self.confirmPopup = None
def newPress( self, obj, it ):
self.newFile()
it.selected_set(False)
def openPress( self, obj, it ):
self.openFile()
it.selected_set(False)
def savePress( self, obj, it ):
self.saveFile()
it.selected_set(False)
def saveAsPress( self, obj, it ):
self.saveAs()
it.selected_set(False)
def optionsPress( self, obj, it ):
it.selected_set(False)
def copyPress( self, obj, it ):
self.mainEn.selection_copy()
it.selected_set(False)
def pastePress( self, obj, it ):
self.mainEn.selection_paste()
it.selected_set(False)
def cutPress( self, obj, it ):
self.mainEn.selection_cut()
it.selected_set(False)
def selectAllPress( self, obj, it ):
self.mainEn.select_all()
it.selected_set(False)
def textEdited( self, obj ):
ourFile = self.mainEn.file_get()[0]
if ourFile and not self.isNewFile:
self.mainWindow.title_set("*%s - ePad"%self.mainEn.file_get()[0].split("/")[len(self.mainEn.file_get()[0].split("/"))-1])
else:
self.mainWindow.title_set("*Untitlted - ePad")
self.isSaved = False
def fileSelected( self, fs, file_selected, onStartup=False ):
if not onStartup:
self.flip.go(ELM_FLIP_INTERACTION_ROTATE)
print(file_selected)
IsSave = fs.is_save_get()
if file_selected:
if IsSave:
newfile = open(file_selected,'w') # creates new file
tmp_text = self.mainEn.entry_get()
newfile.write(tmp_text)