home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_10_07 / 1007034a < prev    next >
Text File  |  1992-03-22  |  966b  |  47 lines

  1. // WELCOME.L - Introductory Liana Program.
  2.  
  3. main
  4. {
  5.   w = new window ("Welcome to Liana");
  6.   w.menu = new menu
  7.     << new menuitem ("&Modify...")
  8.     << new helpmenu;
  9.   d = new modify_dialog;
  10.   d.skill = "novice";
  11.   d.impressed = true;
  12.   w.show;
  13. }
  14.  
  15. paint
  16. {
  17.   w << "Name: "+d.name+"\nSkill: "+d.skill+"\n"
  18.     << "Is "+(d.impressed ? "" : "not ")+"impressed";
  19. }
  20.  
  21. modify {if (d.show) w.refresh;}
  22.  
  23. /* The "Modify" dialog. */
  24. class modify_dialog: dialog {
  25. public:
  26.   string name, skill;
  27.   bool impressed;
  28.  
  29. modify_dialog
  30. {
  31.   dialog ("Modify");
  32.   this << new labeltext ("Name:")
  33.        << new edittext (20, "name");
  34.   this [0].under;
  35.   south ();
  36.   this << new groupbox ("Skill")
  37.        << new radiobutton ("&Novice")
  38.        << new radiobutton ("&Intermediate")
  39.        << new radiobutton ("&Expert")
  40.        << new endgroupbox;
  41.   this << new checkbox ("&Impressed");
  42.   east ();
  43.   this << new ok_button << new cancel_button;
  44. }
  45.  
  46. };
  47.