root/trunk/RBSkinning/RBSkinning/wxPythonSkin/dockcontainer.py

Revision 610, 2.3 kB (checked in by sholloway, 6 years ago)

Fixed some titling problems with notebook dock hosts

Line 
1 #!/usr/bin/env python
2 ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 ##~ License
4 ##~
5 ##- The RuneBlade Foundation library is intended to ease some
6 ##- aspects of writing intricate Jabber, XML, and User Interface (wxPython, etc.)
7 ##- applications, while providing the flexibility to modularly change the
8 ##- architecture. Enjoy.
9 ##~
10 ##~ Copyright (C) 2002  TechGame Networks, LLC.
11 ##~
12 ##~ This library is free software; you can redistribute it and/or
13 ##~ modify it under the terms of the BSD style License as found in the
14 ##~ LICENSE file included with this distribution.
15 ##~
16 ##~ TechGame Networks, LLC can be reached at:
17 ##~ 3578 E. Hartsel Drive #211
18 ##~ Colorado Springs, Colorado, USA, 80920
19 ##~
20 ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21
22 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 #~ Imports
24 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25
26 from layout import wx, layout
27 from RBSkinning.wxTools import wxDockingTools
28
29 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 #~ Definitions
31 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32
33 class wxSkinDockContainer(wxDockingTools.wxDockContainer):
34     def DockHostContext(self):
35         dh = self.DockHost()
36         if dh is not None:
37             return dh.DockContext()
38
39     def SetItemMinSize(self, *args, **kw):
40         pass
41
42 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43
44 class dockcontainer(layout):
45     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46     #~ Constants / Variables / Etc.
47     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48
49     default_settings = layout.default_settings.copy()
50     default_settings.update({
51         #'dockhost': 'ctx.dockhost'
52         })
53
54     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55     #~ Public
56     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57
58     def SkinInitialize(self):
59         # Create the layout sizer
60         self.object = wxSkinDockContainer()
61         for name, value in self.settings.iteritems():
62             if isinstance(name, str) and name not in ['ctxvar','ctxnode']:
63                 setattr(self.object, name, value)
64         self.wxInitialStandardOptions()
65         self.PushContext()
66
67     def SkinFinalize(self):
68         self.wxFinalStandardOptions()
69         dockhost = self.wxEvalCond('dockhost', None)
70         self.object.DockTo(dockhost)
71
Note: See TracBrowser for help on using the browser.