browser window started
[public/library.git] / browser.py
1 import curses
2 import dbLayer as db
3
4 class browserWindow:
5     highlight = 0
6     books = []
7
8     def refreshBooks(self):
9         self.books = db.getBooks()
10
11     def sortByColumn(self, col):
12         self.books.sort(key=get(col))
13
14     def refresh(self):
15         (my,mx) = w.getmaxyx()
16         self.displayHeader()
17         for r in range(2,my):
18             self.displayRow(my)
19
20     def displayRow(self,row):
21         self.w.addstr(row,1,"Row to be updated")
22
23
24
25
26