(self)
| 268 | pass |
| 269 | |
| 270 | def create(self): |
| 271 | self.name = 'Dictionary Browser \xe2\x94\x80\xe2\x94\x80 (Press F1 for help)' |
| 272 | self.add_handlers({curses.KEY_F1: self.usage, |
| 273 | ord('/'): self.search, |
| 274 | ord('f'): self.filter, |
| 275 | ord('r'): self.reset, |
| 276 | ord('q'): self.quit}) |
| 277 | self.items = self.add(npyscreen.TitleText, |
| 278 | name='Items total', value='0', editable=False) |
| 279 | self.add(npyscreen.TitleText, name='PS version', |
| 280 | value='3010', editable=False) |
| 281 | self.search_btn = self.add( |
| 282 | SearchButton, relx=33, rely=2, name='Search') |
| 283 | self.search_text = self.add( |
| 284 | npyscreen.FixedText, relx=53, rely=2, editable=False) |
| 285 | self.filter_btn = self.add( |
| 286 | FilterButton, relx=33, rely=3, name='Filter') |
| 287 | self.filter_text = self.add( |
| 288 | npyscreen.FixedText, relx=53, rely=3, editable=False) |
| 289 | self.dict = self.add(Dict, name='Dictionary', scroll_exit=True, |
| 290 | max_width=43, relx=2, rely=5, max_height=-2) |
| 291 | self.perms = self.add(Perms, name='Permissions', |
| 292 | scroll_exit=True, rely=5, relx=46, max_height=6) |
| 293 | self.value = self.add(Value, name='Edit Value', |
| 294 | scroll_exit=True, rely=11, relx=46, max_height=-2) |
| 295 | self.status = self.add(npyscreen.TitleText, name='Status', |
| 296 | editable=False, value='Connected to laserjet.lan', rely=-3) |
| 297 | self.save = self.add(npyscreen.ButtonPress, |
| 298 | name='Save Changes', rely=-3, relx=-27) |
| 299 | self.exit = self.add(npyscreen.ButtonPress, |
| 300 | name='Exit', rely=-3, relx=-12) |
| 301 | self.save.whenPressed = self.commit |
| 302 | self.exit.whenPressed = self.quit |
| 303 | self.update_dict() |
nothing calls this directly
no test coverage detected