home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / pmics.zip / a.cc next >
C/C++ Source or Header  |  1994-10-29  |  1KB  |  48 lines

  1. #include <iframe.hpp>
  2. #include <iapp.hpp>
  3. #include <imle.hpp>
  4. #include <imsgbox.hpp>
  5. #include <icolor.hpp>
  6. #include <string.h>
  7. #include <stdio.h>
  8.  
  9. main()
  10. {
  11.   IFrameWindow *fw = new IFrameWindow(0x1000);
  12.   IMultiLineEdit *mle = new IMultiLineEdit(0x1001,fw,fw,
  13.                        IRectangle(500,100));
  14.   int i;
  15.   char buf[10000];
  16.  
  17.   fw->setClient(mle);
  18.   fw->setFocus();
  19.   fw->show();
  20.  
  21.   buf[0] = 0;
  22.   for (i=0; i<20; i++) {
  23.     strcat(buf, "This is a test II\n");
  24.   }
  25.  
  26.   {
  27.     IMessageBox mb(fw);
  28.     char msgbuf[1000];
  29.     sprintf(msgbuf, "background: %8x", mle->color(IMultiLineEdit::background).asRGBLong());
  30.     mb.show((char *)msgbuf, IMessageBox::informationIcon |
  31.         IMessageBox::yesNoCancelButton |
  32.         IMessageBox::applicationModal |
  33.         IMessageBox::moveable);
  34.   }
  35.  
  36.   mle->addLineAsLast(buf);
  37.   mle->addLineAsLast(buf);
  38.   mle->addLineAsLast(buf);
  39.  
  40.   for (i=0; i<20; i++) { mle->add("one"); }
  41.   for (i=0; i<20; i++) { mle->addAsLast("one"); }
  42.   for (i=0; i<20; i++) { mle->addLine("one",1); }
  43.   for (i=0; i<20; i++) { mle->addAtOffset("one",0); }
  44.  
  45.  
  46.   IApplication::current().run();
  47. }
  48.