InfTextFixlineBuffer

InfTextFixlineBuffer — Keep a fixed number of trailing lines

Stability Level

Unstable, unless otherwise indicated

Synopsis

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

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

Object Hierarchy

  GObject
   +----InfTextFixlineBuffer

Implemented Interfaces

InfTextFixlineBuffer implements InfBuffer and InfTextBuffer.

Properties

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

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.

Details

InfTextFixlineBuffer

typedef struct _InfTextFixlineBuffer InfTextFixlineBuffer;

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


struct InfTextFixlineBufferClass

struct InfTextFixlineBufferClass {
  GObjectClass parent_class;
};


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.

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.

Property Details

The "buffer" property

  "buffer"                   InfTextBuffer*        : Read / Write / Construct Only

The buffer for which to keep a fixed line count.


The "io" property

  "io"                       InfIo*                : Read / Write / Construct Only

The I/O object used to schedule line keeping.


The "lines" property

  "lines"                    guint                 : Read / Write / Construct Only

The number of lines to keep in the underlying buffer.

Default value: 0

See Also

InfTextBuffer, InfTextDefaultBuffer