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



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



// WCtl.h: control base class



#if !defined(WCTL_H)
#define WCTL_H

#include "WWidget.h"



class WCtl : public WWidget {
protected:
    char ctltxt[STRLEN];		// control text
public:
    WCtl() { ctltxt[0] = '\0'; }
    WCtl(const char* s) { strcpy(ctltxt, s ? s : ""); }
    // access functions
    void set_text(const char* s) {
	strcpy(ctltxt, s);
	XtVaSetValues(xtwgt, XtVaTypedArg, XmNlabelString,
	    XmRString, ctltxt, strlen(ctltxt)+1, 0); }
    const char* get_text() const { return ctltxt; }
    virtual void set_value(int) { }
    virtual int get_value() const { return -1; }
};

#endif	// WCTL_H
