Exemplo n.º 1
0
application.set_external_app_handler(example_app)

# Lets now apply our custom tree loader function to the main
# application
application.set_tree_loader(my_tree_loader)

# And our layout as the default one to render trees
ts = TreeStyle()
ts.show_leaf_name = False
ts.layout_fn.append(main_layout)
ts.mode = "r"
ts.branch_vertical_margin = 5
#ts.scale = 20
application.set_tree_style(ts)
#application.set_default_layout_fn(main_layout)
application.set_tree_size(None, None)
# I want to make up how tree image in shown using a custrom tree
# renderer that adds much more HTML code
application.set_external_tree_renderer(tree_renderer)

# ==============================================================================
# ADD CUSTOM ACTIONS TO THE APPLICATION
#
# The function "register_action" allows to attach functionality to
# nodes in the image. All registered accions will be shown in the
# popup menu bound to the nodes and faces in the web image.
#
#
# register_action(action_name, target_type=["node"|"face"|"layout"|"search"], \
#                 action_handler, action_checker, html_generator_handler)
#
Exemplo n.º 2
0
application.set_external_app_handler(example_app)

# Lets now apply our custom tree loader function to the main
# application 
application.set_tree_loader(my_tree_loader)

# And our layout as the default one to render trees
ts = TreeStyle()
ts.show_leaf_name = False
ts.layout_fn.append(main_layout)
ts.mode = "r"
ts.branch_vertical_margin = 5
#ts.scale = 20
application.set_tree_style(ts)
#application.set_default_layout_fn(main_layout)
application.set_tree_size(None, None)
# I want to make up how tree image in shown using a custrom tree
# renderer that adds much more HTML code
application.set_external_tree_renderer(tree_renderer)


# ==============================================================================
# ADD CUSTOM ACTIONS TO THE APPLICATION
#
# The function "register_action" allows to attach functionality to
# nodes in the image. All registered accions will be shown in the
# popup menu bound to the nodes and faces in the web image.
#
#
# register_action(action_name, target_type=["node"|"face"|"layout"|"search"], \
#                 action_handler, action_checker, html_generator_handler)