]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/wx/tools/XRCed/globals.py
warning fix
[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.4-1'
15# Can be changed to set other default encoding different
16defaultEncoding = sys.getdefaultencoding()
17
18try:
19 True
20except NameError:
21 True = 1==1
22 False = 1==0
23
24# Global variables
25
26class Globals:
27 panel = None
28 tree = None
29 frame = None
30 tools = None
31 undoMan = None
32 testWin = None
33 testWinPos = wxDefaultPosition
34 currentXXX = None
35 currentEncoding = defaultEncoding
36
37 def _makeFonts(self):
38 self._sysFont = wxSystemSettings_GetFont(wxSYS_SYSTEM_FONT)
39 self._labelFont = wxFont(self._sysFont.GetPointSize(), wxDEFAULT, wxNORMAL, wxBOLD)
40 self._modernFont = wxFont(self._sysFont.GetPointSize(), wxMODERN, wxNORMAL, wxNORMAL)
41 self._smallerFont = wxFont(self._sysFont.GetPointSize()-2, wxDEFAULT, wxNORMAL, wxNORMAL)
42
43 def sysFont(self):
44 if not hasattr(self, "_sysFont"): self._makeFonts()
45 return self._sysFont
46 def labelFont(self):
47 if not hasattr(self, "_labelFont"): self._makeFonts()
48 return self._labelFont
49 def modernFont(self):
50 if not hasattr(self, "_modernFont"): self._makeFonts()
51 return self._modernFont
52 def smallerFont(self):
53 if not hasattr(self, "_smallerFont"): self._makeFonts()
54 return self._smallerFont
55
56
57g = Globals()