How to use the pyo.lib._wxwidgets.BACKGROUND_COLOUR function in pyo

To help you get started, we’ve selected a few pyo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github belangeo / zyne / Resources / panels.py View on Github external
style = wx.FRAME_TOOL_WINDOW | wx.FRAME_FLOAT_ON_PARENT | wx.NO_BORDER  
        wx.Frame.__init__(self, parent=parent, id=id, title=title, size=size, 
                        style=style)
        self.SetBackgroundColour(BACKGROUND_COLOUR)
        if vars.constants["PLATFORM"] == "darwin":
            close_accel = wx.ACCEL_CMD
        else:
            close_accel = wx.ACCEL_CTRL
        self.SetAcceleratorTable(wx.AcceleratorTable([(close_accel, ord("W"), vars.constants["ID"]["CloseHelp"])]))
        self.Bind(wx.EVT_MENU, self.onClose, id=vars.constants["ID"]["CloseHelp"])

        self.rtc = rt.RichTextCtrl(self, style=wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER)
        self.rtc.Bind(wx.EVT_LEFT_DOWN, self.onClose)
        self.rtc.SetEditable(False)
        wx.CallAfter(self.rtc.SetFocus)
        self.rtc.SetBackgroundColour(BACKGROUND_COLOUR)
        caret = self.rtc.GetCaret()
        caret.Hide()

        font = self.rtc.GetFont()
        newfont = wx.Font(font.GetPointSize(), wx.FONTFAMILY_TELETYPE, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
        if newfont.IsOk():
            self.rtc.SetFont(newfont)

        self.rtc.Freeze()
        self.rtc.BeginSuppressUndo()
        self.rtc.BeginParagraphSpacing(0, 20)
        self.rtc.BeginBold()
        if vars.constants["PLATFORM"] == "win32" or vars.constants["PLATFORM"].startswith("linux"):
            self.rtc.BeginFontSize(12)
        else:
            self.rtc.BeginFontSize(16)
github belangeo / soundgrain / Resources / ControlPanel.py View on Github external
self.trajType.SetSelection(0)
        popupBox.Add(self.trajType)
        typeBox.Add(popupBox, 0, wx.CENTER|wx.RIGHT, 5)

        # TODO: Check the size of this button on Windows and OSX
        self.closedToggle = wx.ToggleButton(self, -1, 'Closed', size=self.trajType.GetSize())
        # If this is no more needed, remove the next three lines...
        font = self.closedToggle.GetFont()
        if PLATFORM == 'win32':
            font = wx.Font(8, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
        self.closedToggle.SetFont(font) # ... and all related calls in this method.
        typeBox.Add(self.closedToggle, wx.CENTER|wx.RIGHT, 5 )
        box.Add(typeBox, 0, wx.CENTER|wx.ALL, 5)

        self.notebook = wx.Notebook(self, -1, style=wx.BK_DEFAULT | wx.EXPAND)
        self.notebook.SetBackgroundColour(BACKGROUND_COLOUR)
        self.drawing = DrawingParameters(self.notebook)
        self.playback = PlaybackParameters(self.notebook)
        self.notebook.AddPage(self.drawing, "Drawing")
        self.notebook.AddPage(self.playback, "Playback")
        box.Add(self.notebook, 0, wx.ALL, 5)

        # EQ
        eqTitle = wx.StaticText(self, id=-1, label="4 Bands Equalizer")
        box.Add(eqTitle, 0, wx.CENTER)

        eqFreqBox = wx.BoxSizer(wx.HORIZONTAL)
        self.knobEqF1 = ControlKnob(self, 40, 250, 100, label='Freq 1', outFunction=self.changeEqF1)
        eqFreqBox.Add(self.knobEqF1, 0, wx.LEFT | wx.RIGHT, 20)
        self.knobEqF1.setFloatPrecision(2)
        self.knobEqF2 = ControlKnob(self, 300, 1000, 500, label='Freq 2', outFunction=self.changeEqF2)
        eqFreqBox.Add(self.knobEqF2, 0, wx.LEFT | wx.RIGHT, 4)
github belangeo / zyne / Resources / widgets.py View on Github external
def __init__(self, parent, minvalue, maxvalue, init=None, pos=(0,0),
                 size=(44,70), log=False, outFunction=None, integer=False,
                 backColour=None, label=''):
        wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY, pos=pos, size=size,
                          style=wx.NO_BORDER | wx.WANTS_CHARS)
        self.parent = parent
        self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)  
        self.SetBackgroundColour(BACKGROUND_COLOUR)
        self.SetMinSize(self.GetSize())
        self.knobBitmap = KNOB.GetBitmap()
        self.outFunction = outFunction
        self.integer = integer
        self.log = log
        self.label = label
        self.SetRange(minvalue, maxvalue)
        self.borderWidth = 1
        self.selected = False
        self._enable = True
        self.midictl = None
        self.new = ''
        self.floatPrecision = '%.3f'
        if backColour: self.backColour = backColour
        else: self.backColour = BACKGROUND_COLOUR
        if init != None:
