MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / __init__

Method __init__

gui/auxWindow.py:29–55  ·  view source on GitHub ↗
(self, parent, id=None, title=None, pos=None, size=None, style=None, name=None, resizeable=False)

Source from the content-addressed store, hash-verified

27 _instance = None
28
29 def __init__(self, parent, id=None, title=None, pos=None, size=None, style=None, name=None, resizeable=False):
30 baseStyle = wx.FRAME_NO_TASKBAR | wx.CAPTION | wx.CLOSE_BOX | wx.SYSTEM_MENU
31 if parent is not None:
32 baseStyle = baseStyle | wx.FRAME_FLOAT_ON_PARENT
33 if resizeable:
34 baseStyle = baseStyle | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX
35 kwargs = {
36 'parent': parent,
37 'style': baseStyle if style is None else baseStyle | style}
38 if id is not None:
39 kwargs['id'] = id
40 if title is not None:
41 kwargs['title'] = title
42 if pos is not None:
43 kwargs['pos'] = pos
44 if size is not None:
45 kwargs['size'] = size
46 if name is not None:
47 kwargs['name'] = name
48 super().__init__(**kwargs)
49 # Intercept copy-paste actions and do nothing in secondary windows,
50 # otherwise on Mac OS X Cmd-C brings up copy fit dialog
51 if 'wxMac' in wx.PlatformInfo:
52 self.Bind(wx.EVT_MENU, self.OnSuppressedAction, id=wx.ID_COPY)
53 self.Bind(wx.EVT_MENU, self.OnSuppressedAction, id=wx.ID_PASTE)
54 if 'wxMSW' in wx.PlatformInfo:
55 self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE))
56
57 @classmethod
58 def openOne(cls, parent, *args, forceReopen=False, **kwargs):

Callers

nothing calls this directly

Calls 1

SetBackgroundColourMethod · 0.80

Tested by

no test coverage detected