revised print_node_tree
This commit is contained in:
1 parent
2db1602172
commit
592b26fc10
1 file changed
+10
-5
@@ -263,7 +263,7 @@ typedef struct {
|
|||||||
|
|
||||||
// ---
|
// ---
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
void print_node_tree(GUI_Node *node, int level)
|
void print_node_tree(GUI_Node *node, int level)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < level; i++)
|
for(int i = 0; i < level; i++)
|
||||||
@@ -272,13 +272,16 @@ void print_node_tree(GUI_Node *node, int level)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GUI_String text = node->debug_string;
|
GUI_String text = node->debug_string;
|
||||||
printf(" %.*s\n", text.length, text.cstring);
|
printf(" %.*s", text.length, text.cstring);
|
||||||
|
//printf(" (%p)", node);
|
||||||
|
printf(" (Dirty?: %b)", node->dirty);
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
GUI_Node *child = node->rdic_node.first_child;
|
GUI_Node *child = GUI_NODE_FIRST_CHILD(node);
|
||||||
while(child != NULL)
|
while(child != NULL)
|
||||||
{
|
{
|
||||||
print_node_tree(child, level+1);
|
print_node_tree(child, level+1);
|
||||||
child = child->rdic_node.sibling;
|
child = GUI_NODE_SIBLING(child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -3349,7 +3352,6 @@ int main(void)
|
|||||||
xwindow.graphics_context);
|
xwindow.graphics_context);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//print_node_tree(context.rdic.root, 1);
|
|
||||||
//getc(stdin);
|
//getc(stdin);
|
||||||
|
|
||||||
bool running = true;
|
bool running = true;
|
||||||
@@ -3443,6 +3445,9 @@ int main(void)
|
|||||||
if(running && meh)
|
if(running && meh)
|
||||||
{
|
{
|
||||||
gui(&context, screen_rectangle);
|
gui(&context, screen_rectangle);
|
||||||
|
if(0)print_node_tree(
|
||||||
|
(GUI_Node*)((GUI_Subtree*)context.background_layer.subtree_rdic.root)->rdic.root
|
||||||
|
, 1);
|
||||||
//gui_layout_nodes(&context);
|
//gui_layout_nodes(&context);
|
||||||
#if 1
|
#if 1
|
||||||
gui_layout_and_draw(&context);
|
gui_layout_and_draw(&context);
|
||||||
|
|||||||
Reference in new issue
Block a user