Using the treeview gadget (together with core hotlist/history/cookies/sslcert)
Contents |
Most of the treeview logic is located in core code but there still are some functions that need implementing on the front end side. These include:
tree_url_node.h.
Additionally the option_tree_icons_dir option should be set. It should be pointing at the directory containing the frontend specific icon set for the treeview.
During GUI initialisation the following functions should be called:
On GUI closure:
The sslcert tree is created and deleted each time the dialog gets invoked. This is done with sslcert_create_tree and sslcert_cleanup. Make sure that closing the window with any other method will also perform the cleanup.
The remaining functions in the header files of hotlist/history/cookies/sslcert have to be connected to the front end specific buttons and menu or tool bars.
The front end is responsible for creating the windows and toolbars as well as empty core trees passed to the cookies/history/hotlist/sslcert initialisation functions. Use the *_get_tree_flags functions to obtain the flags with which the particular tree should be created.
To make the tree respond to mouse action, all such has to be passed to tree_mouse_action and tree_drag_end. The mouse coordinates have to be given with respect to the tree origin.
Use tree_set_node_user_callback to provide a callback for any node related events. At the moment it can be used for(default behavior for a not handled event in brackets):
| NetSurf Code Documentation | |
|---|---|
| Organization and Conventions | |
| Features |
|
| Platform-specifics | |
| References | |