📄 xmibform.h
字号:
/******************************************************************************* form1.h This header file is included by form1.cc Copyright (c) 1996 Hewlett-Packard Company ATTENTION: USE OF THIS SOFTWARE IS SUBJECT TO THE FOLLOWING TERMS. Permission to use, copy, modify, distribute and/or sell this software and/or its documentation is hereby granted without fee. User agrees to display the above copyright notice and this license notice in all copies of the software and any documentation of the software. User agrees to assume all liability for the use of the software; Hewlett-Packard makes no representations about the suitability of this software for any purpose. It is provided "AS-IS without warranty of any kind,either express or implied. User hereby grants a royalty-free license to any and all derivatives based upon this software code base.*******************************************************************************/#ifndef _FORM1_INCLUDED#define _FORM1_INCLUDED#include <stdio.h>#include <Xm/Xm.h>#include <Xm/MwmUtil.h>#include <X11/Shell.h>#include <Xm/MenuShell.h>class CQueryForm{public: // Constructor Function CQueryForm( Widget UxParent ); // Interface Function Widget buildWidgets( void ); void displayText(char *text){ XmTextInsert(scrolledText, XmTextGetLastPosition(scrolledText), text); XmTextShowPosition(scrolledText, XmTextGetLastPosition(scrolledText)); } void disableGetNext(){ XtSetSensitive(pbQuery, 0); } void enableGetNext(){ XtSetSensitive(pbQuery, 1); } void updateOid(char * newOid){ XmTextFieldSetString(tfOid, newOid); }protected: // Widgets in the interface Widget form1; Widget lHost; Widget tfHostname; Widget lOid; Widget tfOid; Widget scrolledWindowText; Widget scrolledText; Widget pbQuery; Widget pbQuit; // Arg List of creation function Widget UxParent; // Callbacks and their wrappers virtual void activateCB_pbQuery(Widget, XtPointer, XtPointer); static void Wrap_activateCB_pbQuery(Widget, XtPointer, XtPointer); virtual void activateCB_pbQuit(Widget, XtPointer, XtPointer); static void Wrap_activateCB_pbQuit(Widget, XtPointer, XtPointer);} ;/******************************************************************************* Declarations of global functions.*******************************************************************************/Widget create_form1( Widget UxParent );/****************************************************************************** Utility macro******************************************************************************/#define RES_CONVERT( res_name, res_value) \ XtVaTypedArg, (res_name), XmRString, (res_value), strlen(res_value) + 1#endif /* _FORM1_INCLUDED */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -