PreviousUpNext

15.3.722  src/lib/x-kit/widget/old/text/scrollable-string-editor.api

## scrollable-string-editor.pkg
#
# string_editor variant with arrow buttons for scrolling.
#
# Compare to:
#     src/lib/x-kit/widget/old/text/string-editor.api
#
#     "The [scrollable_string_editor package] provides a widget
#      derived from the string_editor widget.  The interface and
#      interaction are almost identical.  The only difference
#      is that the scrollable_string_editor widget provides
#      scroll buttons to allow the user to move the view of
#      the underlying text when it does not all fit within
#      the window.  The buttons are only made available when
#      this situation arises."
#
#        -- p33, Gansner+Reppy's 1993 eXene widget manual,
#           http://mythryl.org/pub/exene/1993-widgets.ps

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

# This api is implemented in:
#
#     src/lib/x-kit/widget/old/text/scrollable-string-editor.pkg

stipulate
    package wg =  widget;                       # widget        is from   src/lib/x-kit/widget/old/basic/widget.pkg
    package xc =  xclient;                      # xclient       is from   src/lib/x-kit/xclient/xclient.pkg
herein

    api Scrollable_String_Editor {

        Scrollable_String_Editor;

        make_scrollable_string_editor
            :
            wg::Root_Window
            ->
            { foreground:      Null_Or( xc::Rgb ),
              background:      Null_Or( xc::Rgb ),
              #
              initial_string:  String,
              min_length:      Int
            }
            ->
            Scrollable_String_Editor;

         set_string:  Scrollable_String_Editor -> String -> Void;
         get_string:  Scrollable_String_Editor -> String;

         as_widget:   Scrollable_String_Editor -> wg::Widget;

    };

end;

## COPYRIGHT (c) 1991 by AT&T Bell Laboratories
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext