Module lousy.mode
lousy.mode library
Mode setting and getting operations for objects.
Functions
lousy.mode.is_modeable (object)
Check if the mode can be set on an object. An object is considered mode-able if it has an "emit_signal" method.
Parameters
-
objectType: any typeThe object to check.
lousy.mode.get (object)
Get the current mode for a given object.
Parameters
-
objectType: any typeA mode-able object.
Return Values
-
stringThe current mode of the given object, or the default mode of that object, or "normal".
lousy.mode.set (object, mode)
Set the mode for a given object.
Parameters
-
objectType: any typeA mode-able object.
-
modeType: stringA mode name (e.g. "insert", "command", ...).
Return Values
-
stringThe newly set mode.
Attribution
Copyright
- 2010 Mason Larobina