Expando Node for Padding. More...
#include "config.h"
#include <stddef.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "gui/lib.h"
#include "node_padding.h"
#include "definition.h"
#include "node.h"
#include "node_container.h"
#include "parse.h"
#include "render.h"
Go to the source code of this file.
Functions | |
struct NodePaddingPrivate * | node_padding_private_new (enum ExpandoPadType pad_type) |
Create new Padding private data. | |
void | node_padding_private_free (void **ptr) |
Free Padding private data - Implements ExpandoNode::ndata_free() | |
int | pad_string (const struct ExpandoNode *node, struct Buffer *buf, int max_cols) |
Pad a buffer with a character. | |
int | node_padding_render_eol (const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags) |
Render End-of-Line Padding - Implements ExpandoNode::render() -. | |
int | node_padding_render_hard (const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags) |
Render Hard Padding - Implements ExpandoNode::render() -. | |
int | node_padding_render_soft (const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags) |
Render Soft Padding - Implements ExpandoNode::render() -. | |
struct ExpandoNode * | node_padding_new (enum ExpandoPadType pad_type, const char *start, const char *end) |
Creata new Padding ExpandoNode. | |
struct ExpandoNode * | node_padding_parse (const char *str, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err) |
Parse a Padding Expando - Implements ExpandoDefinition::parse() -. | |
void | node_padding_repad (struct ExpandoNode **ptr) |
Rearrange Padding in a tree of ExpandoNodes. | |
Expando Node for Padding.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file node_padding.c.
struct NodePaddingPrivate * node_padding_private_new | ( | enum ExpandoPadType | pad_type | ) |
Create new Padding private data.
pad_type | Padding type |
ptr | New Padding private data |
Definition at line 47 of file node_padding.c.
void node_padding_private_free | ( | void ** | ptr | ) |
Free Padding private data - Implements ExpandoNode::ndata_free()
ptr | Data to free |
Definition at line 60 of file node_padding.c.
int pad_string | ( | const struct ExpandoNode * | node, |
struct Buffer * | buf, | ||
int | max_cols | ||
) |
Pad a buffer with a character.
node | Node with padding type |
buf | Buffer to populate |
max_cols | Number of screen columns available |
Fill buf with the padding char (Node.start) to a maximum of max_cols screen cells.
Definition at line 76 of file node_padding.c.
struct ExpandoNode * node_padding_new | ( | enum ExpandoPadType | pad_type, |
const char * | start, | ||
const char * | end | ||
) |
Creata new Padding ExpandoNode.
pad_type | Padding type |
start | Start of padding character |
end | End of padding character |
ptr | New Padding ExpandoNode |
Definition at line 201 of file node_padding.c.
void node_padding_repad | ( | struct ExpandoNode ** | ptr | ) |
Rearrange Padding in a tree of ExpandoNodes.
ptr | Parent Node |
Definition at line 282 of file node_padding.c.