]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/tools/XRCed/globals.py
2 # Purpose: XRC editor, global variables
3 # Author: Roman Rolinsky <rolinsky@mema.ucl.ac.be>
19 # Minimal wxWidgets version
20 MinWxVersion
= (2,6,0)
21 if wx
.VERSION
[:3] < MinWxVersion
:
23 ******************************* WARNING **************************************
24 This version of XRCed may not work correctly on your version of wxWidgets.
25 Please upgrade wxWidgets to %d.%d.%d or higher.
26 ******************************************************************************''' % MinWxVersion
28 # Can be changed to set other default encoding different
30 # you comment above and can uncomment this:
31 defaultEncoding
= wx
.GetDefaultPyEncoding()
48 testWinPos
= wx
.DefaultPosition
50 currentEncoding
= defaultEncoding
54 self
._sysFont
= wx
.SystemSettings
.GetFont(wx
.SYS_SYSTEM_FONT
)
55 self
._labelFont
= wx
.Font(self
._sysFont
.GetPointSize(), wx
.DEFAULT
, wx
.NORMAL
, wx
.BOLD
)
56 self
._modernFont
= wx
.Font(self
._sysFont
.GetPointSize(), wx
.MODERN
, wx
.NORMAL
, wx
.NORMAL
)
57 self
._smallerFont
= wx
.Font(self
._sysFont
.GetPointSize()-2, wx
.DEFAULT
, wx
.NORMAL
, wx
.NORMAL
)
60 if not hasattr(self
, "_sysFont"): self
._makeFonts
()
63 if not hasattr(self
, "_labelFont"): self
._makeFonts
()
64 return self
._labelFont
66 if not hasattr(self
, "_modernFont"): self
._makeFonts
()
67 return self
._modernFont
68 def smallerFont(self
):
69 if not hasattr(self
, "_smallerFont"): self
._makeFonts
()
70 return self
._smallerFont
76 class MyDataObject(wx
.PyDataObjectSimple
):
78 wx
.PyDataObjectSimple
.__init
__(self
, wx
.CustomDataFormat('XRCed_DND'))
80 def GetDataSize(self
):
82 def GetDataHere(self
):
83 return self
.data
# returns a string
84 def SetData(self
, data
):