-#include <stdio.h>
-static void print_branch(BindingTree *first, std::string str)
-{
- BindingTree *p = first;
-
- while (p) {
- if (p->first_child)
- print_branch(p->first_child, str + " " + p->text);
- if (!p->chain)
- printf("%d%s\n", p->id, (str + " " + p->text).c_str());
- p = p->next_sibling;
- }
-}
-
-
-void OBBindings::display()
-{
- if (_keytree.first_child) {
- printf("Key Tree:\n");
- print_branch(_keytree.first_child, "");
- }
- if (_mousetree.next_sibling) {
- printf("Mouse Tree:\n");
- BindingTree *p = _mousetree.next_sibling;
- while (p) {
- printf("%d %s\n", p->id, p->text.c_str());
- p = p->next_sibling;
- }
- }
-}
-
-