X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=hooke%2Fui%2Fgui%2Fnavbar.py;h=3d18e644bd3012d975b6e682cae66a1d10f3f1f7;hb=52d826ba83665e8afedfd8450a3ebb9f669df09f;hp=c10f6a1629cfb7d321320aead8b411c7f2ffd040;hpb=a69e9a38afd86cd12a26c244b546fefe3f5d00b6;p=hooke.git diff --git a/hooke/ui/gui/navbar.py b/hooke/ui/gui/navbar.py index c10f6a1..3d18e64 100644 --- a/hooke/ui/gui/navbar.py +++ b/hooke/ui/gui/navbar.py @@ -1,28 +1,56 @@ -# Copyright +# Copyright (C) 2010-2012 W. Trevor King +# +# This file is part of Hooke. +# +# Hooke is free software: you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) any +# later version. +# +# Hooke is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Hooke. If not, see . """Navigation bar for Hooke. """ import wx +#import wx.aui as aui # C++ implementation +import wx.lib.agw.aui as aui # Python implementation +from ...util.callback import callback, in_callback -class NavBar (wx.ToolBar): + +class NavBar (aui.AuiToolBar): def __init__(self, callbacks, *args, **kwargs): super(NavBar, self).__init__(*args, **kwargs) - self.SetToolBitmapSize(wx.Size(16,16)) + bitmap_size = wx.Size(16,16) + self.SetToolBitmapSize(bitmap_size) self._c = { - 'previous': self.AddLabelTool( - id=wx.ID_PREVIEW_PREVIOUS, + 'previous': self.AddTool( + tool_id=wx.ID_PREVIEW_PREVIOUS, label='Previous', bitmap=wx.ArtProvider_GetBitmap( - wx.ART_GO_BACK, wx.ART_OTHER, wx.Size(16, 16)), - shortHelp='Previous curve'), - 'next': self.AddLabelTool( - id=wx.ID_PREVIEW_NEXT, + wx.ART_GO_BACK, wx.ART_OTHER, bitmap_size), + disabled_bitmap=wx.NullBitmap, + kind=wx.ITEM_NORMAL, + short_help_string='Previous curve', + long_help_string='', + client_data=None), + 'next': self.AddTool( + tool_id=wx.ID_PREVIEW_NEXT, label='Next', bitmap=wx.ArtProvider_GetBitmap( - wx.ART_GO_FORWARD, wx.ART_OTHER, wx.Size(16, 16)), - shortHelp='Next curve'), + wx.ART_GO_FORWARD, wx.ART_OTHER, bitmap_size), + disabled_bitmap=wx.NullBitmap, + kind=wx.ITEM_NORMAL, + short_help_string='Next curve', + long_help_string='', + client_data=None), } self.Realize() self._callbacks = callbacks