*brk = bb[V][0];
*height = xr_layout_cell_text (xr, cell, bb, clip, width, brk);
}
-\f
-#if 0
-static bool
-xr_table_render (struct xr_render_fsm *fsm, struct xr_fsm *xr)
-{
- struct xr_table_state *ts = UP_CAST (fsm, struct xr_table_state, fsm);
-
- while (render_pager_has_next (ts->p))
- {
- int used;
-
- used = render_pager_draw_next (ts->p, xr->length);
- if (!used)
- {
- assert (xr->y > 0);
- return true;
- }
- else
- xr->y += used;
- }
- return false;
-}
-
-static void
-xr_table_destroy (struct xr_render_fsm *fsm)
-{
- struct xr_table_state *ts = UP_CAST (fsm, struct xr_table_state, fsm);
-
- render_pager_destroy (ts->p);
- free (ts);
-}
-
-static struct xr_render_fsm *
-xr_render_table (struct xr_fsm *xr, struct table_item *table_item)
-{
- struct xr_table_state *ts;
-
- ts = xmalloc (sizeof *ts);
- ts->fsm.render = xr_table_render;
- ts->fsm.destroy = xr_table_destroy;
-
- if (xr->y > 0)
- xr->y += xr->char_height;
-
- ts->p = render_pager_create (xr->params, table_item);
- table_item_unref (table_item);
-
- return &ts->fsm;
-}
-\f
-static bool
-xr_eject_render (struct xr_render_fsm *fsm UNUSED, struct xr_fsm *xr)
-{
- return xr->y > 0;
-}
-
-static void
-xr_eject_destroy (struct xr_render_fsm *fsm UNUSED)
-{
- /* Nothing to do. */
-}
-
-static struct xr_render_fsm *
-xr_render_eject (void)
-{
- static struct xr_render_fsm eject_renderer =
- {
- xr_eject_render,
- xr_eject_destroy
- };
-
- return &eject_renderer;
-}
-\f
-#define CHART_WIDTH 500
-#define CHART_HEIGHT 375
-
-static struct xr_render_fsm *
-xr_render_text (struct xr_fsm *xr, const struct text_item *text_item)
-{
- enum text_item_type type = text_item_get_type (text_item);
-
- switch (type)
- {
- case TEXT_ITEM_PAGE_TITLE:
- break;
-
- case TEXT_ITEM_EJECT_PAGE:
- if (xr->y > 0)
- return xr_render_eject ();
- break;
-
- default:
- return xr_render_table (
- xr, text_item_to_table_item (text_item_ref (text_item)));
- }
-
- return NULL;
-}
-#endif
#define CHART_WIDTH 500
#define CHART_HEIGHT 375