Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!wrdis01!gatech!bloom-beacon!dont-send-mail-to-path-lines From: jordan@tcs.COM (Jordan Hayes) Newsgroups: comp.windows.x Subject: Re: xrdb Message-ID: <9104122305.AA02190@dwight.tcs.com> Date: 12 Apr 91 23:05:22 GMT References: <7150@auspex.auspex.com> Sender: daemon@athena.mit.edu (Mr Background) Organization: Teknekron Communications Systems, Inc., Berkeley, CA. Has anybody ever run an application with *so* many resources (perhaps based on a "you can configure the shape, text, and color of every single button" toolkit), and with those resources all set, so Lines: 48 Well, resources or not, this little ditty makes my Sparc2 go out to lunch. /jordan ===== /* explode.c ... make a "bunch" of labels (how could anyone even * think of writing a spreadsheet where each cell was a widget? */ #include #include #include /* this is "big" ??? */ #define NUM_LABELS 1000 main(argc, argv) int argc; char **argv; { int i; char name[50]; XtAppContext app; Display *display; Widget shell, label[NUM_LABELS]; XtToolkitInitialize(); app = XtCreateApplicationContext(); display = XtOpenDisplay(app, (String)NULL, (String)NULL, "Explode", (XrmOptionDescRec *)NULL, 0, &argc, argv); shell = XtAppCreateShell(NULL, "Explode", applicationShellWidgetClass, display, (ArgList)NULL, (Cardinal)0); for (i = 0; i < NUM_LABELS; i++) { (void)sprintf(name, "label_%d", i); label[i] = XtCreateWidget(name, labelWidgetClass, shell, (ArgList)NULL, (Cardinal)0); } XtManageChildren(label, NUM_LABELS); XtRealizeWidget(shell); XtAppMainLoop(app); }