12.07.2015 Views

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Text <strong>Widget</strong>sFunction Inherit with Public <strong>Interface</strong> must specifyMaxHeightXtInherit-MaxHeightXawTextSinkMaxHeightGetCursorBoundsDisplaying Text<strong>Set</strong>Tabs XtInherit<strong>Set</strong>Tabs XawTextSink<strong>Set</strong>TabsXtInheritGetCursorBoundsXawTextSinkGetCursorBoundsTo display a section of the text buffer contained in the text source use the functionDisplayText:void DisplayText( w, y, pos2, highlight);nonoyeswxypos1pos2highlightSpecifies the TextSink object.Specifies the x location to start drawing the text.Specifies the y location to start drawing text.Specifies the location within the text source of the firstcharacter to be printed.Specifies the location within the text source of the lastcharacter to be printed.Specifies whether or not to paint the text region highlighted.The Text widget will only pass one line at a time to the text sink, so this functiondoes not need to know how to line feed the text. It is acceptable for this functionto just ignore Carriage Returns. x and y denote the upper left hand corner of thefirst character to be displayed.Displaying the Insert PointThe function that controls the display of the text cursor is InsertCursor. Thisfunction will be called whenever the text widget desires to change the state of, ormove the insert point.void InsertCursor( w, y, state);wxystateSpecifies the TextSink object.Specifies the x location of the cursor in Pixels.Specifies the y location of the cursor in Pixels.Specifies the state of the cursor, may be one of XawisOn orXawisOff.X and y denote the upper left hand corner of the insert point.85

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!