boa-constructor /

# Name:
# Purpose:
# Author:      Riaan Booysen
# Created:     2000/09/24
# RCS-ID:      $Id$
# Copyright:   (c) 2000 Riaan Booysen
# Licence:     GPL

class HistoryBrowsePage:
    def __init__(self, modulepage, view, marker):
        self.modulePage = modulepage
        self.view = view
        self.marker = marker

    def goto(self):

    def __cmp__(self, other):
        if not isinstance(other, HistoryBrowsePage):
            return -1
        if self.modulePage == other.modulePage and self.view == other.view and \
           self.marker == other.marker:
            return 0
        return -1

    def __repr__(self):
        return 'BrowsePage(%s, %s, %s)' % (`self.modulePage`, `self.view`,

class HistoryBrowser:
    def __init__(self):
        self.pages = []
        self.idx = -1

    def add(self, modulepage, view, marker):
        page = HistoryBrowsePage(modulepage, view, marker)
        if self.pages and page == self.pages[self.idx]:
        if self.idx == len(self.pages)-1:
            self.pages[self.idx:] = [page]
        self.idx = len(self.pages)-1

    def checkRemoval(self, modPage):
        for page in self.pages[:]:
            if page.modulePage == modPage:
                idx = self.pages.index(page)
                if idx <= self.idx:
                    self.idx = self.idx - 1
                del self.pages[idx]

    def step(self, dir):
        self.idx = self.idx + dir

    def canForward(self):
        return self.idx < len(self.pages)-1

    def forward(self):
        if self.canForward():

    def canBack(self):
        return self.idx >= 0

    def back(self):
        if self.canBack():
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.