Annotation of 43BSDReno/share/doc/ucs/X/xtext.3x, revision 1.1

1.1     ! root        1: .TH XTEXT 3X "August 12 1985" "X Version 10"
        !             2: .SH NAME
        !             3: Xtext \- routines to provide simple text output windows
        !             4: .SH SYNOPSIS
        !             5: .nf
        !             6: .B #include <X/Xlib.h>
        !             7: .B #include <X/Xtext.h>
        !             8: .PP
        !             9: .fi
        !            10: .B TextWindow *TextCreate(width, height, x, y, parent, fontname, bwidth,
        !            11: .br
        !            12: .B             fgpixel, bgpixel, bordercolor, fastscroll);
        !            13: .br
        !            14: .B int height, width, x, y,
        !            15: .B bwidth, fgpixel, bgpixel, fastscroll;
        !            16: .nf
        !            17: .B Window parent;
        !            18: .B char *fontname;
        !            19: .B Pixmap bordercolor;
        !            20: .PP
        !            21: .B TextDestroy(t);
        !            22: .B TextWindow *t;
        !            23: .PP
        !            24: .B TextClear(t);
        !            25: .B TextWindow *t;
        !            26: .PP
        !            27: .B TextRedisplay(t);
        !            28: .B TextWindow *t;
        !            29: .PP
        !            30: .B int TextEvent(t, e);
        !            31: .B TextWindow *t;
        !            32: .B XEvent *e;
        !            33: .PP
        !            34: .B TextPutString(t, str);
        !            35: .B TextWindow *t;
        !            36: .B char *str;
        !            37: .PP
        !            38: .B TextPutChar(t, ch);
        !            39: .B TextWindow *t;
        !            40: .B char ch;
        !            41: .PP
        !            42: .fi
        !            43: .B TextPrintf(t, format
        !            44: .B  [ , arg ] ... )
        !            45: .nf
        !            46: .B TextWindow *t;
        !            47: .B char *format;
        !            48: .SH DESCRIPTION
        !            49: These functions provide a simple interface to text output windows.
        !            50: .PP
        !            51: .I TextCreate
        !            52: creates a window that is
        !            53: .I width
        !            54: characters wide and
        !            55: .I height
        !            56: characters high.  It is located with its upper left hand corner located
        !            57: at the point
        !            58: .I x, y
        !            59: in the window
        !            60: .I parent.
        !            61: The foreground (i.e. the characters) is in the color
        !            62: .I fgpixel
        !            63: and the background is the color
        !            64: .I bgpixel.
        !            65: The border is
        !            66: .I bwidth
        !            67: pixels wide and filled with the Pixmap
        !            68: .I bordercolor.
        !            69: If
        !            70: .I fastscroll
        !            71: is nonzero, text containing multiple newlines is displayed with a single
        !            72: jump scroll rather than with a single scroll for each newline.
        !            73: .PP
        !            74: The structure
        !            75: .I TextWindow
        !            76: is defined in
        !            77: \fI/usr/include/X/Xtext.h\fP.
        !            78: The only field that should be of interest to most applications is
        !            79: .I w,
        !            80: the X Window id of the created window.  This is quite useful if the
        !            81: application wishes to map the created window.
        !            82: .PP
        !            83: .I TextDestroy
        !            84: destroys the window described by its argument.  The window is also
        !            85: destroyed automatically if the process creating it is terminated.
        !            86: .PP
        !            87: .I TextClear
        !            88: clears the window described by its argument.
        !            89: .PP
        !            90: .I TextRedisplay
        !            91: redisplays the window described by its argument.
        !            92: .PP
        !            93: .I TextEvent
        !            94: handles the event passed to it.  It returns 0 if it was an event
        !            95: the library knows how to deal with, and 1 if it was an event of an
        !            96: unknown type; the latter should only happen if the application has
        !            97: changed the event mask for the window.  Any event that the application
        !            98: receives that has as its
        !            99: .I window
        !           100: the window id of the text window should be passed to
        !           101: .I TextEvent
        !           102: for handling.  Scrolling text generates an event per line of events, so the
        !           103: application should check for them frequently.
        !           104: .PP
        !           105: .I TextPutString
        !           106: prints its string in its window.  The character '\\n' (newline) is
        !           107: treated specially, and any other character is taken from the font.
        !           108: If the string contains multiple newlines, a single scroll is done for
        !           109: each line unless the
        !           110: .I fastscroll
        !           111: argument was non-zero in the call to
        !           112: .I TextCreate.
        !           113: .PP
        !           114: .I TextPutChar
        !           115: is similar to
        !           116: .I TextPutString
        !           117: but only prints a single character.  Again, newline is treated
        !           118: specially.
        !           119: .PP
        !           120: .I TextPrintf
        !           121: is similar to the standard function
        !           122: .I printf
        !           123: except that it prints its result in the specified window.  The
        !           124: resulting string is passed to
        !           125: .I TextPutString.
        !           126: See also the 
        !           127: .B BUGS
        !           128: section at the end of this page.
        !           129: .SH "SEE ALSO"
        !           130: printf(3S), xterm(1), X(8C)
        !           131: .SH AUTHOR
        !           132: Paul Asente, Stanford University
        !           133: .SH BUGS
        !           134: \fITextPrintf\fP will truncate the output if the resulting string is more than
        !           135: 2048 characters long.
        !           136: .PP
        !           137: Since X operates asynchronously, it is possible to get way ahead of the
        !           138: server.  This means that it may be quite a while between when a scroll
        !           139: happens on the screen and when \fIXtext\fP gets around to filling in areas
        !           140: that couldn't be scrolled normally.  This should only happen if the
        !           141: application issues a great many output requests very quickly, or if it
        !           142: doesn't get around to receiving the events \fIXtext\fP needs to fill these
        !           143: areas in.  Also, some strange TCP bugs are invoked if an application
        !           144: which has gotten far ahead of the X server is stopped (as with a
        !           145: control-Z).

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.