749N/A/*
749N/A * $XConsortium: AsciiSrc.h,v 1.5 89/10/05 13:17:30 kit Exp $
749N/A *
749N/A * Copyright 1989 Massachusetts Institute of Technology
749N/A *
749N/A * Permission to use, copy, modify, and distribute this software and its
749N/A * documentation for any purpose and without fee is hereby granted, provided
749N/A * that the above copyright notice appear in all copies and that both that
749N/A * copyright notice and this permission notice appear in supporting
749N/A * documentation, and that the name of M.I.T. not be used in advertising or
749N/A * publicity pertaining to distribution of the software without specific,
749N/A * written prior permission. M.I.T. makes no representations about the
749N/A * suitability of this software for any purpose. It is provided "as is"
749N/A * without express or implied warranty.
749N/A *
749N/A */
749N/A
749N/A
749N/A/*
749N/A * AsciiSrc.h - Public Header file for Ascii Text Source.
749N/A *
749N/A * This is the public header file for the Ascii Text Source.
749N/A * It is intended to be used with the Text widget, the simplest way to use
749N/A * this text source is to use the AsciiText Object.
749N/A *
749N/A * Date: June 29, 1989
749N/A *
749N/A * By: Chris D. Peterson
749N/A * MIT X Consortium
749N/A * kit@expo.lcs.mit.edu
749N/A */
749N/A
749N/A
749N/A#ifndef _XawAsciiSrc_h
749N/A#define _XawAsciiSrc_h
749N/A
749N/A#include <./Xaw3_1TextSrc.h>
749N/A
749N/A/* Resources:
749N/A
749N/A Name Class RepType Default Value
749N/A ---- ----- ------- -------------
749N/A
749N/A
749N/A*/
749N/A
749N/A/* Class record constants */
749N/A
749N/Aextern WidgetClass asciiSrcObjectClass;
749N/A
749N/Atypedef struct _AsciiSrcClassRec *AsciiSrcObjectClass;
749N/Atypedef struct _AsciiSrcRec *AsciiSrcObject;
749N/A
749N/A/*
749N/A * Just to make people's lives a bit easier.
749N/A */
749N/A
749N/A#define AsciiSourceObjectClass AsciiSrcObjectClass
749N/A#define AsciiSourceObject AsciiSrcObject
749N/A
749N/A/*
749N/A * Resource Definitions.
749N/A */
749N/A
749N/A#define XtCDataCompression "DataCompression"
749N/A#define XtCPieceSize "PieceSize"
749N/A#define XtCType "Type"
749N/A#define XtCUseStringInPlace "UseStringInPlace"
749N/A
749N/A#define XtNdataCompression "dataCompression"
749N/A#define XtNpieceSize "pieceSize"
749N/A#define XtNtype "type"
749N/A#define XtNuseStringInPlace "useStringInPlace"
749N/A
749N/A#define XtRAsciiType "AsciiType"
749N/A
749N/A#define XtEstring "string"
749N/A#define XtEfile "file"
749N/A
749N/Atypedef enum {XawAsciiFile, XawAsciiString} XawAsciiType;
749N/A
749N/A/************************************************************
749N/A *
749N/A * Public routines
749N/A *
749N/A ************************************************************/
749N/A
749N/A/* Function Name: XawAsciiSourceFreeString
749N/A * Description: Frees the string returned by a get values call
749N/A * on the string when the source is of type string.
749N/A * Arguments: w - the AsciiSrc object.
749N/A * Returns: none.
749N/A */
749N/A
749N/Avoid XawAsciiSourceFreeString(/* w */);
749N/A/*
749N/AWidget w;
749N/A*/
749N/A
749N/A/* Function Name: XawAsciiSave
749N/A * Description: Saves all the pieces into a file or string as required.
749N/A * Arguments: w - the asciiSrc Object.
749N/A * Returns: TRUE if the save was successful.
749N/A */
749N/A
749N/ABoolean XawAsciiSave(/* w */);
749N/A/*
749N/AWidget w;
749N/A*/
749N/A
749N/A/* Function Name: XawAsciiSaveAsFile
749N/A * Description: Save the current buffer as a file.
749N/A * Arguments: w - the asciiSrc object.
749N/A * name - name of the file to save this file into.
749N/A * Returns: True if the save was sucessful.
749N/A */
749N/A
749N/ABoolean XawAsciiSaveAsFile(/* w, name */);
749N/A/*
749N/AWidget w;
749N/AString name;
749N/A*/
749N/A
749N/A/* Function Name: XawAsciiSourceChanged
749N/A * Description: Returns true if the source has changed since last saved.
749N/A * Arguments: w - the asciiSource object.
749N/A * Returns: a Boolean (see description).
749N/A */
749N/A
749N/ABoolean XawAsciiSourceChanged(/* w */);
749N/A/*
749N/AWidget w;
749N/A*/
749N/A
749N/A#ifdef XAW_BC
749N/A/*************************************************************
749N/A *
749N/A * These functions are only preserved for compatability.
749N/A */
749N/A
749N/A#define ASCII_STRING /* Turn on R3 AsciiDisk and AsciiString */
749N/A#define ASCII_DISK /* Emulation modes. */
749N/A
749N/A#ifdef ASCII_STRING
749N/A#define XawStringSourceDestroy XtDestroyWidget
749N/A#endif
749N/A
749N/A#ifdef ASCII_DISK
749N/A#define XawDiskSourceDestroy XtDestroyWidget
749N/A#endif
749N/A
749N/A#ifdef ASCII_STRING
749N/A/* Function Name: AsciiStringSourceCreate
749N/A * Description: Creates a string source.
749N/A * Arguments: parent - the widget that will own this source.
749N/A * args, num_args - the argument list.
749N/A * Returns: a pointer to the new text source.
749N/A */
749N/A
749N/AWidget XawStringSourceCreate(/* parent, args, num_args */);
749N/A/*
749N/AWidget parent;
749N/AArgList args;
749N/ACardinal num_args;
749N/A*/
749N/A#endif /* ASCII_STRING */
749N/A
749N/A#ifdef ASCII_DISK
749N/A/* Function Name: AsciiDiskSourceCreate
749N/A * Description: Creates a disk source.
749N/A * Arguments: parent - the widget that will own this source.
749N/A * args, num_args - the argument list.
749N/A * Returns: a pointer to the new text source.
749N/A */
749N/A
749N/AWidget XawDiskSourceCreate(/* parent, args, num_args */);
749N/A/*
749N/AWidget parent;
749N/AArgList args;
749N/ACardinal num_args;
749N/A*/
749N/A#endif /* ASCII_DISK */
749N/A#endif /* XAW_BC */
749N/A/*
749N/A * End of Compatability stuff.
749N/A *
749N/A ***************************************************/
749N/A
749N/A#endif /* _XawAsciiSrc_h - Don't add anything after this line. */
749N/A