]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/tools/XRCed/globals.py
2 # Purpose: XRC editor, global variables
3 # Author: Roman Rolinsky <rolinsky@mema.ucl.ac.be>
7 from wxPython
.wx
import *
8 from wxPython
.xrc
import *
10 from wxPython
.wizard
import *
19 # Minimal wxWindows version
20 MinWxVersion
= (2,6,0)
21 if wxVERSION
[:3] < MinWxVersion
:
23 ******************************* WARNING **************************************
24 This version of XRCed may not work correctly on your version of wxWidgets.
25 Please upgrade wxWindows to %d.%d.%d or higher.
26 ******************************************************************************''' % MinWxVersion
28 # Can be changed to set other default encoding different
30 # you comment above and can uncomment this:
31 defaultEncoding
= wxGetDefaultPyEncoding()
48 testWinPos
= wxDefaultPosition
50 currentEncoding
= defaultEncoding
53 self
._sysFont
= wxSystemSettings_GetFont(wxSYS_SYSTEM_FONT
)
54 self
._labelFont
= wxFont(self
._sysFont
.GetPointSize(), wxDEFAULT
, wxNORMAL
, wxBOLD
)
55 self
._modernFont
= wxFont(self
._sysFont
.GetPointSize(), wxMODERN
, wxNORMAL
, wxNORMAL
)
56 self
._smallerFont
= wxFont(self
._sysFont
.GetPointSize()-2, wxDEFAULT
, wxNORMAL
, wxNORMAL
)
59 if not hasattr(self
, "_sysFont"): self
._makeFonts
()
62 if not hasattr(self
, "_labelFont"): self
._makeFonts
()
63 return self
._labelFont
65 if not hasattr(self
, "_modernFont"): self
._makeFonts
()
66 return self
._modernFont
67 def smallerFont(self
):
68 if not hasattr(self
, "_smallerFont"): self
._makeFonts
()
69 return self
._smallerFont