]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/wx/tools/XRCed/globals.py
Don't accidentally instal the MSVCRT.dll from XP as it wont' work on
[wxWidgets.git] / wxPython / wx / tools / XRCed / globals.py
... / ...
CommitLineData
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
7from wxPython.wx import *
8from wxPython.xrc import *
9import sys
10
11# Global constants
12
13progname = 'XRCed'
14version = '0.1.2-1'
15
16try:
17 True
18except NameError:
19 True = 1==1
20 False = 1==0
21
22# Global variables
23
24class 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
56g = Globals()