GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
XmtMsgLineGetString(3) FreeBSD Library Functions Manual XmtMsgLineGetString(3)

XmtMsgLineGetString(), XmtMsgLineGetDouble(), XmtMsgLineGetInt(), XmtMsgLineGetUnsigned(), XmtMsgLineGetChar() - use an XmtMsgLine widget to synchronously get input from the user.

#include <Xmt/MsgLine.h>

String XmtMsgLineGetString(Widget w, String buf, int len)

Boolean XmtMsgLineGetDouble(Widget w, double *value_return)

Boolean XmtMsgLineGetInt(Widget w, int *value_return)

Boolean XmtMsgLineGetUnsigned(Widget w, unsigned *value_return)

int XmtMsgLineGetChar(Widget w)

INPUTS
w
An XmtMsgLine widget.
len
The size of the character buffer buf.

OUTPUTS

buf
For XmtMsgLineGetString(), a character buffer in which the user's input will be returned.
value_return
The address of a double, int or unsigned variable in which the user's numeric input will be returned.

RETURNS

XmtMsgLineGetString() returns buf, or NULL when cancelled.

The numeric input functions return True for valid input, or False when cancelled.

XmtMsgLineGetChar() returns the input character, or EOF when cancelled.

XmtMsgLineGetString() transfers keyboard focus to the XmtMsgLine widget w, disallows events to any other widgets, and enters an internal event loop to wait for the use to enter a string. When the user strikes Return, it copies the input string into buf, and null-terminates it. Then it resumes normal event handling, restores keyboard focus to its original location and returns buf. The user's input is guaranteed not to be longer than len-1 characters. The user can also cancel the input, generally by typing Escape or Ctrl-C. In this case, XmtMsgLineGetString() does not modify the contents of buf and returns NULL.

XmtMsgLineGetDouble(), XmtMsgLineGetInt(), and XmtMsgLineGetUnsigned() are closely related to XmtMsgLineGetString(). They also perform synchronous input, but only accept input characters that are legal in double, int, and unsigned values. When the user strikes Return, these functions convert the input to the appropriate numeric type, store it at the address specified by value_return and return True. If the user cancels the input, these functions return False without changing value_return.

XmtMsgLineGetChar() also performs synchronous input. It waits for the user to enter a character into the specified XmtMsgLine widget and returns that character, or if the user cancels the input it returns the constant EOF (defined in the header file <stdio.h>). This function differs from the other XmtMsgLine synchronous input functions in that it does not require the user to strike the Return key to enter the input-it returns after any single character is typed.

When using any of these functions, you must be sure to check their return values. If they return NULL, False or EOF then the user has requested that the operation in progress be cancelled.

Chapter 22, The Message Line,
XmtMsgLine, XmtMsgLineClear(), XmtMsgLineGetInput(), XmtMsgLinePop(), XmtMsgLinePrintf(), XmtMsgLinePush(), XmtMsgLineSet(), XmtMsgLineSetInput().
Motif Tools Xmt

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.