コード例 #1
0
ファイル: imgbutton.py プロジェクト: mpm2050/Raven
    def __init__(self,
                 parent,
                 bitmap,
                 drawDropArrow=False,
                 hoverBitmap=None,
                 drawHoverBox=True,
                 style=wx.NO_BORDER):
        self.bitmap = bitmap
        self.disabledBitmap = None
        self.hoverBitmap = hoverBitmap
        self.drawHoverBox = drawHoverBox
        self.drawDropArrow = drawDropArrow

        self.borderColor = getDefaultControlBorderColor()
        self.hoverBackgroundColor = wx.Color(254, 225, 119)
        self.clickBackgroundColor = wx.Color(251, 209, 61)

        wx.PyControl.__init__(self, parent, wx.ID_ANY, style=style)
        ZClickableControlMixin.__init__(self)
        ZHoverableControlMixin.__init__(self)

        self.Bind(wx.EVT_PAINT, self.onPaint, self)
        self.Bind(wx.EVT_ERASE_BACKGROUND, self.onEraseBackground, self)

        sizeW = self.bitmap.GetWidth()
        sizeH = self.bitmap.GetHeight()
        if self.drawHoverBox or self.drawDropArrow:
            sizeW += 4
            sizeH += 4
        self.SetSizeHints(sizeW, sizeH)
コード例 #2
0
ファイル: toolbar.py プロジェクト: mpm2050/Raven
    def __init__(self, parent, text, description, bitmaps, hoverBitmaps,
                 disabledBitmaps, node):
        self.text = text
        self.description = description
        self.bitmaps = bitmaps
        self.hoverBitmaps = hoverBitmaps
        self.disabledBitmaps = disabledBitmaps
        self.node = node
        self.showTextFlag = True
        self.toolBitmapSize = 16

        wx.PyControl.__init__(self, parent, wx.ID_ANY, style=wx.NO_BORDER)
        ZClickableControlMixin.__init__(self, False)
        ZHoverableControlMixin.__init__(self)

        self.SetFont(getDefaultFont())
        self.SetToolTipString(self.description)
        self._resize()

        self.Bind(wx.EVT_PAINT, self.onPaint, self)
        self.Bind(wx.EVT_ERASE_BACKGROUND, self.onEraseBackground, self)
コード例 #3
0
ファイル: togglebutton.py プロジェクト: Tidosho/zoundryraven
    def __init__(self, parent, bitmap, toggledBitmap=None, style=wx.NO_BORDER):
        self.bitmap = bitmap
        self.disabledBitmap = None
        self.toggledBitmap = toggledBitmap
        self.disabledToggledBitmap = None
        self.toggled = False

        self.borderColor = getDefaultControlBorderColor()
        self.toggledBorderColor = getDefaultControlBorderColor()
        self.hoverBackgroundColor = wx.Color(254, 225, 119)
        self.clickBackgroundColor = wx.Color(251, 209, 61)
        self.toggledBackgroundColor = wx.Color(249, 249, 249)

        wx.PyControl.__init__(self, parent, wx.ID_ANY, style=style)
        ZClickableControlMixin.__init__(self)
        ZHoverableControlMixin.__init__(self)

        self.Bind(wx.EVT_PAINT, self.onPaint, self)
        self.Bind(wx.EVT_ERASE_BACKGROUND, self.onEraseBackground, self)

        sizeW = self.bitmap.GetWidth() + 4
        sizeH = self.bitmap.GetHeight() + 4
        self.SetSizeHints(sizeW, sizeH)
コード例 #4
0
ファイル: togglebutton.py プロジェクト: mpm2050/Raven
    def __init__(self, parent, bitmap, toggledBitmap = None, style = wx.NO_BORDER):
        self.bitmap = bitmap
        self.disabledBitmap = None
        self.toggledBitmap = toggledBitmap
        self.disabledToggledBitmap = None
        self.toggled = False

        self.borderColor = getDefaultControlBorderColor()
        self.toggledBorderColor = getDefaultControlBorderColor()
        self.hoverBackgroundColor = wx.Color(254, 225, 119)
        self.clickBackgroundColor = wx.Color(251, 209, 61)
        self.toggledBackgroundColor = wx.Color(249, 249, 249)

        wx.PyControl.__init__(self, parent, wx.ID_ANY, style = style)
        ZClickableControlMixin.__init__(self)
        ZHoverableControlMixin.__init__(self)

        self.Bind(wx.EVT_PAINT, self.onPaint, self)
        self.Bind(wx.EVT_ERASE_BACKGROUND, self.onEraseBackground, self)

        sizeW = self.bitmap.GetWidth() + 4
        sizeH = self.bitmap.GetHeight() + 4
        self.SetSizeHints(sizeW, sizeH)
コード例 #5
0
ファイル: imgbutton.py プロジェクト: Tidosho/zoundryraven
    def __init__(self, parent, bitmap, drawDropArrow = False, hoverBitmap = None, drawHoverBox = True, style = wx.NO_BORDER):
        self.bitmap = bitmap
        self.disabledBitmap = None
        self.hoverBitmap = hoverBitmap
        self.drawHoverBox = drawHoverBox
        self.drawDropArrow = drawDropArrow

        self.borderColor = getDefaultControlBorderColor()
        self.hoverBackgroundColor = wx.Color(254, 225, 119)
        self.clickBackgroundColor = wx.Color(251, 209, 61)

        wx.PyControl.__init__(self, parent, wx.ID_ANY, style = style)
        ZClickableControlMixin.__init__(self)
        ZHoverableControlMixin.__init__(self)

        self.Bind(wx.EVT_PAINT, self.onPaint, self)
        self.Bind(wx.EVT_ERASE_BACKGROUND, self.onEraseBackground, self)

        sizeW = self.bitmap.GetWidth()
        sizeH = self.bitmap.GetHeight()
        if self.drawHoverBox or self.drawDropArrow:
            sizeW += 4
            sizeH += 4
        self.SetSizeHints(sizeW, sizeH)
コード例 #6
0
ファイル: toolbook.py プロジェクト: Tidosho/zoundryraven
    def __init__(self, parent, text, description, bitmap, hoverBitmap, selectedBitmap, data):
        self.parent = parent
        self.text = text
        self.description = description
        self.bitmap = bitmap
        self.hoverBitmap = hoverBitmap
        self.selectedBitmap = selectedBitmap
        self.data = data
        
        self.selected = False
        
        self.selectedBackgroundColor = wx.Color(200, 200, 225)
        self.hoverBackgroundColor = wx.Color(225, 225, 250)

        wx.PyControl.__init__(self, parent, wx.ID_ANY, style = wx.NO_BORDER)
        ZClickableControlMixin.__init__(self, False)
        ZHoverableControlMixin.__init__(self)

        self.SetFont(getDefaultFont())

        self._resize()

        self.Bind(wx.EVT_PAINT, self.onPaint, self)
        self.Bind(wx.EVT_ERASE_BACKGROUND, self.onEraseBackground, self)
コード例 #7
0
ファイル: splitter.py プロジェクト: Tidosho/zoundryraven
    def __init__(self, parent):
        self.parent = parent

        wx.PyControl.__init__(self, parent, wx.ID_ANY, style = wx.NO_BORDER)
        ZHoverableControlMixin.__init__(self)
コード例 #8
0
ファイル: splitter.py プロジェクト: mpm2050/Raven
    def __init__(self, parent):
        self.parent = parent

        wx.PyControl.__init__(self, parent, wx.ID_ANY, style=wx.NO_BORDER)
        ZHoverableControlMixin.__init__(self)