DTEDITORFORMAT(3)
okay so bestie, this is DtEditorFormat, and the manual name is library call. itβs giving βformat my editor text, pleaseβ energy, and weβre about to go through the whole page. π
β¨
π NAME π
DtEditorFormat β format all or part of the contents of a DtEditor widget. periodt. π«Ά
β¨ SYNOPSIS β¨
#include &<Dt/Editor.h>
DtEditorErrorCode DtEditorFormat(
Widget widget,
DtEditorFormatSettings *formatSettings,
unsigned int amountToFormat);
πΈ DESCRIPTION πΈ
okay so DtEditorFormat formats all or part of the contents of the DtEditor widget according to the current text format settings in the Format Settings dialog. these options specify which margins and alignments (left aligned, right aligned, justified or centered) are used. optionally, alternative settings can be passed as an argument to DtEditorFormat in a data structure. this function formats either the paragraph containing the insertion cursor or the entire contents of the DtEditor widget, depending on the value of the amountToFormat argument. π¦
the Format Settings dialog is displayed with DtEditorInvokeFormatDialog(3). for a complete description of formatting and the Format Settings dialog, see DtEditor.
quick arg check, bestie: β¨
widgetβ specifies the editor widget ID. πformatSettingsβ specifies left margin value, right margin value and the justification style. theLeftMarginandRightMarginfields ofDtEditorFormatSettingsmust be zero or larger. theAlignmentfield can have a value ofDtEDITOR_ALIGN_CENTER,DtEDITOR_ALIGN_JUSTIFY,DtEDITOR_ALIGN_LEFTorDtEDITOR_ALIGN_RIGHT. if theformatSettingsargument isNULL,DtEditorFormatuses the last format settings specified in the Format Settings dialog. πamountToFormatβ when theamountToFormatargument is set toDtEDITOR_FORMAT_ALL, it reformats all the text in the edit window. when this argument is set toDtEDITOR_PARAGRAPH, only the paragraph containing the insertion cursor is formatted. π
for a complete definition of the DtEditor widget and its associated resources, see DtEditor(3).
for a complete definition of DtEditorFormatSettings, see Dt/Editor.h - DtEditor(5). π
π RETURN VALUE π
upon successful completion, the DtEditorFormat function returns DtEDITOR_NO_ERRORS; otherwise, it returns one of the following values:
DtEDITOR_NO_TMP_FILEβ theDtEditorFormatfunction cannot create two temporary files in the directory returned bytmpnam3S. πDtEDITOR_ILLEGAL_SIZEβ the left or right margin values are negative. πDtEDITOR_INVALID_RANGEβ theamountToFormatargument is not recognized. πDtEDITOR_INVALID_TYPEβ theAlignmentfield is not recognized. β
π SEE ALSO π
the whole squad, no cap:
Dt/Editor.h - DtEditor(5)DtEditor(3)DtEditorInvokeFormatDialog(3)tmpnam3S
thatβs the whole page, bestie β DtEditorFormat, library call, signing off from the footer with no separate source/version/date line to hype up. π«Άπ
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms