'Change the title to reflect the state of the document -
eg ReadOnly, Dirty, etc'

def _UpdateUIForState(self):

    filename = self.GetPathName()
    if (not filename):
        return
    try:
        self.GetFirstView().ShowWindow(win32con.SW_SHOW)
        title = win32ui.GetFileTitle(filename)
    except win32ui.error:
        title = filename
    if self._IsReadOnly():
        title = (title + '    (read-only)')
    self.SetTitle(title)
