Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mstan!jordan From: jordan@Morgan.COM (Jordan Hayes) Newsgroups: comp.windows.news Subject: Re: Toolkits, toolkits, toolkits ... Message-ID: <634@s5.Morgan.COM> Date: 2 Jan 90 19:48:28 GMT References: <7391@ficc.uu.net> Reply-To: jordan@Morgan.COM (Jordan Hayes) Organization: Morgan Stanley and Co., NY, NY Lines: 34 Peter da Silva writes: But first make the easy things easy. "Hello World" in a windowing system shouldn't be more than 10 lines of code. Sigh. When will people learn to code before blabing on USENET? This is in Motif ... == not 10 lines but the meat is only 8 lines ... === main(argc, argv) int argc; char **argv; { Arg sArgs[3]; Display *display; Widget topW; XmString str; XtAppContext app; XtToolkitInitialize(); display = XtOpenDisplay(app = XtCreateApplicationContext(), (String)NULL, "Joe", "Hodedo", NULL, 0, &argc, argv); topW = XtAppCreateShell(NULL, NULL, applicationShellWidgetClass, display, NULL, 0); str = XmStringCreateLtoR("Hello World", XmSTRING_DEFAULT_CHARSET); XtSetArg(sArgs[0], XmNlabelString, (XtArgVal)str); XtManageChild(XmCreateLabel(topW, "label", sArgs, 1)); XtRealizeWidget(topW); XtAppMainLoop(app); } /jordan