Package ocempgui :: Package widgets :: Module FileList :: Class FileList
[show private | hide private]
[frames | no frames]

Type FileList

 object --+                        
          |                        
INotifyable --+                    
              |                    
     BaseObject --+                
                  |                
     object --+   |                
              |   |                
         Sprite --+                
                  |                
         BaseWidget --+            
                      |            
                    Bin --+        
                          |        
             ScrolledWindow --+    
                              |    
                   ScrolledList --+
                                  |
                                 FileList


FileList (width, height, directory=None) -> FileList

A scrolled list, which can list and browse a filesystem.

The FileList widget class is a ScrolledList, which can list and
browse filesystem contents using FileListItem objects. It supports
automatic directory changes and change notifications. By default the
list will be sorted with the directories first.

To set or get the directory of which's content should displayed, the
'directory' attribute and set_directory() method can be used.

filelist.directory = '/usr/bin'
if filelist.directory == 'C:':
    filelist.directory = 'C:\Windows'

Default action (invoked by activate()):
See the ScrolledList class.

Mnemonic action (invoked by activate_mnemonic()):
See the ScrolledList class.

Signals:
SIG_DOUBLECLICKED - Invoked, when the list is double-clicked.

Arguments:
directory - The directory to list the contents of.

Method Summary
  __init__(self, width, height, directory)
  notify(self, event)
F.notify (...) -> None
  set_directory(self, directory)
F.set_directory (...) -> None
  _list_contents(self)
F.list_contents (...) -> None
    Inherited from ScrolledList
  deselect(self, *items)
S.deselect (...) -> None
  get_selected(self)
S.get_selected () -> list
  select(self, *items)
S.select (...) -> None
  select_all(self)
S.select_all () -> None
  set_cursor(self, item, selected)
S.set_cursor (...) -> None
  set_focus(self, focus)
S.set_focus (...) -> bool
  set_items(self, items)
S.set_items (...) -> None
  set_selectionmode(self, mode)
S.set_selectionmode (...) -> None
  set_spacing(self, spacing)
S.set_spacing (...) -> None
  _click(self, position)
S._click (...) -> None
  _cursor_next(self, selected)
S._cursor_next () -> None
  _cursor_prev(self, selected)
S._cursor_prev () -> None
  _item_has_changed(self, item)
S._item_has_changed (...) -> None
  _list_has_changed(self, collection)
S._list_has_changed (...) -> None
  _navigate(self, key, mod)
S._navigate (key) -> None
  _scroll_to_cursor(self)
S._scroll_to_cursor () -> None
    Inherited from ScrolledWindow
  activate(self)
S.activate () -> None
  draw(self)
W.draw () -> None
  draw_bg(self)
S.draw_bg () -> Surface
  set_child(self, child)
B.set_child (...) -> None
  set_scrolling(self, scrolling)
S.set_scrolling (...) -> None
  _scroll_child(self)
S._scroll_child () -> None
  _update_scrollbars(self)
S._update_scrollbars (...) -> bool, bool
    Inherited from Bin
  destroy(self)
B.destroy () -> None
  set_depth(self, depth)
B.set_depth (...) -> None
  set_event_manager(self, manager)
B.set_event_manager (...) -> None
  set_indexable(self, indexable)
B.set_indexable (...) -> None
  set_padding(self, padding)
B.set_padding (...) -> None
  set_sensitive(self, sensitive)
B.set_sensitive (...) -> None
  update(self, **kwargs)
B.update (...) -> None
    Inherited from BaseWidget
  activate_mnemonic(self, mnemonic)
W.activate_mnemonic (...) -> bool
  check_sizes(self, width, height)
W.check_sizes (...) -> int, int
  create_style(self)
W.create_style () -> WidgetStyle
  debug_update(self)
For debugging usage only
  get_style(self)
W.get_style () -> WidgetStyle
  initclass(cls)
B.initclass () -> None (Class method)
  lock(self)
W.lock () -> None
  rect_to_client(self, rect)
W.rect_to_client (...) -> pygame.Rect
  set_dirty(self, dirty, update)
W.set_dirty (...) -> None
  set_entered(self, entered)
W.set_entered (...) -> None
  set_event_area(self, area)
W.set_event_area (...) -> None
  set_index(self, index)