github belangeo / soundgrain / Resources / ControlPanel.py View on Github external
def __init__(self, parent, id, title, actual_dur, snd_dur):
        wx.Dialog.__init__(self, parent, id, title)
        self.SetBackgroundColour(BACKGROUND_COLOUR)
        vbox = wx.BoxSizer(wx.VERTICAL)

        stline = wx.StaticText(self, -1, 'Starting point in seconds:')
        vbox.Add(stline, 1, wx.ALIGN_CENTER_HORIZONTAL|wx.TOP, 10)
        self.startSlider = ControlSlider(self, 0, snd_dur, 0, outFunction=self.handleStart)
        vbox.Add(self.startSlider, 0, wx.ALL, 5)

        stline = wx.StaticText(self, -1, 'Ending point in seconds:')
        vbox.Add(stline, 1, wx.ALIGN_CENTER_HORIZONTAL|wx.TOP, 10)
        self.endSlider = ControlSlider(self, 0, snd_dur, snd_dur, outFunction=self.handleEnd)
        vbox.Add(self.endSlider, 0, wx.ALL, 5)

        stline = wx.StaticText(self, -1, 'Insertion point in seconds:')
        vbox.Add(stline, 1, wx.ALIGN_CENTER_HORIZONTAL|wx.TOP, 10)
        self.insertSlider = ControlSlider(self, 0, actual_dur, 0)
        vbox.Add(self.insertSlider, 0, wx.ALL, 5)
github belangeo / zyne / Resources / panels.py View on Github external
def __init__(self, parent, id, title, size, subtitle, lines, from_module=True):
        if vars.constants["PLATFORM"] == "win32":
            style = wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.FRAME_FLOAT_ON_PARENT | wx.NO_BORDER
        else:
            style = wx.FRAME_TOOL_WINDOW | wx.FRAME_FLOAT_ON_PARENT | wx.NO_BORDER  
        wx.Frame.__init__(self, parent=parent, id=id, title=title, size=size, 
                        style=style)
        self.SetBackgroundColour(BACKGROUND_COLOUR)
        if vars.constants["PLATFORM"] == "darwin":
            close_accel = wx.ACCEL_CMD
        else:
            close_accel = wx.ACCEL_CTRL
        self.SetAcceleratorTable(wx.AcceleratorTable([(close_accel, ord("W"), vars.constants["ID"]["CloseHelp"])]))
        self.Bind(wx.EVT_MENU, self.onClose, id=vars.constants["ID"]["CloseHelp"])

        self.rtc = rt.RichTextCtrl(self, style=wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER)
        self.rtc.Bind(wx.EVT_LEFT_DOWN, self.onClose)
        self.rtc.SetEditable(False)
        wx.CallAfter(self.rtc.SetFocus)
        self.rtc.SetBackgroundColour(BACKGROUND_COLOUR)
        caret = self.rtc.GetCaret()
        caret.Hide()

        font = self.rtc.GetFont()
