PreviousUpNext

15.3.687  src/lib/x-kit/widget/old/fancy/graphviz/text/text-display.api

# text-display.api

# Compiled by:
#     src/lib/x-kit/widget/xkit-widget.sublib

# This api is implemented in:
#     src/lib/x-kit/widget/old/fancy/graphviz/text/text-display.pkg

stipulate
    include package   threadkit;                                # threadkit     is from   src/lib/src/lib/thread-kit/src/core-thread-kit/threadkit.pkg
    #
    package g2d =  geometry2d;                                  # geometry2d    is from   src/lib/std/2d/geometry2d.pkg
    #
#   package wg  =  widget;                                      # widget        is from   src/lib/x-kit/widget/old/basic/widget.pkg
    package tc  =  text_canvas;                                 # text_canvas   is from   src/lib/x-kit/widget/old/fancy/graphviz/text/text-canvas.pkg
    package tw  =  text_widget;                                 # text_widget   is from   src/lib/x-kit/widget/old/text/text-widget.pkg
    #
    package vb  =  view_buffer;                                 # view_buffer   is from   src/lib/x-kit/widget/old/fancy/graphviz/text/view-buffer.pkg
herein

    api Text_Display {

        Text_Display;

        make_text_display
            :
            { canvas:  tc::Text_Canvas,
              text:    vb::Text_Pool,
              size:    g2d::Size
            }
            ->
            Text_Display;

        resize:  (Text_Display, g2d::Size) -> Void;
            #
            # Update the size of the display.

        size_of:  Text_Display -> g2d::Size;
            #
            # Return size.

        make_typeball
            :
            (Text_Display,  List( tc::Typeball_Val ))
            ->
            tc::Typeball;
            #
            # Return a typeball for the display. 

        default_typeball:  Text_Display -> tc::Typeball;
            #
            # Return the default typeball for the display. 

        copy_typeball
            :
            (tc::Typeball,  List( tc::Typeball_Val ))
            ->
            tc::Typeball;
            #
            # Copy a typeball, updating some traits.

        scroll_v
            :
            Text_Display
            ->
            { from:  Int,
              to:    Int,
              high:  Int
            }
            ->
            { vacated:  g2d::Box,
              damage:   Mailop(  List(  g2d::Box ) )
            };
            #
            # Scroll a region vertically, returning the
            # vacated rectangle and a list of damaged
            # rectangles that must be redrawn.
            #
            # The region coordinates are in pixels:
            #   "from" is the y-coord of the top of the region;
            #   "high" is the height of the region; and
            #   "to"   is the y-coord of the new top of the region.

        scroll_h
            :
            Text_Display
            ->
            { from:  Int,
              to:    Int,
              wide:  Int
            }
            ->
            { vacated:  g2d::Box,
              damage:   Mailop(  List(  g2d::Box ) )
            };
            #
            # Scroll a region horizontally, returning the
            # vacated rectangle and a list of damaged
            # rectangles that must be redrawn.
            #
            # The region coordinates are in pixels:
            #   "from" is the x-coord of the l::h.s. of the region;
            #   "wide" is the width of the region; and
            #   "to" is the x-coord of new l::h.s. of the region.

        scroll_line
            :
            Text_Display
            ->
            { from:  tw::Char_Point,
              to:    Int,
              wide:  Int
            }
            ->
            { vacated:  g2d::Box,
              damage:   Mailop(  List(  g2d::Box ) )
            };
            #
            # Scroll the contents of a line horizontally. 

        scroll_up
            :
            Text_Display
            ->
            Int
            ->
            { vacated:  g2d::Box,
              damage:   Mailop(  List(  g2d::Box ) )
            };
            #
            # Scroll the text vertically so that
            # the specified row is at the top of
            # the display (i.e., scroll the text
            # up by the specified number of rows.

        scroll_down
            :
            Text_Display
            ->
            Int
            ->
            { vacated:  g2d::Box,
              damage:   Mailop(  List(  g2d::Box ) )
            };
            #
            # Scroll the text vertically so that
            # the top of the screen occupies the
            # specified row (i.e., scroll the text
            # down by the specified number of rows.

        clear_box
            :
            Text_Display
            ->
            g2d::Box
            ->
            Void;
            #
            # Clear the specified rectangle.

        clear_to_eol
            :
            Text_Display
            ->
            tw::Char_Point
            ->
            Void;
            #
            # Clear from the character coordinate
            # to the end of its line.

        clear_lines
            :
            Text_Display
            ->
            { start:  Int,
              stop:   Int
            }
            ->
            Void;
            #
            # Clear the lines [start..stop].

        clear_area
            :
            Text_Display
            ->
            { start:  tw::Char_Point,
              stop:   tw::Char_Point
            }
            ->
            Void;
            #
            # Clear the area from the coordinate
            # start to the coordinate stop. 

        redraw
            :
            Text_Display
            ->
            List( g2d::Box )
            ->
            Void;
            #
            #  Redraw the damaged region.

    };                  # api Text_Display

end;


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext