NeoMutt  2024-04-25-1-g3de005
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
render.c
Go to the documentation of this file.
1
31#include "config.h"
32#include "render.h"
33#include "node.h"
34
45int node_tree_render(const struct ExpandoNode *node,
46 const struct ExpandoRenderData *rdata, struct Buffer *buf,
47 int max_cols, void *data, MuttFormatFlags flags)
48{
49 int total_cols = 0;
50
51 for (; node && (total_cols < max_cols); node = node->next)
52 {
53 if (!node->render)
54 continue;
55
56 total_cols += node->render(node, rdata, buf, max_cols - total_cols, data, flags);
57 }
58
59 return total_cols;
60}
Basic Expando Node.
int node_tree_render(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Render a tree of ExpandoNodes into a string.
Definition: render.c:45
Render Expandos using Data.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
Definition: render.h:32
String manipulation buffer.
Definition: buffer.h:36
Basic Expando Node.
Definition: node.h:69
int(* render)(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Definition: node.h:96
struct ExpandoNode * next
Linked list.
Definition: node.h:71