github belangeo / qlive / Resources / Widgets.py View on Github external
def __init__(self):
            wx.Frame.__init__(self, None)
            panel = wx.Panel(self)
            panel.SetBackgroundColour(BACKGROUND_COLOUR)
            knob = QLiveControlKnob(panel, 20, 20000, 1000, pos=(20,20),
                                    label="Freq", outFunction = self.callback)
            self.Show()
github belangeo / soundgrain / Resources / CommandFrame.py View on Github external
def __init__(self, parent):
        html.HtmlWindow.__init__(self, parent)
        self.parent = parent
        self.SetBackgroundColour(BACKGROUND_COLOUR)
        self.SetBorders(10)
github belangeo / soundgrain / Resources / DrawingSurface.py View on Github external
def __init__(self, parent, pos=(0,0), size=wx.DefaultSize):
        wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY, pos=pos, size=size, style = wx.EXPAND)
        self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)
        self.SetBackgroundColour(BACKGROUND_COLOUR)
        self.parent = parent
        dt = MyFileDropTarget(self)
        self.SetDropTarget(dt)
        self.useMario = False
        self.backBitmap = None
        self.needBitmap = True
        self.onMotion = False
        self.marios = [wx.Bitmap(os.path.join(IMAGES_PATH, 'Mario%d.png' % i), wx.BITMAP_TYPE_PNG) for i in [1,2,3,2,4,5,6,5]]
        if PLATFORM == "darwin":
            fontsize = 10
        else:
            fontsize = 8
        self.font = wx.Font(fontsize, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
        self.font_pos = wx.Font(fontsize, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
        self.trajectories = [Trajectory(self, i+1) for i in range(MAX_STREAMS)]
        self.memorizedTrajectory = Trajectory(self, -1)
github belangeo / qlive / Resources / MixerPanel.py View on Github external
def __init__(self, parent, audioMixer):
        wx.Panel.__init__(self, parent, size=(800,129), style=wx.SUNKEN_BORDER)
        self.audioMixer = audioMixer
        self.SetBackgroundColour(BACKGROUND_COLOUR)

        self.inputLinked = False
        self.outputLinked = False
        self.inputSliders = []
        self.outputSliders = []

        font = self.GetFont()
        font.SetWeight(wx.FONTWEIGHT_BOLD)

        ### INPUT SECTION
        inputBox = wx.BoxSizer(wx.VERTICAL)
        inputSliderBox = wx.BoxSizer(wx.HORIZONTAL)
        inputBox.AddSpacer((-1,2))
        label = wx.StaticText(self, label="Input Channels")
        label.SetFont(font)
        inputBox.Add(label, 0, wx.LEFT|wx.EXPAND, 10)
github belangeo / soundgrain / Resources / widgets.py View on Github external
def __init__(self, parent, minvalue, maxvalue, init=None, pos=(0,0), size=(44,70), log=False, outFunction=None, integer=False, backColour=None, label=''):
        wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY, pos=pos, size=size, style=wx.NO_BORDER | wx.WANTS_CHARS)
        self.parent = parent
        self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)
        self.SetBackgroundColour(BACKGROUND_COLOUR)
        self.SetMinSize(self.GetSize())
        self.knobBitmap = KNOB.GetBitmap()
        self.outFunction = outFunction
        self.integer = integer
        self.log = log
        self.label = label
        self.SetRange(minvalue, maxvalue)
        self.borderWidth = 1
        self.selected = False
        self._enable = True
        self.midictl = None
        self.new = ''
        self.floatPrecision = '%.3f'
        if backColour: self.backColour = backColour
        else: self.backColour = BACKGROUND_COLOUR
        if init != None: