/*
 * Copyright 1994-1995 TriloBYTE Software Solutions.
 *
 * Author: Amen Zwa, TriloBYTE.
 */



// static char* sccsid = "XmWidget: %W%\t%G%\tAmen Zwa, TriloBYTE.";



// WFcsItm.h: focus item base class



#if !defined(WFcsItm_H)
#define WFcsItm_H

#include "WWidget.h"



// item that can take input focus
class WFcsItm : public WWidget {
protected:
    XtCallbackProc cp;			// focus callback procedure
    XtPointer usrdata;			// user data passed to callback
    void gain_focus(Boolean gainflg) {
	if (cp) cp(xtwgt, usrdata, XtPointer(gainflg)); }
public:
    WFcsItm() { cp = 0; usrdata = 0; }
    // access functions
    void set_cp_changefocus(XtCallbackProc c, XtPointer u=0) {
	cp = c; usrdata = u; }
    virtual void set_focus() = 0;
    virtual void set_focus(Boolean gainflg, Boolean kbdflg) = 0;
    // test functions
    virtual Boolean is_text() const { return False; }
};

#endif	// WFcsItm_H
