]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/wx/tools/XRCed/globals.py
apparently the check for too small rect is needed not only with wxNB_MULTILINE (see...
[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
7import wx
8from wxPython.wx import *
9from wxPython.xrc import *
10try:
11 from wxPython.wizard import *
12except:
13 pass
14import sys
15
16# Global constants
17
18progname = 'XRCed'
19version = '0.1.5-2'
20# Can be changed to set other default encoding different
21#defaultEncoding = sys.getdefaultencoding()
22defaultEncoding = wx.GetDefaultPyEncoding()
23
24try:
25 True
26except NameError:
27 True = 1==1
28 False = 1==0
29
30# Global variables
31
32class 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
63g = Globals()