PreviousUpNext

15.4.1419  src/lib/x-kit/widget/edit/mode-to-drawpane.pkg

## mode-to-drawpane.pkg
#
# Here we define the port which
#
#     src/lib/x-kit/widget/edit/drawpane.pkg
#
# exports to modes like
#
#     src/lib/x-kit/widget/edit/dazzle-mode.pkg
#     src/lib/x-kit/widget/edit/fundamental-mode.pkg

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



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 nl  =  red_black_numbered_list;                                                     # red_black_numbered_list       is from   src/lib/src/red-black-numbered-list.pkg
    package d2p =  drawpane_to_textpane;                                                        # drawpane_to_textpane          is from   src/lib/x-kit/widget/edit/drawpane-to-textpane.pkg
herein

    # This port is implemented in:
    #
    #     src/lib/x-kit/widget/edit/drawpane.pkg
    #
    package mode_to_drawpane {
        #
        Cursor_At = CURSOR_AT_START
                  | CURSOR_AT_END
                  | NO_CURSOR
                  ;

        Linestate
          =
          { prompt:     String,                                                                 # Text to display before line.  Typically the empty string.
            text:       String,                                                                 # Text to display, starting in first visible column (column 0).
            cursor_at:  Cursor_At,                                                              # Screen-column for cursor, if it is visible on this line.
            selected:   Null_Or((Int,Null_Or(Int))),                                            # Columns to show as being selected (i.e., in reverse video).   NULL means no chars are selected on this line. THE(start,THE stop) designates columns 'start' to 'stop' inclusive.  THE(start,NULL) designates 'start' through end of line.
            screencol0: Int,                                                                    # Leftmost column to display -- used to scroll display horizontally.  0 means show leftmost part of each line.  Negative values are not allowed.
            background: rgb::Rgb
          };

        Mode_To_Drawpane
          =
          { drawpane_id:        Id,
            textpane_id:        Id                                                              # We belong to this Textpane instance.
          };
    };
end;




Comments and suggestions to: bugs@mythryl.org

PreviousUpNext