libtextworker 0.1.4
Cross-platform, free and open library for Python projects
Public Member Functions | List of all members
libtextworker.interface.tk.dirctrl.FSEventHandler Class Reference
Inheritance diagram for libtextworker.interface.tk.dirctrl.FSEventHandler:
Inheritance graph
[legend]

Public Member Functions

def evtIsDir (this, FileSystemEvent event)
 
def getTarget (this)
 
def on_moved (this, FileSystemEvent event)
 
def on_created (this, FileSystemEvent event)
 
def on_deleted (this, FileSystemEvent event)
 
def on_modified (this, FileSystemEvent event)
 
def on_closed (this, FileSystemEvent event)
 
def on_opened (this, FileSystemEvent event)
 

Detailed Description

A file system events handler derived from watchdog's FileSystemEventHandler.

On both wx and Tk, a new event will be generated.
Set the Target attribute which the handler sends the event to.

On Tk, since a new event is just a new event: no custom value allowed. However
you can do a bind_class to connect the event to all widgets with your specified
class:

    ```python
    # Binds FileDeletedEvent to all StyledTextControl instances
    root.bind_class('StyledTextControl', FileDeletedEvent, callback)
    # Or this (add=True won't replace the current callback if any)
    widget.bind(FileDeletedEvent, callback, add=True)
    ```

Or, if you use this for your own widget, derive this class like any other classes
you use for that widget, and set TargetIsSelf = True instead of Target.
This class does not use __init__.

Currently only one target is supported. You need to do something else to handle the
events generated here.

Definition at line 37 of file dirctrl.py.


The documentation for this class was generated from the following file: