]> git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/tools/XRCed/globals.py
Get/SetTitle only for wxTopLevelWindow (wxMGL part).
[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 try:
10 from wxPython.wizard import *
11 except:
12 pass
13 import sys
14
15 # Global constants
16
17 progname = 'XRCed'
18 version = '0.1.6-4'
19 # Can be changed to set other default encoding different
20 #defaultEncoding = ''
21 # you comment above and can uncomment this:
22 defaultEncoding = wxGetDefaultPyEncoding()
23
24 try:
25 True
26 except NameError:
27 True = 1==1
28 False = 1==0
29
30 # Global variables
31
32 class Globals:
33 panel = None
34 tree = None
35 frame = None
36 tools = None
37 undoMan = None
38 testWin = None
39 testWinPos = wxDefaultPosition
40 currentXXX = None
41 currentEncoding = defaultEncoding
42
43 def _makeFonts(self):
44 self._sysFont = wxSystemSettings_GetFont(wxSYS_SYSTEM_FONT)
45 self._labelFont = wxFont(self._sysFont.GetPointSize(), wxDEFAULT, wxNORMAL, wxBOLD)
46 self._modernFont = wxFont(self._sysFont.GetPointSize(), wxMODERN, wxNORMAL, wxNORMAL)
47 self._smallerFont = wxFont(self._sysFont.GetPointSize()-2, wxDEFAULT, wxNORMAL, wxNORMAL)
48
49 def sysFont(self):
50 if not hasattr(self, "_sysFont"): self._makeFonts()
51 return self._sysFont
52 def labelFont(self):
53 if not hasattr(self, "_labelFont"): self._makeFonts()
54 return self._labelFont
55 def modernFont(self):
56 if not hasattr(self, "_modernFont"): self._makeFonts()
57 return self._modernFont
58 def smallerFont(self):
59 if not hasattr(self, "_smallerFont"): self._makeFonts()
60 return self._smallerFont
61
62
63 g = Globals()