]> git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/tools/XRCed/globals.py
reSWIGged
[wxWidgets.git] / wxPython / wx / tools / XRCed / globals.py
1 # Name: globals.py
2 # Purpose: XRC editor, global variables
3 # Author: Roman Rolinsky <rolinsky@mema.ucl.ac.be>
4 # Created: 02.12.2002
5 # RCS-ID: $Id$
6
7 from wxPython.wx import *
8 from wxPython.xrc import *
9 import sys
10
11 # Global constants
12
13 progname = 'XRCed'
14 version = '0.1.2-1'
15
16 try:
17 True
18 except NameError:
19 True = 1==1
20 False = 1==0
21
22 # Global variables
23
24 class Globals:
25 panel = None
26 tree = None
27 frame = None
28 tools = None
29 undoMan = None
30 testWin = None
31 testWinPos = wxDefaultPosition
32 currentXXX = None
33 currentEncoding = sys.getdefaultencoding() # wxLocale_GetSystemEncodingName()
34
35 def _makeFonts(self):
36 self._sysFont = wxSystemSettings_GetFont(wxSYS_SYSTEM_FONT)
37 self._labelFont = wxFont(self._sysFont.GetPointSize(), wxDEFAULT, wxNORMAL, wxBOLD)
38 self._modernFont = wxFont(self._sysFont.GetPointSize(), wxMODERN, wxNORMAL, wxNORMAL)
39 self._smallerFont = wxFont(self._sysFont.GetPointSize()-2, wxDEFAULT, wxNORMAL, wxNORMAL)
40
41 def sysFont(self):
42 if not hasattr(self, "_sysFont"): self._makeFonts()
43 return self._sysFont
44 def labelFont(self):
45 if not hasattr(self, "_labelFont"): self._makeFonts()
46 return self._labelFont
47 def modernFont(self):
48 if not hasattr(self, "_modernFont"): self._makeFonts()
49 return self._modernFont
50 def smallerFont(self):
51 if not hasattr(self, "_smallerFont"): self._makeFonts()
52 return self._smallerFont
53
54
55
56 g = Globals()