hydrus/include/ClientGUIScrolledPanels.py

47 lines
947 B
Python
Raw Normal View History

2016-06-22 20:59:24 +00:00
import ClientConstants as CC
import wx
import wx.lib.scrolledpanel
2016-10-26 20:45:34 +00:00
class ResizingScrolledPanel( wx.lib.scrolledpanel.ScrolledPanel ):
2016-07-13 17:37:44 +00:00
def __init__( self, parent ):
wx.lib.scrolledpanel.ScrolledPanel.__init__( self, parent )
2016-10-26 20:45:34 +00:00
self.Bind( CC.EVT_SIZE_CHANGED, self.EventSizeChanged )
def EventSizeChanged( self, event ):
2016-11-30 20:24:17 +00:00
self.SetVirtualSize( self.GetBestVirtualSize() )
2016-10-26 20:45:34 +00:00
event.Skip()
class EditPanel( ResizingScrolledPanel ):
2016-07-13 17:37:44 +00:00
def GetValue( self ):
raise NotImplementedError()
2016-10-26 20:45:34 +00:00
class ManagePanel( ResizingScrolledPanel ):
2016-07-06 21:13:15 +00:00
def CommitChanges( self ):
raise NotImplementedError()
2016-07-13 17:37:44 +00:00
2016-10-26 20:45:34 +00:00
class ReviewPanel( ResizingScrolledPanel ):
2016-07-13 17:37:44 +00:00
pass
2017-03-02 02:14:56 +00:00
2017-07-27 00:47:13 +00:00
class ReviewPanelVetoable( ResizingScrolledPanel ):
def TryToClose( self ):
return