📄 windows.h
字号:
/*****************************************************************************
*** Project: GUI for a Computer Network Simulator ***
*** Author: Hussein F. Salama ***
*** Date: September 9, 1994 ***
*** File: windows.h ***
*** A library of Motif widgets encapsulated in C++ classes ***
*****************************************************************************/
#ifndef WINDOWS_H
#define WINDOWS_H
#include <stdio.h>
#include <stdlib.h>
#include <Xm/Xm.h>
#include <Xm/Label.h>
#include <Xm/Form.h>
#include <Xm/PushB.h>
#include <Xm/RowColumn.h>
#include <Xm/CascadeB.h>
#include <Xm/DrawingA.h>
#include <Xm/Text.h>
#include <Xm/Separator.h>
#include <Xm/SelectioB.h>
#define OK 1
#define CANCEL 2
class widget { // base class inherited by all other window classes
protected:
Widget w;
int ac;
Arg al[10];
public:
widget();
virtual Widget getWidget() { return(w); };
}; // widget end
class messageBar : public widget { // the message bar in bottom of the window
public:
messageBar() {};
messageBar(Widget form);
void message(char* msg); //display a message in the message bar
}; // messageBar end
class commandBar : public widget { // the message bar in bottom of the window
public:
commandBar() {};
commandBar(Widget form);
void message(char* msg, int edit);//display a message in the command bar
char *getString();
}; // commandBar end
class menuItem : public widget { // menu item in a menu, e.g. Open
private:
char* itemName;
public:
menuItem() { itemName = new char[20]; };
menuItem(Widget parent, char *name, XtCallbackProc callback);
char* name() { return(itemName); };
}; // menuItem end
class menu : public widget { // menu on the menu bar, e.g. File
private:
char* menuName;
public:
menu() { menuName = new char[20]; };
menu(char *menuName, Widget bar);
menuItem addItem(char *name, XtCallbackProc callback);
menu addMenu(char *name);
char* name() { return(menuName); };
}; // menu end
class menuBar : public widget { // for menu bar objects
public:
menuBar(Widget form);
menu addMenu(char* menuName); // add a menu to the menu bar
}; // menuBar end
class drawingArea : public widget {
public:
drawingArea() { };
drawingArea(Widget form);
}; // drawingArea end
class separator : public widget {
public:
separator(Widget form);
}; // separator end
class dialog : public widget { // dialog boxes
public:
dialog() { };
dialog(Widget form, char* message, XtCallbackProc callback);
}; // dialog end
extern void drawingHandler(Widget w, XtPointer client_data, XEvent *event);
extern void Activate();
extern void refreshCB();
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -