📄 main.c
字号:
/************************************************************************* **** main.c **** **** Doodle -- Main Module **** *************************************************************************/#include <Xm/MainW.h>#include "doodle.h"/************************************************************************* **** G L O B A L V A R I A B L E S **** *************************************************************************/Widget appshell, /* Application Shell */ mainwin, /* XmMainWindow */ menubar, /* MainWindow Menu Bar */ workwin, /* MainWindow Work Area */ textwin; /* Work Window XmText widget */Arg arglist[16]; /* For programmatic rsrc stuf *//************************************************************************* **** F O R W A R D D E F I N I T I O N S **** *************************************************************************/static void InitMainWindow();static void InitOther();/************************************************************************* **** main( argc, argv ) **** **** Program entry point. Creates shell, calls initialization funcs, **** and turns control over to event loop. **** *************************************************************************/void main( argc, argv ) int argc; char *argv[];{ appshell = XtInitialize( argv[0], "Doodle", NULL, 0, &argc, argv ); InitMainWindow(); InitMenuBar(); InitWorkWindow(); XmMainWindowSetAreas( mainwin, menubar, NULL, NULL, NULL, workwin ); InitOther(); XtRealizeWidget( appshell ); XtMainLoop();}/************************************************************************* **** InitMainWindow() **** **** This function creates the main window widget and its scrollbars. **** The main window is created as a child of the application shell. **** The scrollbars are either created along with the main-window (if **** its "scrollingPolicy" resource contains TRUE) or separately. **** **** This function modifies the global "mainwin", and accesses the **** global "appshell". **** *************************************************************************/static void InitMainWindow(){ mainwin = XmCreateMainWindow( appshell, "MainWin", NULL, 0 ); XtManageChild( mainwin );}/************************************************************************* **** InitOther() **** **** This function currently does not do anything. It would be used **** to initialize doalog boxes and the like. **** *************************************************************************/static void InitOther(){}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -