Gtkada.Multiline_Entry

Entities

Tagged Types

Access Types

Subprograms

Description

This package provides an implementation of multiline entries using the Gtk_Text_View and the Gtk_Scrolled_Window widgets.

Its purpose is to provide a simpler API and a style similar to the Gtk_Entry's one by default.

Gtkada_Multiline_Entry widgets can be referenced with the "entry" CSS main node: they can also be distinguished from the normal entries using the "multiline" CSS node.

Example:

.entry.multiline {background-color: black;}

<group>Numeric/Text Data Entry</group>

Get_Buffer

function Get_Buffer
  (Mult_Entry : not null access Gtkada_Multiline_Entry_Record)
   return Gtk_Text_Buffer

Return the buffer

Parameters
Mult_Entry
Return Value

Get_Scrolled_Window

function Get_Scrolled_Window
  (Mult_Entry : not null access Gtkada_Multiline_Entry_Record)
   return Gtk_Scrolled_Window

Return the associated scrolled window

Parameters
Mult_Entry
Return Value

Get_Text

function Get_Text
  (Mult_Entry : not null access Gtkada_Multiline_Entry_Record)
   return UTF8_String

Return the contents of the multiline entry widget, including newline characters if any.

Parameters
Mult_Entry
Return Value

Gtk_New

procedure Gtk_New
  (Mult_Entry : out Gtkada_Multiline_Entry)

Creates a new multiline entry, with its associated scrolled window.

Parameters
Mult_Entry

Gtkada_Multiline_Entry

type Gtkada_Multiline_Entry is
  access all Gtkada_Multiline_Entry_Record'Class;

Gtkada_Multiline_Entry_Record

type Gtkada_Multiline_Entry_Record is new Gtk_Frame_Record
with private;

Initialize

procedure Initialize
  (Mult_Entry : not null access Gtkada_Multiline_Entry_Record'Class)

Creates a new multiline entry, with its associated scrolled window.

Parameters
Mult_Entry

Set_Text

procedure Set_Text
  (Mult_Entry : not null access Gtkada_Multiline_Entry_Record;
   Text       : UTF8_String)

Set the contents of the multiline entry widget.

Parameters
Mult_Entry
Text