]> git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/lib/inspection.py
fixes to wint_t and wchar_t handling in unichar.h (fixes FreeBSD compilation and...
[wxWidgets.git] / wxPython / wx / lib / inspection.py
1 #----------------------------------------------------------------------------
2 # Name: wx.lib.inspection
3 # Purpose: A widget inspection tool that allows easy introspection of
4 # all the live widgets and sizers in an application.
5 #
6 # Author: Robin Dunn
7 #
8 # Created: 26-Jan-2007
9 # RCS-ID: $Id$
10 # Copyright: (c) 2007 by Total Control Software
11 # Licence: wxWindows license
12 #----------------------------------------------------------------------------
13
14 # NOTE: This class was originally based on ideas sent to the
15 # wxPython-users mail list by Dan Eloff. See also
16 # wx.lib.mixins.inspect for a class that can be mixed-in with wx.App
17 # to provide Hot-Key access to the inspection tool.
18
19 import wx
20 import wx.py
21 import wx.stc
22 import wx.aui
23 import sys
24
25 #----------------------------------------------------------------------------
26
27 class InspectionTool:
28 """
29 The InspectionTool is a singleton that manages creating and
30 showing an InspectionFrame.
31 """
32
33 # Note: This is the Borg design pattern which ensures that all
34 # instances of this class are actually using the same set of
35 # instance data. See
36 # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531
37 __shared_state = {}
38 def __init__(self):
39 self.__dict__ = self.__shared_state
40 if not hasattr(self, 'initialized'):
41 self.initialized = False
42
43 def Init(self, pos=wx.DefaultPosition, size=wx.Size(850,700),
44 config=None, locals=None, app=None):
45 """
46 Init is used to set some parameters that will be used later
47 when the inspection tool is shown. Suitable defaults will be
48 used for all of these parameters if they are not provided.
49
50 :param pos: The default position to show the frame at
51 :param size: The default size of the frame
52 :param config: A wx.Config object to be used to store layout
53 and other info to when the inspection frame is closed.
54 This info will be restored the next time the inspection
55 frame is used.
56 :param locals: A dictionary of names to be added to the PyCrust
57 namespace.
58 :param app: A reference to the wx.App object.
59 """
60 self._frame = None
61 self._pos = pos
62 self._size = size
63 self._config = config
64 self._locals = locals
65 self._app = app
66 if not self._app:
67 self._app = wx.GetApp()
68 self.initialized = True
69
70
71 def Show(self, selectObj=None, refreshTree=False):
72 """
73 Creates the inspection frame if it hasn't been already, and
74 raises it if neccessary. Pass a widget or sizer in selectObj
75 to have that object be preselected in widget tree. If
76 refreshTree is True then the widget tree will be rebuilt,
77 otherwise if the tree has already been built it will be left
78 alone.
79 """
80 if not self.initialized:
81 self.Init()
82
83 parent = self._app.GetTopWindow()
84 if not selectObj:
85 selectObj = parent
86 if not self._frame:
87 self._frame = InspectionFrame( parent=parent,
88 pos=self._pos,
89 size=self._size,
90 config=self._config,
91 locals=self._locals,
92 app=self._app)
93 if selectObj:
94 self._frame.SetObj(selectObj)
95 if refreshTree:
96 self._frame.RefreshTree()
97 self._frame.Show()
98 if self._frame.IsIconized():
99 self._frame.Iconize(False)
100 self._frame.Raise()
101
102
103 #----------------------------------------------------------------------------
104
105
106 class InspectionFrame(wx.Frame):
107 """
108 This class is the frame that holds the wxPython inspection tools.
109 The toolbar and AUI splitters/floating panes are also managed
110 here. The contents of the tool windows are handled by other
111 classes.
112 """
113 def __init__(self, wnd=None, locals=None, config=None,
114 app=None, title="wxPython Widget Inspection Tool",
115 *args, **kw):
116 kw['title'] = title
117 wx.Frame.__init__(self, *args, **kw)
118
119 self.includeSizers = False
120 self.started = False
121
122 self.SetIcon(getIconIcon())
123 self.MacSetMetalAppearance(True)
124 self.MakeToolBar()
125 panel = wx.Panel(self, size=self.GetClientSize())
126
127 # tell FrameManager to manage this frame
128 self.mgr = wx.aui.AuiManager(panel,
129 wx.aui.AUI_MGR_DEFAULT
130 | wx.aui.AUI_MGR_TRANSPARENT_DRAG
131 | wx.aui.AUI_MGR_ALLOW_ACTIVE_PANE)
132
133 # make the child tools
134 self.tree = InspectionTree(panel)
135 self.info = InspectionInfoPanel(panel,
136 style=wx.NO_BORDER,
137 )
138
139 if not locals:
140 locals = {}
141 myIntroText = (
142 "Python %s on %s\nNOTE: The 'obj' variable refers to the object selected in the tree."
143 % (sys.version.split()[0], sys.platform))
144 self.crust = wx.py.crust.Crust(panel, locals=locals,
145 intro=myIntroText,
146 showInterpIntro=False,
147 style=wx.NO_BORDER,
148 )
149 self.locals = self.crust.shell.interp.locals
150 self.crust.shell.interp.introText = ''
151 self.locals['obj'] = self.obj = wnd
152 self.locals['app'] = app
153 self.locals['wx'] = wx
154 wx.CallAfter(self._postStartup)
155
156 # put the chlid tools in AUI panes
157 self.mgr.AddPane(self.info,
158 wx.aui.AuiPaneInfo().Name("info").Caption("Object Info").
159 CenterPane().CaptionVisible(True).
160 CloseButton(False).MaximizeButton(True)
161 )
162 self.mgr.AddPane(self.tree,
163 wx.aui.AuiPaneInfo().Name("tree").Caption("Widget Tree").
164 CaptionVisible(True).Left().Dockable(True).Floatable(True).
165 BestSize((280,200)).CloseButton(False).MaximizeButton(True)
166 )
167 self.mgr.AddPane(self.crust,
168 wx.aui.AuiPaneInfo().Name("crust").Caption("PyCrust").
169 CaptionVisible(True).Bottom().Dockable(True).Floatable(True).
170 BestSize((400,200)).CloseButton(False).MaximizeButton(True)
171 )
172
173 self.mgr.Update()
174
175 if config is None:
176 config = wx.Config('wxpyinspector')
177 self.config = config
178 self.Bind(wx.EVT_CLOSE, self.OnClose)
179 self.LoadSettings(self.config)
180 self.crust.shell.lineNumbers = False
181 self.crust.shell.setDisplayLineNumbers(False)
182 self.crust.shell.SetMarginWidth(1, 0)
183
184
185 def MakeToolBar(self):
186 tbar = self.CreateToolBar(wx.TB_HORIZONTAL | wx.TB_FLAT | wx.TB_TEXT | wx.NO_BORDER )
187 tbar.SetToolBitmapSize((24,24))
188
189 refreshBmp = getRefreshBitmap()
190 findWidgetBmp = getFindBitmap()
191 showSizersBmp = getShowSizersBitmap()
192 toggleFillingBmp = getShowFillingBitmap()
193
194 refreshTool = tbar.AddLabelTool(-1, 'Refresh', refreshBmp,
195 shortHelp = 'Refresh widget tree')
196 findWidgetTool = tbar.AddLabelTool(-1, 'Find', findWidgetBmp,
197 shortHelp='Find new target widget. Click here and\nthen on another widget in the app.')
198 showSizersTool = tbar.AddLabelTool(-1, 'Sizers', showSizersBmp,
199 shortHelp='Include sizers in widget tree',
200 kind=wx.ITEM_CHECK)
201 toggleFillingTool = tbar.AddLabelTool(-1, 'Filling', toggleFillingBmp,
202 shortHelp='Show PyCrust \'filling\'',
203 kind=wx.ITEM_CHECK)
204 tbar.Realize()
205
206 self.Bind(wx.EVT_TOOL, self.OnRefreshTree, refreshTool)
207 self.Bind(wx.EVT_TOOL, self.OnFindWidget, findWidgetTool)
208 self.Bind(wx.EVT_TOOL, self.OnShowSizers, showSizersTool)
209 self.Bind(wx.EVT_TOOL, self.OnToggleFilling, toggleFillingTool)
210 self.Bind(wx.EVT_UPDATE_UI, self.OnShowSizersUI, showSizersTool)
211 self.Bind(wx.EVT_UPDATE_UI, self.OnToggleFillingUI, toggleFillingTool)
212
213
214
215 def _postStartup(self):
216 if self.crust.ToolsShown():
217 self.crust.ToggleTools()
218 self.UpdateInfo()
219 self.started = True
220
221
222 def OnClose(self, evt):
223 self.SaveSettings(self.config)
224 self.mgr.UnInit()
225 del self.mgr
226 evt.Skip()
227
228
229 def UpdateInfo(self):
230 self.info.Update(self.obj)
231
232
233 def SetObj(self, obj):
234 if self.obj is obj:
235 return
236 self.locals['obj'] = self.obj = obj
237 self.UpdateInfo()
238 if not self.tree.built:
239 self.tree.BuildTree(obj, includeSizers=self.includeSizers)
240 else:
241 self.tree.SelectObj(obj)
242
243
244 def RefreshTree(self):
245 self.tree.BuildTree(self.obj, includeSizers=self.includeSizers)
246
247
248 def OnRefreshTree(self, evt):
249 self.RefreshTree()
250 self.UpdateInfo()
251
252
253 def OnFindWidget(self, evt):
254 self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
255 self.Bind(wx.EVT_MOUSE_CAPTURE_LOST, self.OnCaptureLost)
256 self.CaptureMouse()
257 self.finding = wx.BusyInfo("Click on any widget in the app...")
258
259
260 def OnCaptureLost(self, evt):
261 self.Unbind(wx.EVT_LEFT_DOWN)
262 self.Unbind(wx.EVT_MOUSE_CAPTURE_LOST)
263 del self.finding
264
265 def OnLeftDown(self, evt):
266 self.ReleaseMouse()
267 wnd = wx.FindWindowAtPointer()
268 if wnd is not None:
269 self.SetObj(wnd)
270 else:
271 wx.Bell()
272 self.OnCaptureLost(evt)
273
274
275 def OnShowSizers(self, evt):
276 self.includeSizers = not self.includeSizers
277 self.RefreshTree()
278
279
280 def OnToggleFilling(self, evt):
281 self.crust.ToggleTools()
282
283
284 def OnShowSizersUI(self, evt):
285 evt.Check(self.includeSizers)
286
287
288 def OnToggleFillingUI(self, evt):
289 if self.started:
290 evt.Check(self.crust.ToolsShown())
291
292
293 def LoadSettings(self, config):
294 self.crust.LoadSettings(config)
295
296 pos = wx.Point(config.ReadInt('Window/PosX', -1),
297 config.ReadInt('Window/PosY', -1))
298
299 size = wx.Size(config.ReadInt('Window/Width', -1),
300 config.ReadInt('Window/Height', -1))
301 self.SetSize(size)
302 self.Move(pos)
303
304 perspective = config.Read('perspective', '')
305 if perspective:
306 self.mgr.LoadPerspective(perspective)
307 self.includeSizers = config.ReadBool('includeSizers', False)
308
309
310 def SaveSettings(self, config):
311 self.crust.SaveSettings(config)
312
313 if not self.IsIconized() and not self.IsMaximized():
314 w, h = self.GetSize()
315 config.WriteInt('Window/Width', w)
316 config.WriteInt('Window/Height', h)
317
318 px, py = self.GetPosition()
319 config.WriteInt('Window/PosX', px)
320 config.WriteInt('Window/PosY', py)
321
322 perspective = self.mgr.SavePerspective()
323 config.Write('perspective', perspective)
324 config.WriteBool('includeSizers', self.includeSizers)
325
326 #---------------------------------------------------------------------------
327
328 # should inspection frame (and children) be includeed in the tree?
329 INCLUDE_INSPECTOR = True
330
331 class InspectionTree(wx.TreeCtrl):
332 """
333 All of the widgets in the app, and optionally their sizers, are
334 loaded into this tree.
335 """
336 def __init__(self, *args, **kw):
337 #s = kw.get('style', 0)
338 #kw['style'] = s | wx.TR_DEFAULT_STYLE | wx.TR_HIDE_ROOT
339 wx.TreeCtrl.__init__(self, *args, **kw)
340 self.roots = []
341 self.built = False
342 self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSelectionChanged)
343 self.toolFrame = wx.GetTopLevelParent(self)
344 if 'wxMac' in wx.PlatformInfo:
345 self.SetWindowVariant(wx.WINDOW_VARIANT_SMALL)
346
347
348 def BuildTree(self, startWidget, includeSizers=False):
349 if self.GetCount():
350 self.DeleteAllItems()
351 self.roots = []
352 self.built = False
353
354 realRoot = self.AddRoot('Top-level Windows')
355
356 for w in wx.GetTopLevelWindows():
357 if w is wx.GetTopLevelParent(self) and not INCLUDE_INSPECTOR:
358 continue
359 root = self._AddWidget(realRoot, w, includeSizers)
360 self.roots.append(root)
361
362 # Expand the subtree containing the startWidget, and select it.
363 if not startWidget or not isinstance(startWidget, wx.Window):
364 startWidget = wx.GetApp().GetTopWindow()
365 top = wx.GetTopLevelParent(startWidget)
366 topItem = self.FindWidgetItem(top)
367 if topItem:
368 self.ExpandAllChildren(topItem)
369 self.SelectObj(startWidget)
370 self.built = True
371
372
373 def _AddWidget(self, parentItem, widget, includeSizers):
374 text = self.GetTextForWidget(widget)
375 item = self.AppendItem(parentItem, text)
376 self.SetItemPyData(item, widget)
377
378 # Add the sizer and widgets in the sizer, if we're showing them
379 widgetsInSizer = []
380 if includeSizers and widget.GetSizer() is not None:
381 widgetsInSizer = self._AddSizer(item, widget.GetSizer())
382
383 # Add any children not in the sizer, or all children if we're
384 # not showing the sizers
385 for child in widget.GetChildren():
386 if not child in widgetsInSizer and not child.IsTopLevel():
387 self._AddWidget(item, child, includeSizers)
388
389 return item
390
391
392 def _AddSizer(self, parentItem, sizer):
393 widgets = []
394 text = self.GetTextForSizer(sizer)
395 item = self.AppendItem(parentItem, text)
396 self.SetItemPyData(item, sizer)
397 self.SetItemTextColour(item, "blue")
398
399 for si in sizer.GetChildren():
400 if si.IsWindow():
401 w = si.GetWindow()
402 self._AddWidget(item, w, True)
403 widgets.append(w)
404 elif si.IsSizer():
405 widgets += self._AddSizer(item, si.GetSizer())
406 else:
407 i = self.AppendItem(item, "Spacer")
408 self.SetItemPyData(i, si)
409 self.SetItemTextColour(i, "blue")
410 return widgets
411
412
413 def FindWidgetItem(self, widget):
414 """
415 Find the tree item for a widget.
416 """
417 for item in self.roots:
418 found = self._FindWidgetItem(widget, item)
419 if found:
420 return found
421 return None
422
423 def _FindWidgetItem(self, widget, item):
424 if self.GetItemPyData(item) is widget:
425 return item
426 child, cookie = self.GetFirstChild(item)
427 while child:
428 found = self._FindWidgetItem(widget, child)
429 if found:
430 return found
431 child, cookie = self.GetNextChild(item, cookie)
432 return None
433
434
435 def GetTextForWidget(self, widget):
436 """
437 Returns the string to be used in the tree for a widget
438 """
439 return "%s (\"%s\")" % (widget.__class__.__name__, widget.GetName())
440
441 def GetTextForSizer(self, sizer):
442 """
443 Returns the string to be used in the tree for a sizer
444 """
445 return "%s" % sizer.__class__.__name__
446
447
448 def SelectObj(self, obj):
449 item = self.FindWidgetItem(obj)
450 if item:
451 self.EnsureVisible(item)
452 self.SelectItem(item)
453
454
455 def OnSelectionChanged(self, evt):
456 obj = self.GetItemPyData(evt.GetItem())
457 self.toolFrame.SetObj(obj)
458
459
460 #---------------------------------------------------------------------------
461
462 class InspectionInfoPanel(wx.stc.StyledTextCtrl):
463 """
464 Used to display information about the currently selected items.
465 Currently just a read-only wx.stc.StyledTextCtrl with some plain
466 text. Should probably add some styles to make things easier to
467 read.
468 """
469 def __init__(self, *args, **kw):
470 wx.stc.StyledTextCtrl.__init__(self, *args, **kw)
471
472 from wx.py.editwindow import FACES
473 self.StyleSetSpec(wx.stc.STC_STYLE_DEFAULT,
474 "face:%(mono)s,size:%(size)d,back:%(backcol)s" % FACES)
475 self.StyleClearAll()
476 self.SetReadOnly(True)
477 self.SetMarginType(1, 0)
478 self.SetMarginWidth(1, 0)
479 self.SetSelForeground(True, wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT))
480 self.SetSelBackground(True, wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHT))
481
482
483 def Update(self, obj):
484 st = []
485 if not obj:
486 st.append("Item is None or has been destroyed.")
487
488 elif isinstance(obj, wx.Window):
489 st += self.FmtWidget(obj)
490
491 elif isinstance(obj, wx.Sizer):
492 st += self.FmtSizer(obj)
493
494 elif isinstance(obj, wx.SizerItem):
495 st += self.FmtSizerItem(obj)
496
497 self.SetReadOnly(False)
498 self.SetText('\n'.join(st))
499 self.SetReadOnly(True)
500
501
502 def Fmt(self, name, value):
503 if isinstance(value, (str, unicode)):
504 return " %s = '%s'" % (name, value)
505 else:
506 return " %s = %s" % (name, value)
507
508
509 def FmtWidget(self, obj):
510 st = ["Widget:"]
511 st.append(self.Fmt('name', obj.GetName()))
512 st.append(self.Fmt('class', obj.__class__))
513 st.append(self.Fmt('bases', obj.__class__.__bases__))
514 if hasattr(obj, 'this'):
515 st.append(self.Fmt('this', repr(obj.this)))
516 st.append(self.Fmt('id', obj.GetId()))
517 st.append(self.Fmt('style', obj.GetWindowStyle()))
518 st.append(self.Fmt('pos', obj.GetPosition()))
519 st.append(self.Fmt('size', obj.GetSize()))
520 st.append(self.Fmt('minsize', obj.GetMinSize()))
521 st.append(self.Fmt('bestsize', obj.GetBestSize()))
522 st.append(self.Fmt('client size',obj.GetClientSize()))
523 st.append(self.Fmt('IsEnabled', obj.IsEnabled()))
524 st.append(self.Fmt('IsShown', obj.IsShown()))
525 st.append(self.Fmt('fg color', obj.GetForegroundColour()))
526 st.append(self.Fmt('bg color', obj.GetBackgroundColour()))
527 st.append(self.Fmt('label', obj.GetLabel()))
528 if hasattr(obj, 'GetTitle'):
529 st.append(self.Fmt('title', obj.GetTitle()))
530 if hasattr(obj, 'GetValue'):
531 st.append(self.Fmt('value', obj.GetValue()))
532 if obj.GetContainingSizer() is not None:
533 st.append('')
534 sizer = obj.GetContainingSizer()
535 st += self.FmtSizerItem(sizer.GetItem(obj))
536 return st
537
538
539 def FmtSizerItem(self, obj):
540 if obj is None:
541 return ['SizerItem: None']
542
543 st = ['SizerItem:']
544 st.append(self.Fmt('proportion', obj.GetProportion()))
545 st.append(self.Fmt('flag',
546 FlagsFormatter(itemFlags, obj.GetFlag())))
547 st.append(self.Fmt('border', obj.GetBorder()))
548 st.append(self.Fmt('pos', obj.GetPosition()))
549 st.append(self.Fmt('size', obj.GetSize()))
550 st.append(self.Fmt('minsize', obj.GetMinSize()))
551 st.append(self.Fmt('ratio', obj.GetRatio()))
552 st.append(self.Fmt('IsWindow', obj.IsWindow()))
553 st.append(self.Fmt('IsSizer', obj.IsSizer()))
554 st.append(self.Fmt('IsSpacer', obj.IsSpacer()))
555 st.append(self.Fmt('IsShown', obj.IsShown()))
556 if isinstance(obj, wx.GBSizerItem):
557 st.append(self.Fmt('cellpos', obj.GetPos()))
558 st.append(self.Fmt('cellspan', obj.GetSpan()))
559 st.append(self.Fmt('endpos', obj.GetEndPos()))
560 return st
561
562
563 def FmtSizer(self, obj):
564 st = ['Sizer:']
565 st.append(self.Fmt('class', obj.__class__))
566 if hasattr(obj, 'this'):
567 st.append(self.Fmt('this', repr(obj.this)))
568 st.append(self.Fmt('pos', obj.GetPosition()))
569 st.append(self.Fmt('size', obj.GetSize()))
570 st.append(self.Fmt('minsize', obj.GetMinSize()))
571 if isinstance(obj, wx.BoxSizer):
572 st.append(self.Fmt('orientation',
573 FlagsFormatter(orientFlags, obj.GetOrientation())))
574 if isinstance(obj, wx.GridSizer):
575 st.append(self.Fmt('cols', obj.GetCols()))
576 st.append(self.Fmt('rows', obj.GetRows()))
577 st.append(self.Fmt('vgap', obj.GetVGap()))
578 st.append(self.Fmt('hgap', obj.GetHGap()))
579 if isinstance(obj, wx.FlexGridSizer):
580 st.append(self.Fmt('rowheights', obj.GetRowHeights()))
581 st.append(self.Fmt('colwidths', obj.GetColWidths()))
582 st.append(self.Fmt('flexdir',
583 FlagsFormatter(orientFlags, obj.GetFlexibleDirection())))
584 st.append(self.Fmt('nonflexmode',
585 FlagsFormatter(flexmodeFlags, obj.GetNonFlexibleGrowMode())))
586 if isinstance(obj, wx.GridBagSizer):
587 st.append(self.Fmt('emptycell', obj.GetEmptyCellSize()))
588
589 if obj.GetContainingWindow():
590 si = obj.GetContainingWindow().GetSizer().GetItem(obj)
591 if si:
592 st.append('')
593 st += self.FmtSizerItem(si)
594 return st
595
596
597 class FlagsFormatter(object):
598 def __init__(self, d, val):
599 self.d = d
600 self.val = val
601
602 def __str__(self):
603 st = []
604 for k in self.d.keys():
605 if self.val & k:
606 st.append(self.d[k])
607 if st:
608 return '|'.join(st)
609 else:
610 return '0'
611
612 orientFlags = {
613 wx.HORIZONTAL : 'wx.HORIZONTAL',
614 wx.VERTICAL : 'wx.VERTICAL',
615 }
616
617 itemFlags = {
618 wx.TOP : 'wx.TOP',
619 wx.BOTTOM : 'wx.BOTTOM',
620 wx.LEFT : 'wx.LEFT',
621 wx.RIGHT : 'wx.RIGHT',
622 # wx.ALL : 'wx.ALL',
623 wx.EXPAND : 'wx.EXPAND',
624 # wx.GROW : 'wx.GROW',
625 wx.SHAPED : 'wx.SHAPED',
626 wx.STRETCH_NOT : 'wx.STRETCH_NOT',
627 wx.ALIGN_CENTER : 'wx.ALIGN_CENTER',
628 wx.ALIGN_LEFT : 'wx.ALIGN_LEFT',
629 wx.ALIGN_RIGHT : 'wx.ALIGN_RIGHT',
630 wx.ALIGN_TOP : 'wx.ALIGN_TOP',
631 wx.ALIGN_BOTTOM : 'wx.ALIGN_BOTTOM',
632 wx.ALIGN_CENTER_VERTICAL : 'wx.ALIGN_CENTER_VERTICAL',
633 wx.ALIGN_CENTER_HORIZONTAL : 'wx.ALIGN_CENTER_HORIZONTAL',
634 wx.ADJUST_MINSIZE : 'wx.ADJUST_MINSIZE',
635 wx.FIXED_MINSIZE : 'wx.FIXED_MINSIZE',
636 }
637
638 flexmodeFlags = {
639 wx.FLEX_GROWMODE_NONE : 'wx.FLEX_GROWMODE_NONE',
640 wx.FLEX_GROWMODE_SPECIFIED : 'wx.FLEX_GROWMODE_SPECIFIED',
641 wx.FLEX_GROWMODE_ALL : 'wx.FLEX_GROWMODE_ALL',
642 }
643
644 #---------------------------------------------------------------------------
645 from wx import ImageFromStream, BitmapFromImage
646 from wx import EmptyIcon
647 import cStringIO
648
649
650 def getRefreshData():
651 return \
652 '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x18\x08\x06\
653 \x00\x00\x00\xe0w=\xf8\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
654 \x05\xe8IDATH\x89\x9d\x96]h\x94\xd9\x19\xc7\x7f\xefG21\x93\x99Il\xcc&\x18w\
655 \x1c?\xe2GK\xa5kb\x8d\xd3(+\xcb\xd2-\x0b-4A\xf1\xc6\xcb\x8a\xdaz\xa7\xd8\x9b\
656 zQ\xe8\x85R\xd3\xd0\x1a\x97\x06w\xad\xa8\x14/z%\x85\xd2\x85\xe2\x17\xedEK\
657 \x83\xd4\xc4X\x1b\x9bL\x98L\xdf\xc9d\xbe\'\x99\xc9{\xfe\xbd\xc8$\xc4e\xa1\
658 \xd0\x07\x0e\x1c\x0e\xcf\xc7y\xfe\xe7\xff<\xcf\xb1\xf8\xdfr\x008\x03|\x0bp\
659 \x00\x0b\xf0\x81\xa7\xc0\'\xc0\xdf\xbe\xccH\xabz\xb8\x1b\xce\x9c\xba!\xc0\
660 \x07\xc0\xbf\x81\x92\xe38\xef\xf8\xbe\xff.\xf0\xb5\xae\xae\xae%\x80d2\xd9\
661 \xd4\xd0\xd0\x90\xd9\xb9s\xe7\xf6\xc9\xc9\xc9y\xa0\x19\x88\x01\x9f\x03\x06p,\
662 \xf0\x05\x96\xfb\x05\xe7[\x80\x9f\xb9\xae{d\xeb\xd6\xad%\xd7u\x7f\xf0\xfa\
663 \xf5\xeb\xd7\xb6m[\x03\x03\x03\x0c\x0e\x0e6Y\x96\xc5\x83\x07\x0f\x98\x98\x98\
664 h\xf4}?\x01\x84c\xb1\xd8\'\xb3\xb3\xb3\x1d+++\x7f\x06~\x0c$\xd7\x82l\xccj\
665 \x8b\xe38\xf7W\xb3[_\x9f\x02W\x81\x7f\x0e\r\r)\x95J\xa9\\.\xeb\xf4\xe9\xd3\
666 \x02fC\xa1\xd0\xcd\xb6\xb6\xb6\xcf6\xda\xd8\xb6\xfd\x00\xe8\xfc2\xd8\xc6\x00\
667 \x85B!\xf5\xf6\xf6\x9aC\x87\x0e\x99\xd6\xd6V\x01joo\xd7\xcd\x9b7\xfdt:\xadR\
668 \xa9\xa4\xb1\xb11?\x14\n\t\xd0\xbe}\xfb\xd4\xdb\xdb\xab\xde\xde^\x13\x0e\x87\
669 \xd7\x02\xfd\xa6\x8e\xca\xba|\xe08\xce?\x00\x1d<x\xd0LMM\xc9\xf3<]\xbatI\xb6\
670 m\xeb\xe2\xc5\x8b\x92\xa4B\xa1\xa0d2)I\xba|\xf9\xb2l\xdb\xd6\x85\x0b\x174??\
671 \xaf\xe9\xe9i\xf5\xf7\xf7\x1b@\xae\xeb\xbe\x04>\xda\x18\xa0g\xfb\xf6\xed\xcf\
672 \x00\xf5\xf5\xf5\xc9\xf3<%\x12\t%\x93I\xcd\xcc\xcc(\x95J\xa9T*)\x9f\xcf+\x97\
673 \xcb\xa9X,*\x95JiffF\xc9dR\x89DB\x8b\x8b\x8b\x1a\x18\x180\x80\xa2\xd1\xe8\
674 \xdf\x81\xfdlH\xa31\x9b\xcd~\xde\xd6\xd6\x16\t\x04\x02_\xf7<\x8fx<NGG\x07\
675 \xa1P\x88\xc6\xc6Fj\xb5\x1a\x96eaY\x16\xc6\x18\x82\xc1 \x91H\x84`0H\xadVcxx\
676 \x98\x87\x0f\x1fZ\x95J\xe5n{{\xfb\xe5\xc5\xc5\xc5\x0c\x90\x078\xd0\xd3\xd3\
677 \xf3\xdd]\xbbv}#\x12\x89\xfc\xaa\xfeP\x9a\x99\x99\xd1\xca\xca\x8a\xb2\xd9\
678 \xac\xca\xe5\xb2\xbe(\x95JE\xd9lV\xd5jU\x9e\xe7)\x18\x0c\xae\xe1\xff\x0b`\
679 \xa7\xe38\x1f\x02\x07\x1c\xe0J\xa1P\xf8\xd8q\x9c\x8f3\x99L_0\x18\x8c\x9c?\
680 \x7f\x9ec\xc7\x8e\xd1\xd8\xd8\x88m\xdb\x14\x8bE\xc6\xc7\xc7y\xf2\xe4\t\xcf\
681 \x9f?\'\x9f\xcf\x13\n\x85\xd8\xb4i\x13\xc6\x18|\x7f\x95\x8d\x13\x13\x13\x94\
682 \xcb\xe5\x0e\xdb\xb6\xfb\x8c1\xfd\xc0n\x80\xe7\x80\xe2\xf1\xb8N\x9e<\xa9\xd1\
683 \xd1Q_\x92\x8a\xc5\xa2r\xb9\x9c$\xe9\xe9\xd3\xa7z\xff\xfd\xf7\xd5\xd0\xd0 \
684 \xdb\xb6u\xf4\xe8Q=z\xf4H\x92\x94\xcb\xe5T(\x14$I\xb7n\xdd\xf2\x07\x07\x07u\
685 \xfc\xf8q\xd9\xb6\xad\xbao^tuuUFFF\x94\xcb\xe5\x94\xcf\xe7\x95L&\xd7\xf7\x92\
686 t\xef\xde=544l\xe4\xban\xdf\xbe-I\xca\xe7\xf3\xca\xe7\xf3*\x14\nJ\xa7\xd3J\
687 \xa5R\x1a\x1d\x1dUww\xf72\xf0\xc2e\xadg\xb8.\xbe\xefcY\x16\xc1`\xf0\xad\x02\
688 \x91\xb4\x0e\x03\x801\x06c\xcc[:\xc5b\x91p8\x8ceY\xd8\xb6\x8deY\x00\x96\x03\
689 \xfc\xa8T*\xbd\xb3\xb4\xb4\xc4\xe3\xc7\x8fYZZ2\x87\x0f\x1f\xb6|\xdf\xc7\x18C\
690 \x10 \x9f\xcf\xf3\xea\xd5+fgg\x91\xc4\x91#G\x18\x1a\x1a"\x1a\x8d\xb2\xbc\
691 \xbc\x8cm\xdbl\xde\xbc\x99\xfb\xf7\xef\x9b\x91\x91\x11\xeb\xd9\xb3g\x8c\x8f\
692 \x8f;@\xca\x02\xae\x00\xbd\xb6m7\x19cvttt\xc4\xce\x9c9\xc3\xb9s\xe7\x08\x87\
693 \xc3\x00\x14\n\x05&\'\'\x99\x9e\x9e\xc6\x18\xc3\x8e\x1d;\xd8\xbbw/\xe1p\x18I\
694 T*\x15FFF\x18\x1e\x1e&\x97\xcb\xcduvv\xcef2\x99\x95j\xb5\xfa\x02\xa0\xc3q\
695 \x9c\xe3\xf5\xc2\xf8\xf9\xffK\xd3\xe6\xe6f\x01\n\x87\xc3\xb7zzz\xfa\xf6\xec\
696 \xd9\xf3}\xe0=\x07(I\xaa\xc5b\xb1`6\x9b=\x1a\x89D\xde;{\xf6,\x03\x03\x03\x04\
697 \x83A\\\xd7\xc5\x18C\xa5R\xa1Z\xadR\xadV\xd7a\t\x04\x02\x00,//S\xab\xd5X\\\\\
698 \xa4T*M\xce\xcd\xcd\xfdqaa\xe1_\xc0\xcb\xb57\xda\xb5\xb1U\xcc\xcf\xcf+\x91H\
699 \xc8\xf3<y\x9e\xa7\x85\x85\x05\x15\n\x85\xb7\x18\x93\xc9d\xe4y\x9e\xd2\xe9\
700 \xb4\x12\x89\x84\xd2\xe9\xb4\xe2\xf1\xb8\x00\xc5b\xb1g\xc0>\x81e\xd7\x03lO\
701 \xcc\xcdm^#M\xa5R!\x18\x0cr\xfd\xfau\xa2\xd1(W\xaf^\xa5\xa5\xa5\x85r\xb9\x0c\
702 @KK\x0b7n\xdc \x1a\x8dr\xed\xda5\x9a\x9a\x9aXZZB\x92\x00\x12\x89\xc4\x16 f\
703 \x81\x10XC\xab=\xe9\xd3:\x86\xea\xef\xef7\xf1x\xdc\xec\xdf\xbf_\x80ZZZ466\
704 \xe6\xe7\xf3ye\xb3Y\xdd\xb9s\xc7\xef\xec\xec\x14\xa0\xd6\xd6V\xc5\xe3q\xc5\
705 \xe3\xf1\xf5\xf6\x0e\xdc\x05\x1aW\xaf[\xaf\x03\xa0\xab>,\xd6\x0b\xaa\xb5\xb5\
706 \xf5\xb7\xe1p\xf8\xd7\xc0\xec\x89\x13\'\x94\xcb\xe5\x94\xc9dt\xea\xd4)\x01o\
707 \x80_\x02\x9fm\xb4q]\xf7w@\xf7\x9ao\x17\xe0 4\xfc\x15\x92\xc6\x98\x1f\x02\
708 \x15\xd7u\xbf\xd9\xdd\xdd\x9d\x7f\xf3\xe6\xcdOw\xef\xde\xed477\xefK&\x93\xdd\
709 w\xef\xde\xc5u]<\xcf\xc3\xb6\xed\x97\xc6\x98\x91X,\xd6$\xe9\xabsssm\xb5Z\xed\
710 /+++\x97\x80\x04\xab\xa8\x18~\x02v=\x8b\x8d\xf3\xf9\xa3:m\xb7\xf6\xf4\xf4|/\
711 \x10\x08\xfc\tPww\xf7\xf2\xb6m\xdb\x96\x1d\xc7\x11\xf0\x07\xc7q\xbe\r\xbc\
712 \x0b\xec\x05\xbe\xb3\x0eK}\x0c\xacgp\x05,\xad\x0eh\x0b0\x16\xfc~\x8d^SSS\xed\
713 \xc0\x04\xf0\x95D"\xb1\xf1\xdb2\xed\xfb\xfe\x7f\x80\x99\xba\xead\xfd\xa2\x16\
714 \xab?\x0b\x0b\xe0\xbf\xf5\x19yJo\xfcW\xe3\x00\x00\x00\x00IEND\xaeB`\x82'
715
716 def getRefreshBitmap():
717 return BitmapFromImage(getRefreshImage())
718
719 def getRefreshImage():
720 stream = cStringIO.StringIO(getRefreshData())
721 return ImageFromStream(stream)
722
723 #----------------------------------------------------------------------
724 def getFindData():
725 return \
726 '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x18\x08\x06\
727 \x00\x00\x00\xe0w=\xf8\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
728 \x06\x04IDATH\x89\xb5\x95Mh\x1b\xdb\x15\xc7\xffs\xe7\x8e4\xfa@V%K\xc6\r\x91\
729 \x12^\xeb$d\xf3\x08\xc1V\xa8\xc9\xb3i\xe2x\x97\x10(]$\xf0\xc0!i> i\xc0\x8bR(\
730 \xcf\xdd\xb4\xf1\xaad\xd7E\x9cdS\x08\xdd\x98.\x82\xbc0\xe9\xc3q)\xc6\xa4v\
731 \x82\xbf\x82\x15;\x93\x91,[c\xcb\x965\xdfsgn\x17\x0f\xf9\xb9\xa4o\xd7\x1e\
732 \x18\xb8w8s\x7f\xf7\xf0\xff\x9f3\xc0\xff9\x84\xc3\x9b\xb1\xb1\xb1\xdf\xf8\
733 \xbe\xff\xc7\xd7\xaf_C\x92$\x00\x80\xe388u\xea\x14\xb2\xd9\xec\xb7\xb7n\xdd\
734 \xea\x07\x80\'O\x9e\x145M\x1b\\XX@8\x1c\x06\x00x\x9e\x87\xde\xde^PJ\x7f\x7f\
735 \xe3\xc6\x8d\x91\xcfH\xe3\xe3\xe3\xc3\xf7\xee\xddc\xf9|\x9e\x038xB\xa1\x10/\
736 \x14\n\xfc\xfa\xf5\xeb\x7fo\xe5^\xbbv\xad\xd8\xdb\xdb{\x90C\x08\xe1\xa2(\xf2\
737 \\.\xc7o\xdf\xbe\xcd\xc6\xc7\xc7\x7f\xdb\xca\xa5\xad\x85\xef\xfb_\x11B\xc4\
738 \xcd\xcdMv\xf5\xeaUZ(\x14P.\x97\xf1\xfc\xf9s\xcc\xcd\xcdA\x10\x04\xab\x95\
739 \xbb\xb6\xb6f\xce\xcc\xcc\xe0\xf4\xe9\xd3\xb8s\xe7\x0e&\'\'Q\xab\xd50;;\xcb\
740 \x04A\xa0\x8c\xb1~\x00\x7f\xf8\x0f\x00\xa5t\xbb^\xaf#\x91H\xd0\x0b\x17.\xe0\
741 \xca\x95+X[[\xc3\xabW\xaf\xf0\xe9\xd3\'tuu}q\xe6\xcc\x99\xaf\t!\xac\xd9l\x9e\
742 x\xf3\xe6\rN\x9e<\x89\x9b7o\x82R\nUUQ*\x95\xe8\xee\xee.(\xa5\xdb\x9fU \xcb2\
743 \x18c\xd04\r333\xd8\xda\xda\x82\xef\xfb\xd8\xde\xde\x86,\xcb,\x9dNwy\x9e\xf7\
744 \\\x10\x04\xa4R)$\x93Io~~^z\xfc\xf81\x16\x17\x17!\x08\x024M\x83m\xdb\x08\x85\
745 B\xf8\x0c\xe0\xba.8\xe7 \x84@\x14E\xd4\xebuX\x96\x85 \x08\x10\x04\x01U\x14%0\
746 M\xd3\x01\x80X,\x16\xe6\x9cK\xb6mcuu\x15\x9a\xa6!\x9dN\x1f\x18\x831v\x00 \
747 \xad\xc5\x87\x0f\x1f\x9a\x8a\xa2@\x14Ed\xb3Yx\x9e\x87b\xb1\x08\xc7q\xd0\xd3\
748 \xd3\x83l6\xfb\x8fb\xb1\x18-\x16\x8b\xd1l6\xfb\xea\xdc\xb9s0\x0c\x03\x13\x13\
749 \x138v\xec\x18\x18cp]\x17\xd5j\x15+++\x07\x00\x11\x00\xee\xde\xbd\xfb\xbb\
750 \xb7o\xdf\xde\x92e9\xd2\xdd\xdd\r]\xd7111\x81J\xa5\x02Y\x96q\xf6\xecY\xd8\
751 \xb6M\xdf\xbd{w\x04\xc0\x85\xae\xae\xae\xaf\x92\xc9d\xdb\xd2\xd2\x12j\xb5\
752 \x1a4MC>\x9fGGG\x07$I\x82\xaa\xaa\xd3\xa5R\xe9\xe5\x01\xa0\xbb\xbb\xfbo\xab\
753 \xab\xab?\xda\xda\xdab\xc9d\x92\xcc\xce\xceBQ\x14\xc8\xb2\x8c\\.\xc7\xc2\xe1\
754 0\xd1u=a\x9a\xe6\xb9x<\xfe\xb3x<\xde\xe6\xba.\x0c\xc3`\xf5z\x9d\xec\xed\xedA\
755 \x14Ed2\x19\xa8\xaa\x8ar\xb9\xdcv\xff\xfe\xfd\xad\xa9\xa9\xa9E\n\x00\xe1p\
756 \xf8c\xa5R\xf9\xd24MZ(\x14\xd0\xdf\xdf\x8fK\x97.AUU\xac\xaf\xaf\xd3\x85\x85\
757 \x85R4\x1a-\xa7R\xa9>\x00(\x97\xcbS\x8dF\xa3#\x9f\xcf\x9f\x18\x18\x18\x80(\
758 \x8a\xd0u\x1d\xd5j\x15\xef\xdf\xbf\xf7r\xb9\xdcO\x1b\x8d\xc6_\x00\xfc\x15\
759 \x00\xf0\xf0\xe1\xc3\xb9T*\xc5\x07\x06\x06x\xadV\xe3\x86a\xf0\xf5\xf5u><<\
760 \xcc\xdb\xda\xda8\x80a\x00\x91C\r\x98\x04p\xbb\xaf\xaf\x8f+\x8a\xc2\x9b\xcd&\
761 \xd74\x8d\x8f\x8c\x8cpY\x96y.\x97\xe3\x0f\x1e<X>p\x11!\x04\x94R\xe8\xba\x0eU\
762 U\x11\x89DP*\x95\xa0\xebz\xcb\x19\x0c\x80{\xa8\xf1=\x00\xbe\xe38PU\x15\x86a`\
763 cc\x03{{{\x90$\t\x82 \x80\x10\xf2\xbdM\x1d\xc7qL\xd3\x84\xa6i\xd8\xdc\xdc\
764 \x84,\xcbX^^\x86i\x9a\xadY\xf3+\x00\x83\x87\x00\xe3\x00~\xec8\x0e*\x95\n<\
765 \xcf\xc3\xca\xca\nvvv`\x9a&$I\x82\xe38.\x00\x88ccc#/^\xbc\xf89\x80x\xa1P@gg\
766 \'l\xdbF\xb5ZE\xbd^\xc7\xf2\xf2\xb2\xc79\xef\xe8\xe9\xe9\xf9\xc9\xf1\xe3\xc7\
767 \x91\xcf\xe7q\xf4\xe8\xd1/\xca\xe5r6\x91Hx\xdd\xdd\xdd\xa2\xeb\xba(\x97\xcb\
768 \x90$\t\xed\xed\xedh4\x1a\xa8T*\xe2\xa3G\x8fb\x941\xf6\xcd\xe2\xe2".^\xbc\
769 \xe8\x9f?\x7f^\xacV\xabH&\x93p\x1c\x07\x9cs\xd8\xb6-\xe5r9\x0c\x0e\x0en\xeb\
770 \xba\xfe-\x80 \x1e\x8f\xf7U\xab\xd5\xaca\x18\x92i\x9ap\x1c\x07\xba\xae#\x1a\
771 \x8d\xe2\xf2\xe5\xcb`\x8c\xf9/_\xbelg\x8c}C\xa6\xa7\xa7\xc19G&\x93\x11=\xcf\
772 \xc3\xce\xce\x0el\xdb\xc6\xce\xce\x0e\x18c\xa0\x94\x82\x10\x82\xfd\xfd\xfd\
773 \x7f\x8d\x8e\x8e\xfebtt\xf4\x97\xcdf\xf3\x9f\x94R\xb8\xae\x8bz\xbd\x0e\xdb\
774 \xb6\xd1h4\xa0(\n,\xcbB&\x93\x11\x01`zz\x1a\xa4%\x8aeY`\x8c\x81\x10\x02\xc7q\
775 @\x08\x81 |\xf7\xbb\xe0\x9c\x83s\x1e:\xa4A\xb85V\x04A\x80\xe38\x10\x04\x01\
776 \xa1P\x08\x9e\xe7\xc1\xb2\xbe\x1b\xbc\x92$\xa1\xd5\x07(\x95J\x90e\x19\xae\
777 \xebbww\x17\x86a\xc0\xf7}\xfcPPJa\x18\x06VWW\x11\n\x85`\x9a&,\xcb\xc2\xdc\
778 \xdc\x1cJ\xa5\xd2\xc1\\\xa2\xad\x1b\x8a\xa2\x88T*\x85X,\x86L&\x83\x8f\x1f?"\
779 \x08\x02\xc8\xb2\xfc_AA\x10\x80R\x8a\xce\xceNttt@UUloo\x831\x06\xcb\xb2\xbe\
780 \xb7i$\x12A\x10\x04PU5XZZ"\xd1h\x14\xf1x\x1c\x8a\xa2 \x08\x02\xd4j5?\x9dN\
781 \x8b\x00\xda\x0f\x1d\xdeN)E\xbd^\xf7\xe7\xe7\xe7\xc5t:\rUU\xd1l6\xc19\x87\
782 \xa2(\x81\xef\xfb$\x12\x89\x80Z\x965\x7f\xe4\xc8\x91\x13\x1b\x1b\x1b\x91\xa9\
783 \xa9)p\xce\x11\x04\xc1A\x89\x92$\x89\xf1x\x1c\x00\xa6Z\x00B\xc8\xebX,vV\x92$\
784 qrr\x12\xbe\xefC\x92\xa4\xc3\xba\x91\xce\xceN\xc7\xb2\xace\x01\x00\x86\x86\
785 \x86\xe6"\x91\xc8\x97-q\x0eG"\x91@\xa3\xd1\xf8\xf3\xb3g\xcf\xee\x1c~?44\xf4\
786 \xa7D"\xf1\xeb\xfd\xfd\xfd\xcf\xbe\x91e\x19\xb6m\xaf<}\xfa\xf4\xd4\x0f\x8a\
787 \xf8\xbf\x8a\x7f\x03\x7f_\x17\xc3%\x00\xe7\xe4\x00\x00\x00\x00IEND\xaeB`\x82\
788 '
789
790 def getFindBitmap():
791 return BitmapFromImage(getFindImage())
792
793 def getFindImage():
794 stream = cStringIO.StringIO(getFindData())
795 return ImageFromStream(stream)
796
797 #----------------------------------------------------------------------
798 def getShowSizersData():
799 return \
800 '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x18\x08\x06\
801 \x00\x00\x00\xe0w=\xf8\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
802 \x04(IDATH\x89\xb5\x95Mh\\U\x14\xc7\x7f\xf7\xdey\xf7\xcd\xbcy\x99\xc9\xb43\
803 \x93\x99\xc4iM\x02~\x97R\xa9Q(\x82\x16*\xb5\xeaFP\x8b;\x0b\xe2\xb6\xba(\xa8\
804 \xa0\xe0F\x17"\xaeD\xa9\x8a\x04\x84\n]\x16\x05\xadt\xe1B\xa8H\x8a\x0bK\xc4\
805 \xd6\x966\xb553\x93\xc9L\xf3\xe6\xcd\xfb\xb8\xd7EZ\x9b\xa6%)-\x1e\xb8\xab\
806 \xcb\xff\xfc\xce=\xfc\xcf\xb9\xf0?\x87X\xe7\xfe\xc1R\xa9\xf4\xaa\xeb\xba\xdb\
807 \xad\xb5\x8b\xd7\t\x85(\xc6q<\xd3j\xb5\x0e\x02\xbf\xdd\x16}lll\xbf7\xe4\x9d\
808 \x92\xc8(Cf\xe1\xdaaAB\x94\xf3\xbd\xd3\xf5z\xfd\xc0Z92k]*\xa5\xee2=\xb3\xd9\
809 \xdcg\x94y\xc1\x0c\xb3\x04(`\xae\x08\xdf\x0f\xb0\xcdh\xb3\xde\xa8\x1b\xb7\r\
810 \x00B\x81\xe8\xb3\x05\x9f7\x1c\x98-\x816\xf0g\x15~\xbf\x08\xcdN`\x8c\xe9\xdf\
811 \t`9b\xe0\xaf\x1c\xfc4\t\x19\x0b\x84`\xe3[\x92\xde\x1a \x05Z1\x9ci\x82\xb2Pr\
812 \xc0\xc2\xfa\x1eY\x07 \xa5\xcc\xd9\x8c\xcd\xf3\x03p\xa2\x0f\x97\xcf\x02X\xa4\
813 \x15tbp\xdc\xbc\x94\xd2[+\x87Z\xb3\xf04U\xd2\x95%\xdf\xf8\xa1j\x89f\x14\x86U\
814 \xc2Tx}\xe7\xe4\x90?4g\xb5:\x11\x06\xfdo\xa2(\x9a\xbd-@\x14E\xedJ\xb9RP\xae\
815 \xba\xa7\x9f\x86\x15\xadu\xe48N`\x14*_\xf0\xdb^.\xf7m\xb3\xd9<\x02\x04W$7\
816 \xf4l-@\xaeX,N%I\xb2\xa7\xd7\xeb\xedJ\xd3tP.\x97\xa7}\xdf\xff\xb5\xdb\xedn\
817 \x1d\x0c\x06\xf7Zk\x17\xb4\xd6\x97\x06\x83\xc1E\x96\xadpS\xc8\xcd\xa2\xa8\
818 \x94z\xaeV\xab\x1d\xd2Z[\xaduk\xd3\xa6M\xef\x00\xdb\x81m\x8dF\xe3m\xd7u\xe7\
819 \x1d\xc7\xb1###\x87\x95R\xcf\x03\xa5\xf5\x92^%+\xa5\xd4\xee\xb1\xb1\xb1O\x94\
820 RK\x9e\xe7\x85\xe5r\xf9K\xe0\xb1\x15/~\xa4R\xa9|\x9e\xcf\xe7\x97\xa4\x94\xc1\
821 \xe8\xe8\xe8A\xa5\xd43\\3\xcd\x7f\xaf\xb8\xa1E\xf9|~g\xa1Px\xa5\xd9l\xee\xd5\
822 Z\xf7]\xd7=\x94$\xc9g\x83\xc1\xe08W\xcc\t\\\x00\xe6\xb4\xd6J\x081\xd9\xedv\
823 \xa7J\xa5\x92\'\x84h\xc7q|ze>\x05\x8c4\x1a\x8d\x1d\xb5Zm\x8b\xef\xfb\x0f\'I\
824 \xf2b\xbf\xdf\x7fVJ9_.\x97g\x93$9\xd2\xe9t\x8e\xb2<\r\xe2juq\x1c7\xb3\xd9l\
825 \xb1T*\xd5\xc20TI\x92l\xd5Z\xfb\xd5j5;222\xe1\xfb\xfe\xf8\xe2\xe2bOx\x9ew\
826 \xc0q\x9c\x971\xe9\x03\x12\xd3\t\x07Q\xa1\x1f%\xee\xb0\xe2g<\xbf\x90\x085c\
827 \x92\xf8\xa3 \x08fVV\xe6y\xde\xd6\x8c\x94\xfbQj\xaa/M\x10/\xf4\xb6\x93u\x02\
828 \'\xe7-(c6d\x91\xa7\xa38\x9e\xa6^\xaf\x1f\x93B$\x08eqr-\x94\x9e\xc7\xcd\xcfS\
829 \x1a\xb5 \xedP\xde\xebOLL\xbc\xb6\xba\x95\xe3\xe3\xe3\xfb\xfc\xc2P\x1f\xb0%T\
830 \xb8\x91Lg\x18uy\x03*\xc8\x81E\x8a\xb4^\xaf\x1f\xcb\x18c\x02a\xad\xe2\xa1]_\
831 \xf1\xe9w\xd3\xfc8\x93\xc5u\xef\xc6\xcd|\xc8\xc7/y\x9c=\x11\x00\xd1ML\x11-\
832 \xd94\xad\x91\xe9\x9fdj\xda`\x92\x90T\x8cR\xe8\xbd\xc9\xc9G?\x10\x17\x9e0\
833 \xc6\x04\xd7V\x85\x10\x97\xd8\x81\xcf?\xdb\x9e$%O\x7fI!\xd7\x9cC,\x08\t\xf10\
834 C\x01dw\x82\xaat\t\x83K\xc8\n\x10\xc2\xca]\x94\xda9R&\xb1\xbc\x8e\xa4\xcdP^#\
835 \xe4\x9a\x00@d\x10)x\xe1,K\x93\x92\x8c? %\x8b\x06\xe8\x01d\x84\x109\x0bp\xfa\
836 \xf8n\xf6\xbe\xe7S\x19\x85\xe0\xf2\x06\x10\xd0\x9e\x83\x0c\x1e,+\xae\xcb,\
837 \x84\xa3\x85t:\xc4\xb9\xb7\xf8\xe5\xf1S\xa4n\x04lD3K\x0f,Y!D.c\x8c9\xa7\xb4>\
838 C\xd8\xde#\x0e\xbf\x0b\xb0\xc0\x95\xf9\xb0\x90\xb7\xc5\xe1\xb3I\x92\xb4V\x03\
839 \xe28n\xe7\x90\x7f,Jq\xff\xfb\xe2\xfc\x0e`\x89\xe5\x9d$\xb0hW\xe9\xb61\xe6\
840 \x9c\x00\x9e\xaeV\xab{\xa5\x94\rk\xedu\xbf\x93\x10\xa2\x10\x04\xc1\xd1n\xb7\
841 \xfb\x05p~\x15c\xd4\xf7\xfd}\xbe\xef?e\xad\xed\xad\xd2e\xd34\xfd{~~\xfe\xeb\
842 \xf5z|\xc7\xf1/Y%\x9eF\x90EP\xda\x00\x00\x00\x00IEND\xaeB`\x82'
843
844 def getShowSizersBitmap():
845 return BitmapFromImage(getShowSizersImage())
846
847 def getShowSizersImage():
848 stream = cStringIO.StringIO(getShowSizersData())
849 return ImageFromStream(stream)
850
851 #----------------------------------------------------------------------
852 def getShowFillingData():
853 return \
854 "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x18\x08\x06\
855 \x00\x00\x00\xe0w=\xf8\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
856 \x01\x9eIDATH\x89\xed\x95\xcfJ\x02A\x1c\xc7?\xad\xbb\xb3\xb1-\x14\xae\x19E\
857 \xed!\xf5)\xbaE\xbd@\x97\x0e\xdez\x84.\x82\xd7.\xbd\x81\xb7\x8e\xddD\x10*\
858 \x83\x12z\x06\xa30<\x97\xb4\x14Ibh\xb3k\x17\x15u\xcdv\xadc\xdf\xd303\xdf\xef\
859 g\x86\xdf\xfc\x81\x7f\xfd\xa0\xb9\xa1\xf6\x0e\xb0\x0b\xac\x00\xed\x19\xf3\
860 \x04\xf0\x02\x94\x80+\x00uhp_U\xd5m)\xe52\xd0\x99\x11\xa0)\x8a\xfa\xeayrq\
861 \x12`CJ\xb9~tt(67\xf78?\x7f\xc64\x83'\x9b\xe62\xb7\xb7g\\^\x1e/\x00\x1b\xfd\
862 \xfea\xc0\x07\xf0a\x18I\xb1\xba\xba\x85m?b\x18\xc1\x01KKk<==\x0cr&\x01\x00\
863 \xb8\xb9\xb9G\xd3\xae\xb1,\x07\xcf\x0b\x0e\xd0u\x0bM\xbb\x03\xe8~7\xa7\x00\
864 \xbc\x15\n\xf9\xee\xac\xba\xb88\xeb\x02\xef\xbd,\x00\x94qJ\xbb\xfd\x19|\xd9\
865 \x01\xbc>\x80\x10bf\xc0$\xaf\xaf\x06\x8dF\x03\x80f\xb3\x19*\xdc4\xcd\x81w* \
866 \x97\xcbQ.\x97i\xb5Z\xa1\x00\x86aP\xab\xd5`\xac\xc8>@\xa5R\xa1Z\xad\xe2\x859\
867 B\x80\xa2(t:\xfe\xfb\xe9\x03d2\x19\xd2\xe94\xf5z=\x14 \x1e\x8f\x93\xcf\xe7\
868 \xc9f\xb3\xd3\x01\x89D\x82d2\x89m\xdb\xa1\x00B\x08R\xa9\x14\x8c\xbeo~\x80\
869 \xae\xeb\x03CX\xf5\xbc#5\xf0\x1d\xd3h4\x1a:\xb8/\xcb\xb2`\xca\x0e\xe6\x81\
870 \xf9b\xb1\x08\x80\xe38\xa1\xc2c\xb1\x18\xa5R\t@\xefe1N;\xf9\x8b\xe7:\x12\x89\
871 \xbc\xba\xae{\x05\x1c\xc0\xe8\x0eN\xa5\x94\x0e\xbf\xfcp\\\xd7\xed\x7f8\xff\n\
872 \xa6/8\xf7\xb7\xf5\xb4m\x07\xcd\x00\x00\x00\x00IEND\xaeB`\x82"
873
874 def getShowFillingBitmap():
875 return BitmapFromImage(getShowFillingImage())
876
877 def getShowFillingImage():
878 stream = cStringIO.StringIO(getShowFillingData())
879 return ImageFromStream(stream)
880
881 #---------------------------------------------------------------------------
882
883 def getIconData():
884 return \
885 '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \x08\x06\x00\
886 \x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x00\
887 \xb8IDATX\x85\xed\x97\xcd\x12\x83 \x0c\x84w\x91\xf7\xd6>x\x9b\x1e,\x07Gl\x93\
888 4N8\xb07gH\xf8\xc8\x1fB\x96\x05\x99*\xa9\xbbO\x80\x11\x00\xea\xaf\x05\xf2z\
889 \x8a\xc71\xcb\xc2\x10\x80]\x9bq{\xfd\xfa\xf4\x14\xa8\x01DV\x88\xacy\x00w)\
890 \x1d@Y\x84\x1am\x87/m\xf7\x04\x02\x00blX\x12\xa8\xde>\x8fR\x05\x80o\x04\xaai\
891 rP\xf3\xa6\xb3\x1c\xa8\x08[\x02\xd9\'\'\x1f\xb7\x00\xa4G\x80hg\xbf\x88\x80\
892 \xa5\x06>\x8e\xd4\x96\xa4\xe66\xec\x19\xe2|\xdby\xbb)=\x05\xe9\x00\xa1\x93p\
893 \x97mr\x0c\x14\x81\x8b\xfe\xb7\xc8\xe3",\x05\xda\x7f\xc0.\xc0\xffg\xf7\x8b\
894 \xf3i6\x01\xb2\x01\xde\x86\xde%]y\x9b\xef$\x00\x00\x00\x00IEND\xaeB`\x82'
895
896 def getIconBitmap():
897 return BitmapFromImage(getIconImage())
898
899 def getIconImage():
900 stream = cStringIO.StringIO(getIconData())
901 return ImageFromStream(stream)
902
903 def getIconIcon():
904 icon = EmptyIcon()
905 icon.CopyFromBitmap(getIconBitmap())
906 return icon
907
908 #---------------------------------------------------------------------------
909
910