NetSurf
Functions
layout.h File Reference

interface to HTML layout. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool layout_document (struct html_content *content, int width, int height)
 Calculate positions of boxes in a document. More...
 

Detailed Description

interface to HTML layout.

The main interface to the layout code is layout_document(), which takes a normalized box tree and assigns coordinates and dimensions to the boxes, and also adds boxes to the tree (eg. when formatting lines of text).

Definition in file layout.h.

Function Documentation

◆ layout_document()

bool layout_document ( struct html_content content,
int  width,
int  height 
)

Calculate positions of boxes in a document.

Parameters
contentcontent of type CONTENT_HTML
widthavailable width
heightavailable height
Returns
true on success, false on memory exhaustion

Definition at line 5419 of file layout.c.

References box::border, BOTTOM, box::children, content_get_url(), box::height, height, layout_block_context(), layout_block_find_dimensions(), layout_calculate_descendant_bboxes(), layout_lists(), layout_minmax_block(), layout_position_absolute(), layout_position_relative(), LEFT, box::margin, NSLOG, nsurl_access(), box::padding, RIGHT, TOP, box_border::width, box::width, width, box::x, and box::y.

Referenced by html_reformat().

Here is the call graph for this function:
Here is the caller graph for this function: