ID_SizeReportContent = wx.NewId()
ID_CreatePerspective = wx.NewId()
ID_CopyPerspective = wx.NewId()
-ID_AllowFloating = wx.NewId()
-ID_AllowActivePane = wx.NewId()
+
ID_TransparentHint = wx.NewId()
-ID_TransparentHintFade = wx.NewId()
+ID_VenetianBlindsHint = wx.NewId()
+ID_RectangleHint = wx.NewId()
+ID_NoHint = wx.NewId()
+ID_HintFade = wx.NewId()
+ID_AllowFloating = wx.NewId()
+ID_NoVenetianFade = wx.NewId()
ID_TransparentDrag = wx.NewId()
-ID_DisableVenetianBlinds = wx.NewId()
-ID_DisableVenetianBlindsFade = wx.NewId()
+ID_AllowActivePane = wx.NewId()
ID_NoGradient = wx.NewId()
ID_VerticalGradient = wx.NewId()
ID_HorizontalGradient = wx.NewId()
+
ID_Settings = wx.NewId()
ID_About = wx.NewId()
ID_FirstPerspective = ID_CreatePerspective+1000
+
+
#----------------------------------------------------------------------
def GetMondrianData():
return \
wx.Frame.__init__(self, parent, id, title, pos, size, style)
# tell FrameManager to manage this frame
- self._mgr = wx.aui.FrameManager()
+ self._mgr = wx.aui.AuiManager()
self._mgr.SetManagedWindow(self)
self._perspectives = []
view_menu.Append(ID_SizeReportContent, "Use a Size Reporter for the Content Pane")
options_menu = wx.Menu()
+ options_menu.AppendRadioItem(ID_TransparentHint, "Transparent Hint")
+ options_menu.AppendRadioItem(ID_VenetianBlindsHint, "Venetian Blinds Hint")
+ options_menu.AppendRadioItem(ID_RectangleHint, "Rectangle Hint")
+ options_menu.AppendRadioItem(ID_NoHint, "No Hint")
+ options_menu.AppendSeparator();
+ options_menu.AppendCheckItem(ID_HintFade, "Hint Fade-in")
options_menu.AppendCheckItem(ID_AllowFloating, "Allow Floating")
- options_menu.AppendCheckItem(ID_TransparentHint, "Transparent Hint")
- options_menu.AppendCheckItem(ID_TransparentHintFade, "Transparent Hint Fade-in")
+ options_menu.AppendCheckItem(ID_NoVenetianFade, "Disable Venetian Blinds Hint Fade-in")
options_menu.AppendCheckItem(ID_TransparentDrag, "Transparent Drag")
- options_menu.AppendCheckItem(ID_DisableVenetianBlinds, "Disable Venetian Blinds Effect")
- options_menu.AppendCheckItem(ID_DisableVenetianBlindsFade, "Disable Venetian Blinds Fade-in")
options_menu.AppendCheckItem(ID_AllowActivePane, "Allow Active Pane")
- options_menu.AppendSeparator()
+ options_menu.AppendSeparator();
options_menu.AppendRadioItem(ID_NoGradient, "No Caption Gradient")
options_menu.AppendRadioItem(ID_VerticalGradient, "Vertical Caption Gradient")
options_menu.AppendRadioItem(ID_HorizontalGradient, "Horizontal Caption Gradient")
- options_menu.AppendSeparator()
+ options_menu.AppendSeparator();
options_menu.Append(ID_Settings, "Settings Pane")
-
+
self._perspectives_menu = wx.Menu()
self._perspectives_menu.Append(ID_CreatePerspective, "Create Perspective")
self._perspectives_menu.Append(ID_CopyPerspective, "Copy Perspective Data To Clipboard")
tb5.Realize()
# add a bunch of panes
- self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.PaneInfo().
- Name("test1").Caption("Pane Caption").Top())
+ self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.AuiPaneInfo().
+ Name("test1").Caption("Pane Caption").Top().
+ CloseButton(True).MaximizeButton(True))
- self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.PaneInfo().
+ self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.AuiPaneInfo().
Name("test2").Caption("Client Size Reporter").
- Bottom().Position(1))
+ Bottom().Position(1).CloseButton(True).MaximizeButton(True))
- self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.PaneInfo().
+ self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.AuiPaneInfo().
Name("test3").Caption("Client Size Reporter").
- Bottom())
+ Bottom().CloseButton(True).MaximizeButton(True))
- self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.PaneInfo().
+ self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.AuiPaneInfo().
Name("test4").Caption("Pane Caption").
- Left())
+ Left().CloseButton(True).MaximizeButton(True))
- self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.PaneInfo().
+ self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.AuiPaneInfo().
Name("test5").Caption("Pane Caption").
- Right())
+ Right().CloseButton(True).MaximizeButton(True))
- self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.PaneInfo().
+ self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.AuiPaneInfo().
Name("test6").Caption("Client Size Reporter").
- Right().Row(1))
+ Right().Row(1).CloseButton(True).MaximizeButton(True))
- self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.PaneInfo().
+ self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.AuiPaneInfo().
Name("test7").Caption("Client Size Reporter").
- Left().Layer(1))
+ Left().Layer(1).CloseButton(True).MaximizeButton(True))
- self._mgr.AddPane(self.CreateTreeCtrl(), wx.aui.PaneInfo().
+ self._mgr.AddPane(self.CreateTreeCtrl(), wx.aui.AuiPaneInfo().
Name("test8").Caption("Tree Pane").
- Left().Layer(1).Position(1))
+ Left().Layer(1).Position(1).CloseButton(True).MaximizeButton(True))
- self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.PaneInfo().
+ self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.AuiPaneInfo().
Name("test9").Caption("Min Size 200x100").
BestSize(wx.Size(200,100)).MinSize(wx.Size(200,100)).
- Bottom().Layer(1))
+ Bottom().Layer(1).CloseButton(True).MaximizeButton(True))
- self._mgr.AddPane(self.CreateTextCtrl(), wx.aui.PaneInfo().
+ self._mgr.AddPane(self.CreateTextCtrl(), wx.aui.AuiPaneInfo().
Name("test10").Caption("Text Pane").
- Bottom().Layer(1).Position(1))
+ Bottom().Layer(1).Position(1).CloseButton(True).MaximizeButton(True))
- self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.PaneInfo().
+ self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.AuiPaneInfo().
Name("test11").Caption("Fixed Pane").
- Bottom().Layer(1).Position(2).Fixed())
+ Bottom().Layer(1).Position(2).Fixed().CloseButton(True).MaximizeButton(True))
- self._mgr.AddPane(SettingsPanel(self, self), wx.aui.PaneInfo().
+ self._mgr.AddPane(SettingsPanel(self, self), wx.aui.AuiPaneInfo().
Name("settings").Caption("Dock Manager Settings").
- Dockable(False).Float().Hide())
+ Dockable(False).Float().Hide().CloseButton(True).MaximizeButton(True))
# create some center panes
- self._mgr.AddPane(self.CreateGrid(), wx.aui.PaneInfo().Name("grid_content").
+ self._mgr.AddPane(self.CreateGrid(), wx.aui.AuiPaneInfo().Name("grid_content").
CenterPane().Hide())
- self._mgr.AddPane(self.CreateTreeCtrl(), wx.aui.PaneInfo().Name("tree_content").
+ self._mgr.AddPane(self.CreateTreeCtrl(), wx.aui.AuiPaneInfo().Name("tree_content").
CenterPane().Hide())
- self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.PaneInfo().Name("sizereport_content").
+ self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.AuiPaneInfo().Name("sizereport_content").
CenterPane().Hide())
- self._mgr.AddPane(self.CreateTextCtrl(), wx.aui.PaneInfo().Name("text_content").
+ self._mgr.AddPane(self.CreateTextCtrl(), wx.aui.AuiPaneInfo().Name("text_content").
CenterPane().Hide())
- self._mgr.AddPane(self.CreateHTMLCtrl(), wx.aui.PaneInfo().Name("html_content").
+ self._mgr.AddPane(self.CreateHTMLCtrl(), wx.aui.AuiPaneInfo().Name("html_content").
CenterPane())
# add the toolbars to the manager
- self._mgr.AddPane(tb1, wx.aui.PaneInfo().
+ self._mgr.AddPane(tb1, wx.aui.AuiPaneInfo().
Name("tb1").Caption("Big Toolbar").
ToolbarPane().Top().
LeftDockable(False).RightDockable(False))
- self._mgr.AddPane(tb2, wx.aui.PaneInfo().
+ self._mgr.AddPane(tb2, wx.aui.AuiPaneInfo().
Name("tb2").Caption("Toolbar 2").
ToolbarPane().Top().Row(1).
LeftDockable(False).RightDockable(False))
- self._mgr.AddPane(tb3, wx.aui.PaneInfo().
+ self._mgr.AddPane(tb3, wx.aui.AuiPaneInfo().
Name("tb3").Caption("Toolbar 3").
ToolbarPane().Top().Row(1).Position(1).
LeftDockable(False).RightDockable(False))
- self._mgr.AddPane(tb4, wx.aui.PaneInfo().
+ self._mgr.AddPane(tb4, wx.aui.AuiPaneInfo().
Name("tb4").Caption("Sample Bookmark Toolbar").
ToolbarPane().Top().Row(2).
LeftDockable(False).RightDockable(False))
- self._mgr.AddPane(tb5, wx.aui.PaneInfo().
+ self._mgr.AddPane(tb5, wx.aui.AuiPaneInfo().
Name("tbvert").Caption("Sample Vertical Toolbar").
ToolbarPane().Left().GripperTop().
TopDockable(False).BottomDockable(False))
self._mgr.AddPane(wx.Button(self, -1, "Test Button"),
- wx.aui.PaneInfo().Name("tb5").
+ wx.aui.AuiPaneInfo().Name("tb5").
ToolbarPane().Top().Row(2).Position(1).
LeftDockable(False).RightDockable(False))
self.Bind(wx.EVT_CLOSE, self.OnClose)
# Show How To Use The Closing Panes Event
- self.Bind(wx.aui.EVT_AUI_PANEBUTTON, self.OnPaneButton)
+ self.Bind(wx.aui.EVT_AUI_PANE_CLOSE, self.OnPaneClose)
self.Bind(wx.EVT_MENU, self.OnCreateTree, id=ID_CreateTree)
self.Bind(wx.EVT_MENU, self.OnCreateGrid, id=ID_CreateGrid)
self.Bind(wx.EVT_MENU, self.OnCreateSizeReport, id=ID_CreateSizeReport)
self.Bind(wx.EVT_MENU, self.OnCreatePerspective, id=ID_CreatePerspective)
self.Bind(wx.EVT_MENU, self.OnCopyPerspective, id=ID_CopyPerspective)
+
self.Bind(wx.EVT_MENU, self.OnManagerFlag, id=ID_AllowFloating)
self.Bind(wx.EVT_MENU, self.OnManagerFlag, id=ID_TransparentHint)
- self.Bind(wx.EVT_MENU, self.OnManagerFlag, id=ID_TransparentHintFade)
+ self.Bind(wx.EVT_MENU, self.OnManagerFlag, id=ID_VenetianBlindsHint)
+ self.Bind(wx.EVT_MENU, self.OnManagerFlag, id=ID_RectangleHint)
+ self.Bind(wx.EVT_MENU, self.OnManagerFlag, id=ID_NoHint)
+ self.Bind(wx.EVT_MENU, self.OnManagerFlag, id=ID_HintFade)
+ self.Bind(wx.EVT_MENU, self.OnManagerFlag, id=ID_NoVenetianFade)
self.Bind(wx.EVT_MENU, self.OnManagerFlag, id=ID_TransparentDrag)
- self.Bind(wx.EVT_MENU, self.OnManagerFlag, id=ID_DisableVenetianBlinds)
- self.Bind(wx.EVT_MENU, self.OnManagerFlag, id=ID_DisableVenetianBlindsFade)
self.Bind(wx.EVT_MENU, self.OnManagerFlag, id=ID_AllowActivePane)
+
self.Bind(wx.EVT_MENU, self.OnGradient, id=ID_NoGradient)
self.Bind(wx.EVT_MENU, self.OnGradient, id=ID_VerticalGradient)
self.Bind(wx.EVT_MENU, self.OnGradient, id=ID_HorizontalGradient)
self.Bind(wx.EVT_MENU, self.OnClose, id=wx.ID_EXIT)
self.Bind(wx.EVT_MENU, self.OnAbout, id=ID_About)
- self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_AllowFloating)
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_TransparentHint)
- self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_TransparentHintFade)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_VenetianBlindsHint)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_RectangleHint)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_NoHint)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_HintFade)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_AllowFloating)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_NoVenetianFade)
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_TransparentDrag)
- self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_DisableVenetianBlinds)
- self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_DisableVenetianBlindsFade)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_AllowActivePane)
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_NoGradient)
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_VerticalGradient)
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_HorizontalGradient)
+
self.Bind(wx.EVT_MENU_RANGE, self.OnRestorePerspective, id=ID_FirstPerspective,
id2=ID_FirstPerspective+1000)
- def OnPaneButton(self, event):
+ def OnPaneClose(self, event):
caption = event.GetPane().caption
if caption in ["Tree Pane", "Dock Manager Settings", "Fixed Pane"]:
msg = "Are You Sure You Want To Close This Pane?"
- dlg = wx.MessageDialog(self, msg, "PyAUI Question",
- wx.YES_NO | wx.NO_DEFAULT | wx.CANCEL | wx.ICON_QUESTION)
+ dlg = wx.MessageDialog(self, msg, "AUI Question",
+ wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
if dlg.ShowModal() in [wx.ID_NO, wx.ID_CANCEL]:
- dlg.Destroy()
- return
-
+ event.Veto()
dlg.Destroy()
-
- event.Skip()
def OnClose(self, event):
def OnManagerFlag(self, event):
flag = 0
-
- if event.GetId() == ID_AllowFloating:
- flag = wx.aui.AUI_MGR_ALLOW_FLOATING
+ eid = event.GetId()
- elif event.GetId() == ID_TransparentDrag:
- flag = wx.aui.AUI_MGR_TRANSPARENT_DRAG
+ if eid in [ ID_TransparentHint, ID_VenetianBlindsHint, ID_RectangleHint, ID_NoHint ]:
+ flags = self._mgr.GetFlags()
+ flags &= ~wx.aui.AUI_MGR_TRANSPARENT_HINT
+ flags &= ~wx.aui.AUI_MGR_VENETIAN_BLINDS_HINT
+ flags &= ~wx.aui.AUI_MGR_RECTANGLE_HINT
+ self._mgr.SetFlags(flags)
- elif event.GetId() == ID_TransparentHint:
- flag = wx.aui.AUI_MGR_TRANSPARENT_HINT
-
- elif event.GetId() == ID_TransparentHintFade:
- flag = wx.aui.AUI_MGR_TRANSPARENT_HINT_FADE
-
- elif event.GetId() == ID_AllowActivePane:
+ if eid == ID_AllowFloating:
+ flag = wx.aui.AUI_MGR_ALLOW_FLOATING
+ elif eid == ID_TransparentDrag:
+ flag = wx.aui.AUI_MGR_TRANSPARENT_DRAG
+ elif eid == ID_HintFade:
+ flag = wx.aui.AUI_MGR_HINT_FADE
+ elif eid == ID_NoVenetianFade:
+ flag = wx.aui.AUI_MGR_NO_VENETIAN_BLINDS_FADE
+ elif eid == ID_AllowActivePane:
flag = wx.aui.AUI_MGR_ALLOW_ACTIVE_PANE
-
- elif event.GetId() == ID_DisableVenetianBlinds:
- flag = wx.aui.AUI_MGR_DISABLE_VENETIAN_BLINDS
-
- elif event.GetId() == ID_DisableVenetianBlindsFade:
- flag = wx.aui.AUI_MGR_DISABLE_VENETIAN_BLINDS_FADE
-
+ elif eid == ID_TransparentHint:
+ flag = wx.aui.AUI_MGR_TRANSPARENT_HINT
+ elif eid == ID_VenetianBlindsHint:
+ flag = wx.aui.AUI_MGR_VENETIAN_BLINDS_HINT
+ elif eid == ID_RectangleHint:
+ flag = wx.aui.AUI_MGR_RECTANGLE_HINT
+
self._mgr.SetFlags(self._mgr.GetFlags() ^ flag)
def OnUpdateUI(self, event):
flags = self._mgr.GetFlags()
-
- if event.GetId() == ID_NoGradient:
+ eid = event.GetId()
+
+ if eid == ID_NoGradient:
event.Check(self._mgr.GetArtProvider().GetMetric(wx.aui.AUI_ART_GRADIENT_TYPE) == wx.aui.AUI_GRADIENT_NONE)
-
- elif event.GetId() == ID_VerticalGradient:
+
+ elif eid == ID_VerticalGradient:
event.Check(self._mgr.GetArtProvider().GetMetric(wx.aui.AUI_ART_GRADIENT_TYPE) == wx.aui.AUI_GRADIENT_VERTICAL)
-
- elif event.GetId() == ID_HorizontalGradient:
+
+ elif eid == ID_HorizontalGradient:
event.Check(self._mgr.GetArtProvider().GetMetric(wx.aui.AUI_ART_GRADIENT_TYPE) == wx.aui.AUI_GRADIENT_HORIZONTAL)
-
- elif event.GetId() == ID_AllowFloating:
+
+ elif eid == ID_AllowFloating:
event.Check((flags & wx.aui.AUI_MGR_ALLOW_FLOATING) != 0)
- elif event.GetId() == ID_TransparentDrag:
+ elif eid == ID_TransparentDrag:
event.Check((flags & wx.aui.AUI_MGR_TRANSPARENT_DRAG) != 0)
- elif event.GetId() == ID_TransparentHint:
+ elif eid == ID_TransparentHint:
event.Check((flags & wx.aui.AUI_MGR_TRANSPARENT_HINT) != 0)
- elif event.GetId() == ID_TransparentHintFade:
- event.Check((flags & wx.aui.AUI_MGR_TRANSPARENT_HINT_FADE) != 0)
-
- elif event.GetId() == ID_DisableVenetianBlinds:
- event.Check((flags & wx.aui.AUI_MGR_DISABLE_VENETIAN_BLINDS) != 0)
-
- elif event.GetId() == ID_DisableVenetianBlindsFade:
- event.Check((flags & wx.aui.AUI_MGR_DISABLE_VENETIAN_BLINDS_FADE) != 0)
+ elif eid == ID_VenetianBlindsHint:
+ event.Check((flags & wx.aui.AUI_MGR_VENETIAN_BLINDS_HINT) != 0)
+
+ elif eid == ID_RectangleHint:
+ event.Check((flags & wx.aui.AUI_MGR_RECTANGLE_HINT) != 0)
+
+ elif eid == ID_NoHint:
+ event.Check(((wx.aui.AUI_MGR_TRANSPARENT_HINT |
+ wx.aui.AUI_MGR_VENETIAN_BLINDS_HINT |
+ wx.aui.AUI_MGR_RECTANGLE_HINT) & flags) == 0)
+
+ elif eid == ID_HintFade:
+ event.Check((flags & wx.aui.AUI_MGR_HINT_FADE) != 0);
+
+ elif eid == ID_NoVenetianFade:
+ event.Check((flags & wx.aui.AUI_MGR_NO_VENETIAN_BLINDS_FADE) != 0);
+
def OnCreateTree(self, event):
-
- self._mgr.AddPane(self.CreateTreeCtrl(), wx.aui.PaneInfo().
- Name("Test").Caption("Tree Control").
+ self._mgr.AddPane(self.CreateTreeCtrl(), wx.aui.AuiPaneInfo().
+ Caption("Tree Control").
Float().FloatingPosition(self.GetStartPosition()).
- FloatingSize(wx.Size(150, 300)))
+ FloatingSize(wx.Size(150, 300)).CloseButton(True).MaximizeButton(True))
self._mgr.Update()
def OnCreateGrid(self, event):
-
- self._mgr.AddPane(self.CreateGrid(), wx.aui.PaneInfo().
- Name("Test").Caption("Grid").
+ self._mgr.AddPane(self.CreateGrid(), wx.aui.AuiPaneInfo().
+ Caption("Grid").
Float().FloatingPosition(self.GetStartPosition()).
- FloatingSize(wx.Size(300, 200)))
+ FloatingSize(wx.Size(300, 200)).CloseButton(True).MaximizeButton(True))
self._mgr.Update()
def OnCreateHTML(self, event):
-
- self._mgr.AddPane(self.CreateHTMLCtrl(), wx.aui.PaneInfo().
- Name("Test").Caption("HTML Content").
+ self._mgr.AddPane(self.CreateHTMLCtrl(), wx.aui.AuiPaneInfo().
+ Caption("HTML Content").
Float().FloatingPosition(self.GetStartPosition()).
- FloatingSize(wx.Size(300, 200)))
+ FloatingSize(wx.Size(300, 200)).CloseButton(True).MaximizeButton(True))
self._mgr.Update()
def OnCreateText(self, event):
-
- self._mgr.AddPane(self.CreateTextCtrl(), wx.aui.PaneInfo().
- Name("Test").Caption("Text Control").
- Float().FloatingPosition(self.GetStartPosition()))
+ self._mgr.AddPane(self.CreateTextCtrl(), wx.aui.AuiPaneInfo().
+ Caption("Text Control").
+ Float().FloatingPosition(self.GetStartPosition()).
+ CloseButton(True).MaximizeButton(True))
self._mgr.Update()
def OnCreateSizeReport(self, event):
-
- self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.PaneInfo().
- Name("Test").Caption("Client Size Reporter").
- Float().FloatingPosition(self.GetStartPosition()))
+ self._mgr.AddPane(self.CreateSizeReportCtrl(), wx.aui.AuiPaneInfo().
+ Caption("Client Size Reporter").
+ Float().FloatingPosition(self.GetStartPosition()).
+ CloseButton(True).MaximizeButton(True))
self._mgr.Update()
tree = wx.TreeCtrl(self, -1, wx.Point(0, 0), wx.Size(160, 250),
wx.TR_DEFAULT_STYLE | wx.NO_BORDER)
- root = tree.AddRoot("PyAUI Project")
+ root = tree.AddRoot("AUI Project")
items = []
imglist = wx.ImageList(16, 16, True, 2)
self.SetSizer(cont_sizer)
self.GetSizer().SetSizeHints(self)
- self._border_size.SetValue(frame.GetDockArt().GetMetric(wx.aui.AUI_ART_PANE_BORDER_SIZE))
- self._sash_size.SetValue(frame.GetDockArt().GetMetric(wx.aui.AUI_ART_SASH_SIZE))
- self._caption_size.SetValue(frame.GetDockArt().GetMetric(wx.aui.AUI_ART_CAPTION_SIZE))
+ self._border_size.SetValue(frame.GetDockArt().GetMetric(wx.aui.AUI_DOCKART_PANE_BORDER_SIZE))
+ self._sash_size.SetValue(frame.GetDockArt().GetMetric(wx.aui.AUI_DOCKART_SASH_SIZE))
+ self._caption_size.SetValue(frame.GetDockArt().GetMetric(wx.aui.AUI_DOCKART_CAPTION_SIZE))
self.UpdateColors()
def UpdateColors(self):
- bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BACKGROUND_COLOUR)
+ bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_BACKGROUND_COLOUR)
self._background_color.SetBitmapLabel(self.CreateColorBitmap(bk))
- cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR)
+ cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_INACTIVE_CAPTION_COLOUR)
self._inactive_caption_color.SetBitmapLabel(self.CreateColorBitmap(cap))
- capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR)
+ capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR)
self._inactive_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(capgrad))
- captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR)
+ captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR)
self._inactive_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(captxt))
- acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR)
+ acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_ACTIVE_CAPTION_COLOUR)
self._active_caption_color.SetBitmapLabel(self.CreateColorBitmap(acap))
- acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR)
+ acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR)
self._active_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(acapgrad))
- acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR)
+ acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR)
self._active_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(acaptxt))
- sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_SASH_COLOUR)
+ sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_SASH_COLOUR)
self._sash_color.SetBitmapLabel(self.CreateColorBitmap(sash))
- border = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BORDER_COLOUR)
+ border = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_BORDER_COLOUR)
self._border_color.SetBitmapLabel(self.CreateColorBitmap(border))
- gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_GRIPPER_COLOUR)
+ gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_GRIPPER_COLOUR)
self._gripper_color.SetBitmapLabel(self.CreateColorBitmap(gripper))
def OnPaneBorderSize(self, event):
- self._frame.GetDockArt().SetMetric(wx.aui.AUI_ART_PANE_BORDER_SIZE,
+ self._frame.GetDockArt().SetMetric(wx.aui.AUI_DOCKART_PANE_BORDER_SIZE,
event.GetInt())
self._frame.DoUpdate()
def OnSashSize(self, event):
- self._frame.GetDockArt().SetMetric(wx.aui.AUI_ART_SASH_SIZE,
+ self._frame.GetDockArt().SetMetric(wx.aui.AUI_DOCKART_SASH_SIZE,
event.GetInt())
self._frame.DoUpdate()
def OnCaptionSize(self, event):
- self._frame.GetDockArt().SetMetric(wx.aui.AUI_ART_CAPTION_SIZE,
+ self._frame.GetDockArt().SetMetric(wx.aui.AUI_DOCKART_CAPTION_SIZE,
event.GetInt())
self._frame.DoUpdate()
var = 0
if event.GetId() == ID_BackgroundColor:
- var = wx.aui.AUI_ART_BACKGROUND_COLOUR
+ var = wx.aui.AUI_DOCKART_BACKGROUND_COLOUR
elif event.GetId() == ID_SashColor:
- var = wx.aui.AUI_ART_SASH_COLOUR
+ var = wx.aui.AUI_DOCKART_SASH_COLOUR
elif event.GetId() == ID_InactiveCaptionColor:
- var = wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR
+ var = wx.aui.AUI_DOCKART_INACTIVE_CAPTION_COLOUR
elif event.GetId() == ID_InactiveCaptionGradientColor:
- var = wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR
+ var = wx.aui.AUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR
elif event.GetId() == ID_InactiveCaptionTextColor:
- var = wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR
+ var = wx.aui.AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR
elif event.GetId() == ID_ActiveCaptionColor:
- var = wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR
+ var = wx.aui.AUI_DOCKART_ACTIVE_CAPTION_COLOUR
elif event.GetId() == ID_ActiveCaptionGradientColor:
- var = wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR
+ var = wx.aui.AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR
elif event.GetId() == ID_ActiveCaptionTextColor:
- var = wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR
+ var = wx.aui.AUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR
elif event.GetId() == ID_BorderColor:
- var = wx.aui.AUI_ART_BORDER_COLOUR
+ var = wx.aui.AUI_DOCKART_BORDER_COLOUR
elif event.GetId() == ID_GripperColor:
- var = wx.aui.AUI_ART_GRIPPER_COLOUR
+ var = wx.aui.AUI_DOCKART_GRIPPER_COLOUR
else:
return