openlp/slidepanel.py
Timothy Ebenezer 4390a73a67 - Created basic GUI elements
- Deleted GUI elements superceded

bzr-revno: 7
2008-03-04 00:12:12 +00:00

30 lines
920 B
Python

import wx
import slide
class SlidePanel(wx.Window):
SlideEnum = 1
NextY = 0
def __init__(self, parent, *args, **kwargs):
wx.Window.__init__(self, parent, *args, **kwargs)
def AddSlide(self, slideText, slideType):
slide = slide.Slide(self, pos=wx.Point(0,self.NextY+10), slideText=slideText, slideNum=self.SlideEnum, slideType=slideType)
self.SlideEnum = self.SlideEnum+1
self.NextY = self.NextY + slide.GetHeight()+10
self.SetVirtualSize(self.GetSize().GetWidth(),self.NextY)
self.SetScrollRate(1,1)
slide.Refresh()
def SetSelected(self, index):
WindowList = self.GetChildren()
for Node in WindowList:
Current = Node.GetData()
if Current.GetIndex() == index:
Current.SetSelected()
else:
Current.DropSelected()