def destroy(self): for menu in self.menus: menu.destroy() del menu self.menus = None self.hitList = None Window.destroy(self)
def __init__(self, title): Window.__init__(self, 0,0,100,100, topmost = 1) self.menuTitle = title self.width = self.minWidth self.items = [] self.active = None self.subActive = None self.setShow(0)
def __init__(self, xoffset, yoffset, width, height, objectHandle, viewHandle, nodeName = None): Window.__init__(self, 0, 0, width, height) #controllerHandle = getRenderer().attachController(objectHandle, pyui2.locals.CONTROLLER_2DWINDOW, nodeName) #getRenderer().setController(controllerHandle, window = self.handle, offset = (xoffset, yoffset), view = viewHandle) self.viewHandle = viewHandle self.objectHandle = objectHandle self.controllerHandle = controllerHandle self.nodeName = nodeName self.xoffset = xoffset self.yoffset = yoffset
def __init__(self): w = getDesktop().width font = getTheme().getAggProperty(("MENU","font")) if font == None: font = getTheme().getProperty("DEFAULT FONT") (width, height) = font.getTextSize("Wp") Window.__init__(self, 0,0, w, height * 1.3, topmost = 1) self.setShow(1) self.menus = [] self.hitList = [] self.active = None self.highlight = None self.registerEvent(pyui2.locals.LMOUSEBUTTONDOWN, self._pyui2MouseDown) self.registerEvent(pyui2.locals.LMOUSEBUTTONUP, self._pyui2MouseUp) self.registerEvent(pyui2.locals.MOUSEMOVE, self._pyui2MouseMotion) self.registerEvent(pyui2.locals.MENU_EXIT, self._pyui2MenuExit)
def __init__(self, x, y, w, h, title, flags = None): self.hitList = [] self.theme = getTheme() self._menuBar = None self._captionBar = None self.innerRect = (0,0,w,h) self.captionBar = True self.frameResizing = True self.topmost = 0 self.borderless = False self.moveable = True self.parseFlags(flags) self.title = "" Window.__init__(self, x, y, w, h, self.topmost) self.setTitle(title) if self.captionBar == True: #print "Setting caption bar:", title self.setCaptionBar(CaptionBar(title)) self.resize(w, h) self.registerEvent(pyui2.locals.LMOUSEBUTTONDOWN, self._pyui2MouseDown) self.registerEvent(pyui2.locals.LMOUSEBUTTONUP, self._pyui2MouseUp) self.registerEvent(pyui2.locals.MOUSEMOVE, self._pyui2MouseMotion) self.moving = 0 self.resizing = 0 self.startX = 0 self.startY = 0 self.resizingCursor=0 self.movingCursor=0 self.backImage=None self.calcInnerRect() self.placeInnerObjects()
def destroy(self): #getRenderer().detachController(self.objectHandle, self.controllerHandle) self.controllerHandle = None Window.destroy(self)
def __init__(self, x, y, w, h): Window.__init__(self, x, y, w, h, 1)#, "tooltip") self.setLayout(pyui2.layouts.BorderLayoutManager()) self.text = "" self.setShow(0)
def addChild(self, child, option = None): Window.addChild(self, child, option)
def replacePanel(self, panel): Window.replacePanel(self, panel) self.calcInnerRect() self.placeInnerObjects()