INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Memo entry class"
project: "Visual Eiffel"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: grape
class MEMO_ENTRY
inherit

ENTRY_AREA
rename
make as make_entry
redefine
build,
get_size,
init,
on_destroy
end
creation

load,
make,
make_fixed,
makex
feature

NO_SCROLL: INTEGER

V_SCROLL: INTEGER

H_SCROLL: INTEGER

VH_SCROLL: INTEGER

LEFT: INTEGER

CENTER: INTEGER

RIGHT: INTEGER

scroll_direction: INTEGER

alignment: INTEGER

read_only_flag: BOOLEAN
feature

make (a_name: STRING; area: RECT; a_context: INTEGER)
-- Creates a multi-line entry-area control - a memo control,
-- with border, left justification an two directions scroll bar

make_fixed (a_name: STRING; area: RECT; a_context: INTEGER)
-- Creates a multi-line entry-area control - a memo control,
-- with border, left justification and without scroll bars, so text
-- entering is fixed.

makex (a_name: STRING; area: RECT; a_context: INTEGER; scroll_dir: INTEGER; align: INTEGER; state: BOOLEAN)
-- Creates a multi-line entry-area control - a memo control.
-- This is a function with maximum control capabilities.

get_size: INTEGER
-- Returns the size of the text entered in the memo field control

get_line (line_index: INTEGER): STRING
-- Retrieves the content of line specified by its number within the
-- memo entry
require
entry_area_is_created: sys_id /= 0

set_read_only (state: BOOLEAN)
-- Sets the read-only state of an memo control.When the state of a
-- memo entry area control is set to read-only, the user cannot
-- change the text within the edit control.

set_alignment (code: INTEGER)

set_scroll_direction (code: INTEGER)

get_line_count: INTEGER
-- Retrieves the number of lines in a memo entry area
require
entry_area_is_created: sys_id /= 0

get_char_line (char_offset: INTEGER): INTEGER
-- Retrieves a line number from a character index of the line that
-- contains the specified character index. A character index
-- is the number of characters from the beginning of the memo control.
require
entry_area_is_created: sys_id /= 0

get_line_index (line_number: INTEGER): INTEGER
--    Retrieves the character index of a line within a multiline memo
-- edit control. The character index is the number of characters from
-- the beginning of the memo edit control to the specified line.
-- The RETURN value is the character index of the line specified
-- in the line parameter, or it is -1 if the specified line number is
-- greater than the number of lines in the memo edit control.
require
entry_area_is_created: sys_id /= 0

get_length (line_index: INTEGER): INTEGER
-- returns the length of a specified line in a memo entry-area
require
entry_area_is_created: sys_id /= 0

get_first_visible_line: INTEGER
-- Returns the topmost visible line in an edit control.
require
entry_area_is_created: sys_id /= 0

scroll (vertical_step: INTEGER; horiz_step: INTEGER)
-- Scroll's the text of a memo edit control.
-- The memo entry area control does not scroll vertically past the last
-- line of text in the memo control. If the current line plus the number
-- of lines specified by the vertical_step parameter exceeds the total
-- number of lines in the memo control, the value is adjusted so that
-- the last line of the memo control is scrolled to the top of the
-- memo-control window.
require
entry_area_is_created: sys_id /= 0

on_destroy: INTEGER

build (rc: RESOURCE_CONTAINER; p: POINTER)
end -- class MEMO_ENTRY

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES