[Previous] [Contents] [Index] [Next]

PtTextCallback_t, PtTextControl_t, PtTextControlInfo_t

Information passed to PtText callbacks

Synopsis:

typedef struct Pt_text_callback {
        int           start_pos;
        int           end_pos;
        int           cur_insert;
        int           new_insert;
        int           length;
        short         reserved;
        char          *text;
        int           doit;
} PtTextCallback_t;
typedef PtTextCallback_t PtTextControl_t;
typedef PtTextControl_t PtTextControlInfo_t;

Description:

PtTextCallback_t, PtTextControl_t, and PtTextControlInfo_t are different names for the same structure. They're used in callbacks for PtText widgets as well as to specify actions or request data. The members of these structures are:

start_pos
The start position of the affected range of text.
end_pos
The end position of the affected range of text.
cur_insert
The character position where the cursor was located at the time of the change.
new_insert
The character position where the cursor will be located after the change.
length
The number of multibyte characters in the text string that's about to be added to the widget.
text
A pointer to length characters to be added to the widget.
doit
Indicates whether or not the change should be made to the widget's text. In a Pt_CB_MODIFY_VERIFY callback, you can prevent the text from being added to the widget by setting doit or length to zero.

Classification:

Photon

See also:

PtMultiTextCallback_t


[Previous] [Contents] [Index] [Next]