home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C ++ / Frameworks / SCAPI 0.85 / Cross-platform code / MySCAPIWindow.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-30  |  2.5 KB  |  126 lines  |  [TEXT/CWIE]

  1. #include "MySCAPIWindow.h"
  2.  
  3. // Contructor - Destructor
  4.  
  5. MySCAPIWindow::MySCAPIWindow(    SCAPIApp*    inAppP,
  6.                                 char*        inTitle,
  7.                                 int            inOriginx,
  8.                                 int         inOriginy,
  9.                                 int            inWidth,
  10.                                 int            inHeight        )
  11.                                 
  12.                 : SCAPIWindow(                inAppP,
  13.                                             inTitle,
  14.                                             inOriginx,
  15.                                             inOriginy,
  16.                                             inWidth,
  17.                                             inHeight        )
  18. {
  19.     mMenuBarP = (MySCAPIMenuBar*) new MySCAPIMenuBar();
  20.     AssociateMenuBar(mMenuBarP);
  21.     
  22.     mButtonP = (SCAPIButton*) new SCAPIButton(    this,
  23.                                                 1500,
  24.                                                 "Go",
  25.                                                 50,
  26.                                                 50,
  27.                                                 75,
  28.                                                 30        );
  29.     //mButton->Disable();
  30.                                                 
  31.     mDefaultButtonP = (SCAPIDefaultButton*) new SCAPIDefaultButton(    this,
  32.                                                                     1501,
  33.                                                                     "OK",
  34.                                                                     50,
  35.                                                                     100,
  36.                                                                     75,
  37.                                                                     30        );
  38.     //mDefaultButton->Disable();
  39.                                                                     
  40.     mCheckBoxP = (SCAPICheckBox*) new SCAPICheckBox(    this,
  41.                                                         1502,
  42.                                                         "Choice",
  43.                                                         200,
  44.                                                         50            );
  45.                                                     
  46.     //mCheckBox->Disable();
  47.     //mCheckBox->Check();
  48.     
  49.     mGroupBoxP = (SCAPIGroupBox*) new SCAPIGroupBox(    this,
  50.                                                         "Group Box",
  51.                                                         180,
  52.                                                         80,
  53.                                                         110,
  54.                                                         120                );
  55.                                                     
  56.     //mGroupBox->Enable();
  57.                                                     
  58.     mRadioP = (SCAPIRadioButton*) new SCAPIRadioButton(    this,
  59.                                                             1503,
  60.                                                             "Radio 1",
  61.                                                             200,
  62.                                                             100,
  63.                                                             65,
  64.                                                             SCAPIRadioButton_default_height,
  65.                                                             TRUE                                );
  66.     //mRadio1->Disable();
  67.                                                     
  68.     mRadioP2 = (SCAPIRadioButton*) new SCAPIRadioButton(    this,
  69.                                                             1504,
  70.                                                             "Radio 2",
  71.                                                             200,
  72.                                                             130,
  73.                                                             65            );
  74.                                                         
  75.     mRadioP3 = (SCAPIRadioButton*) new SCAPIRadioButton(    this,
  76.                                                             1505,
  77.                                                             "Radio 3",
  78.                                                             200,
  79.                                                             160,
  80.                                                             65            );
  81. }
  82.  
  83. MySCAPIWindow::~MySCAPIWindow()
  84. {
  85.     delete mMenuBarP;
  86.     delete mButtonP;
  87.     delete mDefaultButtonP;
  88.     delete mCheckBoxP;
  89.     delete mRadioP;
  90.     delete mRadioP2;
  91.     delete mRadioP3;
  92. }
  93.  
  94.  
  95. // Member functions
  96.  
  97. void    MySCAPIWindow::ExecuteCommand(int    inCommand)
  98. {
  99.     
  100. }
  101.  
  102. void    MySCAPIWindow::CommandStatus(    int        inCommand,
  103.                                         bool    &outEnabled,
  104.                                         int        &outMark,
  105.                                         char*    outName        )
  106. {
  107.     switch (inCommand)
  108.     {
  109.         case 1010:
  110.             outMark = SCAPI_dot_mark;
  111.             break;
  112.             
  113.         case 1011:
  114.             outEnabled = TRUE;
  115.             break;
  116.             
  117.         case 1100:
  118.             outMark = SCAPI_check_mark;
  119.             break;
  120.             
  121.         case 1102:
  122.             outEnabled = TRUE;
  123.             break;
  124.     }
  125. }
  126.