++ed by:

1 non-PAUSE user(s).

GROMMIER S├ębastien

NAME

Text::Editor::Easy::Abstract - The module that manages everything that is displayed.

VERSION

Version 0.49

SYNOPSIS

This is an internal module. It implements the graphical part in an abstract way : it should be compatible with different user interfaces, but at present, it works only with 'Tk'.

This module is used only by the graphical thread, with tid 0. All other threads that want to make graphic actions have to use the object interface : calling graphical methods on "Text::Editor::Easy" instances will be redirected here, in this module, and will allways be executed by the graphical thread.

Have a look at Text::Editor::Easy::Comm if you want more explanations about thread communications.

Have a look at Text::Editor::Easy, Text::Editor::Easy::Line, Text::Editor::Easy::Cursor, Text::Editor::Easy::Display if you want more explanations about the object interface.

PRINCIPLE

There are 2 (or 3 if we include the Text::Editor::Easy::File_manager module) complex modules in the "Text::Editor::Easy" tree. This module and the Text::Editor::Easy::Comm which handles communication between threads.

If you create a "Text::Editor::Easy" object, this 'Abstract' module will be called very often. Lots of methods are redirected here (but you don't even have to know that this module exists).

At the beginning (in 2006), there was only this "module-program". Little by little, this module has grown and has soon become an ugly mess (well, it still is !). When I decided to access the "text data" to be displayed in an another module, it became much simpler. At this very moment, I began to use more than one thread, and the number of different modules grew rapidly. This was the very good thing threads have brougth me : simplification by partition.

This module has only limited knowledge of what is in the file. It knows only what it has to display according to the police size and to the screen size.

When there is space to fill up, it asks "File_manager" for data. "File_manager" can provide data before or after a referenced line. When the user modify something, this module informs "File_manager".

As soon a line is no more on the screen, this module forgets it (destroy it for speed reason) : it relies entirely on "File_manager" to memorize what should be.

This trick has a big advantage. In fact, with my module, you can Edit text file of unlimited size with the same speed as little file. Not much Editors can do that. For huge file, my perl Editor is still usable whereas most C Editors are not. Of course, you could develop a C Editor with the same principle, ... good luck. With perl, it's just funny. In C, it's hard work.

FUNCTIONS

abstract_eval

abstract_join

abstract_size

add_tag

add_tag_complete

assist_on_inserted_text

bind_key

Affectation of code to a specific key for a specific instance (initial instance call "bind_key")

bind_key_global

Affectation of code to a specific key for all instances (initial class call "bind_key")

calc_line_position_from_display_position

change_reference

change_title

check_cursor

clean

clear_screen

clic

clipboard_get

Retrieve the content of the clipboard (for paste operation)

clipboard_set

Set the content of the clipboard (for copy operation)

concat

create_line_ref_from_ref

create_text_in_line

cursor_abs

cursor_display

cursor_get

cursor_set_shape

Test for future use of motion event according to position (borders of Text::Editor::Easy::Zone to resize them, for instance).

cursor_line

cursor_make_visible

cursor_position_in_display

cursor_position_in_text

cursor_set

cursor_virtual_abs

debug_display_lines

What is on the screen according to Abstract... ?

decrease_line_space

delete_return

delete_text_in_line

deselect

display

display_abs

display_bottom_of_the_screen

display_height

display_line_from_bottom

display_line_from_top

display_middle_ord

Return the middle ordinate of a displayed line.

display_next

display_next_is_same

display_number

display_ord

display_previous

display_previous_is_same

display_reference

display_reference_line

display_select

display_text

display_text_from_memory

display_top_of_the_screen

display_with_tag

divide_line

insert_mode

set_insert

set_replace

Selection of visible text that matches the search.

else

empty

enter

erase

examine_external_request

exit

focus

for

get_display_ref_from

get_display_ref_from_ord

get_displayed_editor

get_first_complete_line

get_line_number

get_line_number_from_ord

get_line_ords

get_line_ref_from_display_ref

get_line_ref_from_ord

get_line_ref_from_ref

get_position_from_line_and_abs

get_screen_size

graphic_kill

When an Text::Editor::Easy instance is created, data is created in several modules and for several threads. Destruction is not properly done at the moment.

if

increase_font

increase_line_space

indent_on_return

init

inser

insert

key

line_deselect

Deselection of a single line.

line_displayed

line_ref_abs

line_select

line_set

Set the content of a line.

manage_event

motion

wheel

move_bottom

new

on_editor_destroy

A zone event called when an editor has been closed : useful to change the tab state.

on_focus_lost

Event used to update Text::Editor::Easy configuration.

at_top

on_top_ref_editor

Returns the reference of the Text::Editor::Easy instance that is above the other.

parent

paste

Copy the clipboard content to the cursor position.

position_cursor_in_display

position_cursor_in_line

read_next_line

read_previous_line

reference_zone_event

resize

resize_all

complete_line

revert

screen_check_borders

Prevent space to appear at the bottom (after the last line) or at the top (before the first line).

screen_first

screen_font_height

screen_height

screen_last

screen_line_height

screen_margin

screen_move

screen_number

screen_set_height

COPYRIGHT & LICENSE

Copyright 2008 - 2009 Sebastien Grommier, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.




Hosting generously
sponsored by Bytemark