W.set_index (...) -> None
  set_maximum_size(self, width, height)
W.set_maximum_size (...) -> None
  set_minimum_size(self, width, height)
W.set_minimum_size (...) -> None
  set_opacity(self, opacity)
W.set_opacity (...) -> None
  set_position(self, x, y)
W.set_position (...) -> None
  set_size(self, width, height)
W.set_size (...) -> None
  set_state(self, state)
W.set_state (...) -> None
  set_style(self, style)
W.set_style (...) -> None
  set_tooltip(self, tooltip)
W.set_tooltip (...) -> None
  unlock(self)
W.unlock () -> None
  _get_rect(self)
W._get_rect () -> pygame.Rect
  _get_rect_attr(self, attr)
W._get_rect_attr (...) -> var
  _set_rect_attr(self, attr, value)
W._set_rect_attr (...) -> None
    Inherited from BaseObject
  connect_signal(self, signal, callback, *data)
B.connect_signal (...) -> EventCallback
  disconnect_signal(self, event)
B.disconnect_signal (...) -> None
  emit(self, signal, data)
B.emit (...) -> bool
  run_signal_handlers(self, signal, *data)
B.run_signal_handlers (...) -> None
    Inherited from Sprite
  __repr__(self)
  add(self, *groups)
add(group or list of of groups, ...) add a sprite to container
  add_internal(self, group)
  alive(self)
alive() -> bool check to see if the sprite is in any groups
  groups(self)
groups() -> list of groups list used sprite containers
  kill(self)
kill() remove this sprite from all groups
  remove(self, *groups)
remove(group or list of groups, ...) remove a sprite from container
  remove_internal(self, group)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Property Summary
  directory: The directory to list the contents of.
    Inherited from ScrolledList
  cursor: The item, which is currently focused.
  items: The item collection of the ScrolledList.
  selectionmode: The selection mode for the ScrolledList.
  spacing: Additional spacing to place between the items.
    Inherited from ScrolledWindow
  hscrollbar: The herizontal scrollbar.
  scrolling: The scrolling behaviour for the ScrolledWindow.
  vscrollbar: The vertical scrollbar.
    Inherited from Bin
  child: The widget hold by the Bin.
  padding: Additional padding between child and borders.
    Inherited from BaseWidget
  bottom
  bottomleft
  bottomright
  center
  centerx
  centery
  controls: Widgets associated with the widget.
  depth: The z-axis layer depth of the widget.
  dirty: Indicates, whether the widget need to be redrawn.
  entered: Indicates, whether the widget is entered.
  eventarea: The area, which gets the events.
  focus: The focus of the widget.
  h
  height
  image: The visible surface of the widget.
  index: The tab index position of the widget.
  indexable: The IIndexable, the widget is attached to.
  left
  locked: Indicates, whether the widget is locked.
  maxsize: The maximum size to occupy by the widget.
  midbottom
  midleft
  midright
  midtop
  minsize: The guaranteed size of the widget.
  opacity: The opacity of the widget.
  position: The position of the topleft corner.
  rect: The area occupied by the widget.
  right
  sensitive: The sensitivity of the widget.
  size
  state: The current state of the widget.
  style: The style of the widget.
  tooltip: The tool tip text to display for the widget.
  top
  topleft
  topright
  w
  width
  x
  y
    Inherited from BaseObject
  manager: The event manager to use by the object.

Instance Method Details

notify(self, event)

F.notify (...) -> None

Notifies the FileList about an event.
Overrides:
ocempgui.widgets.ScrolledList.ScrolledList.notify

set_directory(self, directory)

F.set_directory (...) -> None

Sets the directory to list the contents of.

Sets the directory the FileList should list the contents of. If the directory could not be found or accessed, the bell keycode '\a' will be printed and the directory will remain unchanged.

Raises a ValueError, if the passed directory argument does not exist or is not a directory path.

_list_contents(self)

F.list_contents (...) -> None

Populates the directory contents to the scrolled list.

Property Details

directory

The directory to list the contents of.
Get Method:
unknown-696695804(...)
Set Method:
unknown-696695860(...)

Generated by Epydoc 2.1 on Thu Jan 10 10:18:45 2008 http://epydoc.sf.net