Package qubx :: Module treeGTK
[hide private]
[frames] | no frames]

Module treeGTK

source code

pygtk support for qubtree: clipboard and visual editing.

Copyright 2007-2012 Research Foundation State University of New York This file is part of QUB Express.

QUB Express is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QUB Express is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License, named LICENSE.txt, in the QUB Express program directory. If not, see <http://www.gnu.org/licenses/>.

Classes [hide private]
  TreeView
gtk.Widget for browsing/editing a qubx.tree.Node and its children.
  NodeView
Properties panel for a single qubx.tree.Node.
  NodeDialog
A dialog box to hold the NodeView for editing a single qubx.tree.Node.
  TreeWindow
A top-level gtk.Window with a TreeView for editing a qubx.tree.Node and its children.
  TreeDialog
Dialog for modal editing of a qubx.tree.Node and its children.
Functions [hide private]
 
Copy(node, clipboard=None)
Copies node to the specified (def main) clipboard.
source code
 
CanPaste(clipboard=None)
Returns True if there is a qubx.tree.Node in the specified (def main) clipboard.
source code
 
Paste(clipboard=None)
Returns a copy of the qubx.tree.Node from the specified (def main) clipboard.
source code
 
acceptNumList(s) source code
accept;
acceptNodeData(node)
accept(string) -> action_fn; action_fn() -> modifies node.data; e.g.
source code
 
captionNodeData(node) source code
 
helpNodeData(node) source code
 
formatNodeData(node) source code
 
nodeDataIsFullyShown(data) source code
 
UserEdit(node, parent=None, appName='', caption='')
Creates a TreeDialog, runs it, and destroys it; returns the edited node.
source code
Variables [hide private]
  ex_numeric = 'Examples:\n (numeric)\n 1\n 1.0\n pi\n...
  __package__ = 'qubx'
  e = 2.71828182846
  pi = 3.14159265359
  rdbk = 'Expired.'
  rdbreak = 'supporting'
  rdname = 'qubfast.txt'
Function Details [hide private]

Paste(clipboard=None)

source code 

Returns a copy of the qubx.tree.Node from the specified (def main) clipboard. If there is none, or any exception occurs, node.isNull == True.

acceptNodeData(node)

source code 

accept(string) -> action_fn; action_fn() -> modifies node.data; e.g.

>>> try:
>>>     acceptNodeData(node)(string)()
>>> except:
>>>     invalid string
Returns: accept;

Variables Details [hide private]

ex_numeric

Value:
'''Examples:
  (numeric)
    1
    1.0
    pi
    [2, 3]
    [2.0, 3.0]
    [[2.0, 3.0], [4.0, 5.0]]
...