Esempio n. 1
0
    def __init__(self, parent=None):
        Canvas.__init__(self, parent)
        PopupBase.__init__(self)
        CaptureObject.__init__(self)

        self.visible = False
        self.minSize = 100, 50  # minimal dialog size

        # margin
        self.__lm = 0  # left margin
        self.__tm = 0  # top margin
        self.__rm = 0  # right margin
        self.__bm = 0  # bottom margin

        # border
        '''
        self.border = '3,3,3,3'
        self.bind('Capture Begin', self.onSizeStart)
        self.bind('Capture Offset', self.onSizeMove)
        self.bind('Mouse Enter', self.onChangeCursor, True)
        self.bind('Mouse Leave', self.onChangeCursor, False)
        '''
        # sizer in right bottom
        self.sizable = False
        self.changeEvent('sizable', self.onSizableChange, postevent=False)

        # command routing
        self.cmdPath = None
Esempio n. 2
0
    def __init__(self, parent = None):
        Canvas.__init__(self, parent)
        PopupBase.__init__(self)
        CaptureObject.__init__(self)
        
        self.visible = False
        self.minSize = 100, 50  # minimal dialog size
        
        # margin
        self.__lm = 0   # left margin
        self.__tm = 0   # top margin
        self.__rm = 0   # right margin
        self.__bm = 0   # bottom margin
                
        # border
        '''
        self.border = '3,3,3,3'
        self.bind('Capture Begin', self.onSizeStart)
        self.bind('Capture Offset', self.onSizeMove)
        self.bind('Mouse Enter', self.onChangeCursor, True)
        self.bind('Mouse Leave', self.onChangeCursor, False)
        '''
        # sizer in right bottom
        self.sizable = False        
        self.changeEvent('sizable', self.onSizableChange, postevent = False)

        # command routing
        self.cmdPath = None
Esempio n. 3
0
    def __init__(self, parent = None):
        Canvas.__init__(self, parent)
        CaptureObject.__init__(self)
        self.useGlobalCapture = True
        self.__moveTarget = weakref.ref(self.parent)
        self.caption = ''

        self.bind('Capture Begin', self.onBeginMove, postevent = False)
        self.bind('Capture Offset', self.onMove, postevent = False)
Esempio n. 4
0
    def __init__(self, parent=None):
        Canvas.__init__(self, parent)
        CaptureObject.__init__(self)
        self.useGlobalCapture = True
        self.__moveTarget = weakref.ref(self.parent)
        self.caption = ''

        self.bind('Capture Begin', self.onBeginMove, postevent=False)
        self.bind('Capture Offset', self.onMove, postevent=False)
Esempio n. 5
0
 def __init__(self, parent = None):
     Canvas.__init__(self, parent)
     self.enableFullscreen = True
     self.bind('Mouse Down', self.onMoveWindow)        
     self.bind('Dbl Click', self.onDblClick)
Esempio n. 6
0
 def __init__(self, parent=None):
     Canvas.__init__(self, parent)
     self.enableFullscreen = True
     self.bind('Mouse Down', self.onMoveWindow)
     self.bind('Dbl Click', self.onDblClick)
Esempio n. 7
0


if __name__ == '__main__':
    from window import Window
    from panel import Canvas
    from pprint import pprint
    import color

    koan.init()
    
    w = Window()    
    w.create(0, 0, 800, 600, caption = True)
    w.bgColor = color.darkblue
    
    p = Canvas(w)
    p.bindData('width', w, 'width', dir = '<-')
    p.bindData('height', w, 'height', dir = '<-')
    
    m = Menubar(p)
    m.bindData('width', p, 'width', dir = '<-')
    m.height = 30
    
    def focusChange(i):
        i.bgColor = color.white if i.focus else color.gray
            
    i = MenubarItem(m)
    i.header = 'Cr_eate'
    i.height = 30
    i.bgColor = color.white
    i.changeEvent('focus', focusChange, i)
Esempio n. 8
0
        self.header = data


if __name__ == '__main__':
    from window import Window
    from panel import Canvas
    from pprint import pprint
    import color

    koan.init()

    w = Window()
    w.create(0, 0, 800, 600, caption=True)
    w.bgColor = color.darkblue

    p = Canvas(w)
    p.bindData('width', w, 'width', dir='<-')
    p.bindData('height', w, 'height', dir='<-')

    m = Menubar(p)
    m.bindData('width', p, 'width', dir='<-')
    m.height = 30

    def focusChange(i):
        i.bgColor = color.white if i.focus else color.gray

    i = MenubarItem(m)
    i.header = 'Cr_eate'
    i.height = 30
    i.bgColor = color.white
    i.changeEvent('focus', focusChange, i)