Пример #1
0
 def insertImageTag(self, parentWindow, imageContext):
     u"""insertImageTag(wxWindow, IZXHTMLEditControlImageContext) -> void
     Shows the Image dialog to allow user to enter img src attrs.
     """ #$NON-NLS-1$
     model = ZEditImageModel(None)
     dialog = ZImageDialog(parentWindow, model)
     dialog.CentreOnParent()
     if dialog.ShowModal() == wx.ID_OK:
         attrs = model.getImageAttributes()
         imageContext.setImageAttributes(attrs)
     dialog.Destroy()
Пример #2
0
 def editImage(self, parentWindow, imageContext):
     u"""editImage(wxWindow, IZXHTMLImageControlLinkContext) -> void
     Shows the create and edit image dialog.
     """ #$NON-NLS-1$
     model = ZEditImageModel(imageContext.getImageAttributes())
     dialog = ZImageDialog(parentWindow, model)
     dialog.CentreOnParent()
     if dialog.ShowModal() == wx.ID_OK:
         attrs = model.getImageAttributes()
         imageContext.setImageAttributes(attrs)
     dialog.Destroy()