本文整理汇总了Python中FxStudio.getColorPalette方法的典型用法代码示例。如果您正苦于以下问题:Python FxStudio.getColorPalette方法的具体用法?Python FxStudio.getColorPalette怎么用?Python FxStudio.getColorPalette使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FxStudio
的用法示例。
在下文中一共展示了FxStudio.getColorPalette方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import getColorPalette [as 别名]
def __init__(self, parent):
wx.Window.__init__(self, parent, wx.ID_ANY, wx.DefaultPosition, (-1, 2))
self.SetBackgroundColour('UIFaceColour')
self.SetForegroundColour('UIFaceColour')
self.Bind(wx.EVT_PAINT, self.on_paint)
self.Bind(wx.EVT_ERASE_BACKGROUND, self.on_erase_background)
self.colors = FxStudio.getColorPalette()
示例2: __init__
# 需要导入模块: import FxStudio [as 别名]
# 或者: from FxStudio import getColorPalette [as 别名]
def __init__(self, parent, id, title):
wx.Window.__init__(self, parent, id, style=wx.NO_BORDER, name=title)
self._sizer = wx.BoxSizer(wx.VERTICAL)
self.shell = IPShellWidget(self, intro='Welcome to the FaceFX IPython Shell.\n\n')
# Turn on STC completion and turn off threading.
self.shell.options['completion']['value'] = 'STC'
self.shell.options['threading']['value'] = 'False'
self.shell.reloadOptions(self.shell.options)
# Turn off the annoying 80 column vertical line.
self.shell.text_ctrl.SetEdgeMode(wx.stc.STC_EDGE_NONE)
self.color_palette = FxStudio.getColorPalette()
self.shell.text_ctrl.StyleSetBackground(wx.stc.STC_STYLE_DEFAULT, self.color_palette['BaseColour1'])
for style in self.shell.text_ctrl.ANSI_STYLES.values():
self.shell.text_ctrl.StyleSetBackground(style[0], self.color_palette['BaseColour1'])
self.shell.text_ctrl.SetCaretForeground('WHITE')
self.shell.text_ctrl.SetWindowStyle(self.shell.text_ctrl.GetWindowStyle() | wx.NO_BORDER)
self.shell.text_ctrl.Refresh()
ip = IPython.ipapi.get()
ip.ex('from FxStudio import *')
self._sizer.Add(self.shell, 1, wx.EXPAND)
self.SetSizer(self._sizer)
self.Bind(wx.EVT_SIZE, self.onSize)
# Hook into the underlying STC and add in the missing mouse capture lost event handler
# to prevent C++ wxWidgets code from asserting. Note that there's not much we can
# do about the selection weirdness that happens if this state is triggered.
self.shell.text_ctrl.Bind(wx.EVT_MOUSE_CAPTURE_LOST, self.onMouseCaptureLost)
self.SetAutoLayout(1)
self.output = FaceFXOnDemandOutputWindow(title="output")
sys.stdout = self.output
sys.stderr = self.output
FxStudio.dockInMainWindowNotebook(self, "Python")