DtEditorGetContents man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

DtEditorGetContents(library call)	     DtEditorGetContents(library call)

       DtEditorGetContents — retrieve the contents of a DtEditor widget

       #include <Dt/Editor.h>
       DtEditorErrorCode DtEditorGetContents(
       Widget widget,
       DtEditorContentRec *data,
       Boolean hardCarriageReturns,
       Boolean markContentsAsSaved);

       The  DtEditorGetContents	 function  retrieves  the entire contents of a
       DtEditor widget as a string, wide character string or sized  buffer  of
       data.   The data is transferred from the DtEditor widget using a DtEdi‐
       torContentRec, which indicates the type of data being transferred along
       with the actual data.  If desired, any soft line feeds (word wraps) can
       be replaced with <newline>s.

       The DtEditor widget tracks whether its contents have changed since they
       were last saved or retrieved.  Setting the markContentsAsSaved argument
       to True retrieves a copy of the data without affecting  whether	DtEdi‐
       torCheckForUnsavedChanges(3)  reports  that  there are unsaved changes.
       This is useful if the application needs a temporary copy	 of  the  con‐

       The widget argument specifies the DtEditor widget ID.

       The  data argument is a pointer to a data structure to receive the con‐
       tents of widget.

       The hardCarriageReturns argument, if set to True,  indicates  that  the
       DtEditor	 widget	 should	 replace any soft line feeds (word wraps) with
       <newline>s when saving the data.	 When hardCarriageReturns  is  set  to
       False, any line wrapped because it reaches the right edge of the window
       is saved as one complete line.

       The markContentsAsSaved argument, if set to True, causes	 the  DtEditor
       widget  to  mark	 that  all changes made to date have been saved.  When
       markContentsAsSaved is set to  False,  the  DtEditor  widget  does  not
       change its status regarding unsaved changes.

       For  a  complete	 definition  of the DtEditor widget and its associated
       resources, see DtEditor(3).

       For a complete definition of DtEditorContentRec, see Dt/Editor.h - DtE‐

       Upon  successful	 completion,  the DtEditorGetContents function returns
       DtEDITOR_NO_ERRORS; otherwise, it returns DtEDITOR_INVALID_TYPE if  the
       Type field is not recognized.

       The following code segment retrieves the contents of a DtEditor widget,
       marking that all changes to date have been saved.

       Widget		       editor;
       DtEditorContentRec      cr;
       DtEditorErrorCode       status;
       Boolean		       markContentsAsSaved = True;
       cr.type = DtEDITOR_TEXT;
       status = DtEditorGetContents(editor, &cr, False, markContentsAsSaved);
       if (status == DtEDITOR_NO_ERRORS)
	       printf("The contents are:\n%s\n", cr.value.string);
	       printf("Unable to retrieve contents of the widget\n");

       To write the data directly to a file, the application should use DtEdi‐

       Dt/Editor.h  - DtEditor(5), DtEditor(3), DtEditorAppend(3), DtEditorAp‐
       pendFromFile(3), DtEditorCheckForUnsavedChanges(3),  DtEditorInsert(3),
       DtEditorInsertFromFile(3),   DtEditorReplace(3),	  DtEditorReplaceFrom‐
       File(3), DtEditorSaveContentsToFile(3), DtEditorSetContents(3),	DtEdi‐

					     DtEditorGetContents(library call)

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net