InfTextFixlineBuffer: libinftext-0.7 Reference Manual

## InfTextFixlineBuffer InfTextFixlineBuffer — Keep a fixed number of trailing lines |

## Stability Level

Unstable, unless otherwise indicated

## Functions

InfTextFixlineBuffer * | inf_text_fixline_buffer_new ()

## Properties

InfTextBuffer * | buffer | Read / Write / Construct Only
InfIo * | io | Read / Write / Construct Only
guint | lines | Read / Write / Construct Only

## Types and Values

struct | InfTextFixlineBuffer
struct | InfTextFixlineBufferClass

## Object Hierarchy

        GObject
        ╰── InfTextFixlineBuffer

## Implemented Interfaces

InfTextFixlineBuffer implements InfBuffer and InfTextBuffer.

## Includes

    #include <libinftext/inf-text-fixline-buffer.h>

## Description

This class is a wrapper around another InfTextBuffer. It makes sure that the number of trailing empty lines in the underlying buffer is always fixed to a given number while it itself keeps track of the missing or additional lines. This can be used for example to keep the number of empty lines fixed on the client side even if lines are added and removed within a text session.

## Functions

### inf_text_fixline_buffer_new ()

    InfTextFixlineBuffer *
    inf_text_fixline_buffer_new (InfIo *io,
                                 InfTextBuffer *buffer,
                                 guint n_lines);

Creates a new InfTextFixlineBuffer which keeps the number of trailing lines of the given underlying buffer fixed to `n_lines` .

[constructor]

#### Parameters

io | A InfIo object to schedule timeouts. |
buffer | The underlying buffer for which to keep a fixed line count. |
n_lines | The number of lines to be kept fixed. |

#### Returns

A InfTextFixlineBuffer.

[transfer full]

## Types and Values

### struct InfTextFixlineBuffer

    struct InfTextFixlineBuffer;

InfTextFixlineBuffer is an opaque data type. You should only access it via the public API functions.

### struct InfTextFixlineBufferClass

    struct InfTextFixlineBufferClass {
      GObjectClass parent_class;
    };

This structure does not contain any public fields.

## Property Details

### The `“buffer”` property

      “buffer”                   InfTextBuffer *

The buffer for which to keep a fixed line count.

Flags: Read / Write / Construct Only

### The `“io”` property

      “io”                       InfIo *

The I/O object used to schedule line keeping.

Flags: Read / Write / Construct Only

### The `“lines”` property

      “lines”                    guint

The number of lines to keep in the underlying buffer.

Flags: Read / Write / Construct Only

Default value: 0

## See Also

InfTextBuffer, InfTextDefaultBuffer