This means that you can integrate a DrawBot-view inside your dialogs and tools. Or add an interface around your DrawBot scripts.

fromdrawBotimport*fromdrawBot.ui.drawViewimportDrawViewfromvanillaimport*classDrawBotViewer(object):def__init__(self):# create a windowself.w=Window((400,400),minSize=(200,200))# add a sliderself.w.slider=Slider((10,10,-10,22),callback=self.sliderCallback)# add a canvasself.w.drawBotCanvas=DrawView((0,30,-0,-0))# draw somethingself.drawIt()# open the windowself.w.open()defsliderCallback(self,sender):# slider chagned so redraw itself.drawIt()defdrawIt(self):# get the value from the slidervalue=self.w.slider.get()print(value)# initiate a new drawingnewDrawing()# add a pagenewPage(300,300)# set a fillfill(1,value/100.,0)# draw a rectanglerect(10,10,100,100)# set a font sizefontSize(48+value)# draw some texttext("Hello",(10,120))# get the pdf documentpdfData=pdfImage()# set the pdf document into the canvasself.w.drawBotCanvas.setPDFDocument(pdfData)DrawBotViewer()