]> git.saurik.com Git - wxWidgets.git/blame - wxPython/wx/tools/XRCed/globals.py
Added export decl
[wxWidgets.git] / wxPython / wx / tools / XRCed / globals.py
CommitLineData
d14a1e28
RD
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$
1fded56b 6
d14a1e28
RD
7from wxPython.wx import *
8from wxPython.xrc import *
9import sys
1fded56b 10
d14a1e28
RD
11# Global constants
12
d14a1e28 13progname = 'XRCed'
a4c013b2 14version = '0.1.2-1'
d14a1e28
RD
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
289128a4
RD
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
d14a1e28 56g = Globals()