MCPcopy Create free account
hub / github.com/cztomczak/cefpython / __init__

Method __init__

src/cefpython3.wx/chromectrl.py:239–264  ·  view source on GitHub ↗
(self, parent, url="", useTimer=True,
                 timerMillis=DEFAULT_TIMER_MILLIS,
                 browserSettings=None, hasNavBar=True,
                 *args, **kwargs)

Source from the content-addressed store, hash-verified

237
238class ChromeCtrl(wx.Panel):
239 def __init__(self, parent, url="", useTimer=True,
240 timerMillis=DEFAULT_TIMER_MILLIS,
241 browserSettings=None, hasNavBar=True,
242 *args, **kwargs):
243 # You also have to set the wx.WANTS_CHARS style for
244 # all parent panels/controls, if it's deeply embedded.
245 wx.Panel.__init__(self, parent, style=wx.WANTS_CHARS, *args, **kwargs)
246
247 self.chromeWindow = ChromeWindow(self, url=str(url), useTimer=useTimer,
248 browserSettings=browserSettings)
249 sizer = wx.BoxSizer(wx.VERTICAL)
250 self.navigationBar = None
251 if hasNavBar:
252 self.navigationBar = self.CreateNavigationBar()
253 sizer.Add(self.navigationBar, 0, wx.EXPAND|wx.ALL, 0)
254 self._InitEventHandlers()
255
256 sizer.Add(self.chromeWindow, 1, wx.EXPAND, 0)
257
258 self.SetSizer(sizer)
259 self.Fit()
260
261 ch = DefaultClientHandler(self)
262 self.SetClientHandler(ch)
263 if self.navigationBar:
264 self.UpdateButtonsState()
265
266 def _InitEventHandlers(self):
267 self.navigationBar.backBtn.Bind(wx.EVT_BUTTON, self.OnLeft)

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 7

CreateNavigationBarMethod · 0.95
_InitEventHandlersMethod · 0.95
SetClientHandlerMethod · 0.95
UpdateButtonsStateMethod · 0.95
ChromeWindowClass · 0.85
AddMethod · 0.80

Tested by

no test coverage detected