swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows [swarm 1.2]


From: Marcus G. Daniels
Subject: Re: Windows [swarm 1.2]
Date: Thu, 23 Jul 1998 10:21:36 -0600

TS> I wonder what is the easiest way to build and _display_ a window. 

Make a top level frame (a frame with no parent), and then put stuff in it.
(see between the //[ and //]).

#import <gui.h>

int
main (int argc, const char **argv)
{
  id <Frame> top;
  id <Button> button;

  initSwarm (argc, argv);

// [
  top = [Frame create: globalZone];
  [top setWindowTitle: "Frame"];

  button = [Button createParent: top];
  [button setText: "Press me!"];
  [button pack];
// ]

  while (1)
    {
      while (GUI_EVENT_ASYNC ()) {}
    }
}

/*
Local Variables:
compile-command: "/opt/gnu/bin/gcc -V 2.7.2.3 -g -Wno-import 
-L/usr/local/blt2.3/lib -L/usr/local/lib -L$SWARMHOME/lib -I$SWARMHOME/include 
frame.m  -lsimtools -lsimtoolsgui -lactivity -ltkobjc -lrandom -lobjectbase  
-ldefobj -lcollections -lmisc  -ltclobjc.gcc2.7 -ltk4.2 -ltcl7.6 
-R/usr/local/blt2.3/lib -lBLT -lsocket -ldl -lnsl -L/opt/X11R6/lib -lXpm -lX11 
-lffi -lm -lobjc"
End:
*/


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]