home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / ioc / lancelot / lgenl.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  23.6 KB  |  573 lines

  1. /******************************************************************************
  2. * .FILE:         lgenl.cpp                                                    *
  3. *                                                                             *
  4. * .DESCRIPTION:  Lancelot Sample Program:              Class Implementation   *
  5. *                                                                             *
  6. * .CLASSES:      GeneralPage                                                  *
  7. *                EmployeeType                                                 *
  8. *                                                                             *
  9. * .COPYRIGHT:                                                                 *
  10. *                                                                             *
  11. * .DISCLAIMER:                                                                *
  12. *                                                                             *
  13. * .NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE          *
  14. *                                                                             *
  15. ******************************************************************************/
  16.  
  17. #ifndef _IBASE_                         //Make sure ibase.hpp is included
  18.   #include <ibase.hpp>                  //  since that is where IC_<environ>
  19. #endif                                  //  is defined.
  20. #include <ireslib.hpp>
  21. #include <iexcbase.hpp>
  22. #include <ihelp.hpp>
  23. #include "lancelot.h"
  24. #include "lgenl.hpp"
  25.  
  26. //*****************************************************************************
  27. // CLASS GeneralPage - Contructor
  28. //*****************************************************************************
  29. GeneralPage :: GeneralPage(IWindow* pParent,
  30.                            const IString empNum)
  31.              : IMultiCellCanvas(ID_GENERAL_PAGE, pParent, pParent),
  32.                employeeData(empNum ),
  33.                pageButtons(ID_GENERAL_PAGE_BUTTONS,
  34.                           this,this, false),
  35.                employeeIdText  (ID_NO_ITEM, this, this ),
  36.                lastNameText    (ID_NO_ITEM, this, this ),
  37.                firstNameText   (ID_NO_ITEM, this, this ),
  38.                middleNameText  (ID_NO_ITEM, this, this ),
  39.                intPhoneText    (ID_NO_ITEM, this, this ),
  40.                extPhoneText    (ID_NO_ITEM, this, this ),
  41.                roomText        (ID_NO_ITEM, this, this ),
  42.                deptText        (ID_NO_ITEM, this, this ),
  43.                bldgText        (ID_NO_ITEM, this, this ),
  44.                divText         (ID_NO_ITEM, this, this ),
  45.                mgrEmpNumText   (ID_NO_ITEM, this, this ),
  46.                mgrEmpNameText  (ID_NO_ITEM, this, this ),
  47.                employeeId     (ID_GEN_EMPLOYEE_ID_EF   , this, this,
  48.                               IRectangle(),
  49.                               IEntryField::classDefaultStyle |
  50.                               IControl::tabStop),
  51.                lastName       (ID_GEN_LAST_NAME_EF     , this, this,
  52.                                IRectangle(),
  53.                                IEntryField::classDefaultStyle |
  54.                                IControl::tabStop),
  55.                firstName      (ID_GEN_FIRST_NAME_EF    , this, this,
  56.                                IRectangle(),
  57.                                IEntryField::classDefaultStyle |
  58.                                IControl::tabStop),
  59.                middleInitial  (ID_GEN_MIDDLE_INITIAL_EF, this, this,
  60.                                IRectangle(),
  61.                                IEntryField::classDefaultStyle |
  62.                                IControl::tabStop),
  63.                intPhone       (ID_GEN_INT_PHONE_EF, this, this,
  64.                                IRectangle(),
  65.                                IEntryField::classDefaultStyle |
  66.                                IControl::tabStop),
  67.                extPhone       (ID_GEN_EXT_PHONE_EF, this, this,
  68.                                IRectangle(),
  69.                                IEntryField::classDefaultStyle |
  70.                                IControl::tabStop),
  71.                room           (ID_GEN_ROOM_EF     , this, this,
  72.                                IRectangle(),
  73.                                IEntryField::classDefaultStyle |
  74.                                IControl::tabStop),
  75.                building       (ID_GEN_BUILDING_EF , this, this,
  76.                                IRectangle(),
  77.                                IEntryField::classDefaultStyle |
  78.                                IControl::tabStop),
  79.                deptName       (ID_GEN_DEPT_EF     , this, this,
  80.                                IRectangle(),
  81.                                IEntryField::classDefaultStyle |
  82.                                IControl::tabStop),
  83.                division       (ID_GEN_DIVISION_EF , this, this,
  84.                                IRectangle(),
  85.                                IEntryField::classDefaultStyle |
  86.                                IControl::tabStop),
  87.                employeeType   (this),
  88.                mgrEmpId       (ID_GEN_MGR_EMP_ID_EF, this, this,
  89.                                IRectangle(),
  90.                                IEntryField::classDefaultStyle |
  91.                                IControl::tabStop),
  92.                mgrName        (ID_GEN_MGR_NAME_EF  , this, this,
  93.                                IRectangle(),
  94.                                IEntryField::classDefaultStyle |
  95.                                IControl::tabStop),
  96.                Key(empNum),
  97.                thePageSettings( IApplication::current().userResourceLibrary().loadString(
  98.                                 STR_GEN_GENERAL_TAB), NULL,
  99.                                 INotebook::PageSettings::autoPageSize
  100.                                 | INotebook::PageSettings::majorTab ),
  101. #ifdef IC_MOTIF
  102.                alphaNumericHandler(this, TEST_ALPHANUMERIC),
  103.                alphaHandler(this, TEST_ALPHA),
  104.                alpha1Handler(this, TEST_LETTER),
  105.                phoneHandler(this, TEST_PHONE),
  106.                fullNameHandler(this, TEST_FULL_NAME ),
  107.                lastNameHandler(this, TEST_ALPHA),
  108. #endif
  109.               isAquery(false)
  110. {
  111.    // set up the fields
  112.    setUp();
  113.    if ( employeeId.text().length() )
  114.       employeeId.disableDataUpdate();
  115.  
  116.    // set up the page
  117.    setCells();
  118.  
  119.    // populate the page from any database info
  120.    displayData();
  121.    handleIt();
  122. }
  123.  
  124.  
  125. //*****************************************************************************
  126. // CLASS GeneralPage - Contructor  query
  127. //*****************************************************************************
  128. GeneralPage :: GeneralPage(IWindow* pParent
  129.                           , LQueryData& qd)
  130.              :IMultiCellCanvas(ID_GENERAL_PAGE, pParent, pParent),
  131.               employeeData(qd),
  132.               pageButtons(ID_GENERAL_PAGE_BUTTONS,
  133.                           this,this, true),
  134.               employeeIdText  (ID_NO_ITEM, this, this ),
  135.               lastNameText    (ID_NO_ITEM, this, this ),
  136.               firstNameText   (ID_NO_ITEM, this, this ),
  137.               middleNameText  (ID_NO_ITEM, this, this ),
  138.               intPhoneText    (ID_NO_ITEM, this, this ),
  139.               extPhoneText    (ID_NO_ITEM, this, this ),
  140.               roomText        (ID_NO_ITEM, this, this ),
  141.               deptText        (ID_NO_ITEM, this, this ),
  142.               bldgText        (ID_NO_ITEM, this, this ),
  143.               divText         (ID_NO_ITEM, this, this ),
  144.               mgrEmpNumText   (ID_NO_ITEM, this, this ),
  145.               mgrEmpNameText  (ID_NO_ITEM, this, this ),
  146.               employeeId     (ID_GEN_EMPLOYEE_ID_EF   , this, this,
  147.                               IRectangle(),
  148.                               IEntryField::classDefaultStyle |
  149.                               IControl::tabStop),
  150.               lastName       (ID_GEN_LAST_NAME_EF     , this, this,
  151.                               IRectangle(),
  152.                               IEntryField::classDefaultStyle |
  153.                               IControl::tabStop),
  154.               firstName      (ID_GEN_FIRST_NAME_EF    , this, this,
  155.                               IRectangle(),
  156.                               IEntryField::classDefaultStyle |
  157.                               IControl::tabStop),
  158.               middleInitial  (ID_GEN_MIDDLE_INITIAL_EF, this, this,
  159.                               IRectangle(),
  160.                               IEntryField::classDefaultStyle |
  161.                               IControl::tabStop),
  162.               intPhone       (ID_GEN_INT_PHONE_EF, this, this,
  163.                               IRectangle(),
  164.                               IEntryField::classDefaultStyle |
  165.                               IControl::tabStop),
  166.               extPhone       (ID_GEN_EXT_PHONE_EF, this, this,
  167.                               IRectangle(),
  168.                               IEntryField::classDefaultStyle |
  169.                               IControl::tabStop),
  170.               room           (ID_GEN_ROOM_EF     , this, this,
  171.                               IRectangle(),
  172.                               IEntryField::classDefaultStyle |
  173.                               IControl::tabStop),
  174.               building       (ID_GEN_BUILDING_EF , this, this,
  175.                               IRectangle(),
  176.                               IEntryField::classDefaultStyle |
  177.                               IControl::tabStop),
  178.               deptName       (ID_GEN_DEPT_EF     , this, this,
  179.                               IRectangle(),
  180.                               IEntryField::classDefaultStyle |
  181.                               IControl::tabStop),
  182.               division       (ID_GEN_DIVISION_EF , this, this,
  183.                               IRectangle(),
  184.                               IEntryField::classDefaultStyle |
  185.                               IControl::tabStop),
  186.               employeeType(this),
  187.               mgrEmpId (ID_GEN_MGR_EMP_ID_EF, this, this,
  188.                               IRectangle(),
  189.                               IEntryField::classDefaultStyle |
  190.                               IControl::tabStop),
  191.               mgrName  (ID_GEN_MGR_NAME_EF  , this, this,
  192.                               IRectangle(),
  193.                               IEntryField::classDefaultStyle |
  194.                               IControl::tabStop),
  195.               Key(qd.queryName()),
  196.               thePageSettings( IApplication::current().userResourceLibrary().loadString(
  197.                                STR_GEN_GENERAL_TAB), NULL,
  198.                                INotebook::PageSettings::autoPageSize
  199.                                | INotebook::PageSettings::majorTab ),
  200. #ifdef IC_MOTIF
  201.                alphaNumericHandler(this, TEST_ALPHANUMERIC),
  202.                alphaHandler(this, TEST_ALPHA),
  203.                alpha1Handler(this, TEST_LETTER),
  204.                phoneHandler(this, TEST_PHONE),
  205.                fullNameHandler(this, TEST_FULL_NAME ),
  206.                lastNameHandler(this, TEST_ALPHA),
  207. #endif
  208.               isAquery(true)
  209. {
  210.  
  211.    // set up the entry field limits
  212.    setUp();
  213.  
  214.    // set up the page
  215.    setCells();
  216.  
  217.    // this is a query do not query an employeeType unless selected
  218.    employeeType.deselectReg();
  219.    employeeType.deselectMgr();
  220.    employeeType.deselectSup();
  221.  
  222.    // populate the page from any database info
  223.    displayData();
  224.  
  225.    handleIt();
  226.  
  227. }
  228.  
  229.  
  230. //*****************************************************************************
  231. // CLASS GeneralPage :: handleIt()
  232. //*****************************************************************************
  233. GeneralPage&  GeneralPage :: handleIt()
  234. {
  235.    ICommandHandler::handleEventsFor( &pageButtons );
  236.    ISelectHandler::handleEventsFor( &pageButtons );
  237. #ifdef IC_MOTIF
  238.    if (!isAquery)
  239.    {
  240.      alphaNumericHandler.handleEventsFor( &employeeId );
  241.      alphaHandler.handleEventsFor( &lastName );
  242.      alphaHandler.handleEventsFor( &firstName );
  243.      alpha1Handler.handleEventsFor( &middleInitial );
  244.      phoneHandler.handleEventsFor( &intPhone );
  245.      phoneHandler.handleEventsFor( &extPhone );
  246.      alphaNumericHandler.handleEventsFor( &mgrEmpId );
  247.      fullNameHandler.handleEventsFor( &mgrName );
  248.    }
  249. #endif
  250.    return *this;
  251. }
  252. //*****************************************************************************
  253. // CLASS GeneralPage :: setUp()
  254. //*****************************************************************************
  255. GeneralPage&  GeneralPage :: setUp()
  256. {
  257.    employeeIdText.setText(  STR_GEN_EMPLOYEE_ID_TEXT);
  258.    lastNameText.setText(    STR_GEN_LAST_NAME_TEXT);
  259.    firstNameText.setText(   STR_GEN_FIRST_NAME_TEXT);
  260.    middleNameText.setText(  STR_GEN_MIDDLE_NAME_TEXT);
  261.    intPhoneText.setText(    STR_GEN_INT_PHONE_TEXT);
  262.    extPhoneText.setText(    STR_GEN_EXT_PHONE_TEXT);
  263.    roomText.setText(        STR_GEN_ROOM_TEXT);
  264.    deptText.setText(        STR_GEN_DEPT_TEXT);
  265.    bldgText.setText(        STR_GEN_BLD_TEXT);
  266.    divText.setText(         STR_GEN_DIV_TEXT);
  267.    mgrEmpNumText.setText(   STR_GEN_MGR_EMP_NUM_TEXT);
  268.    mgrEmpNameText.setText(  STR_GEN_MGR_EMP_NAME_TEXT);
  269.  
  270.    employeeId.setLimit   (DISPLAY_LARGE);
  271.    lastName.setLimit     (DISPLAY_LARGE);
  272.    firstName.setLimit    (DISPLAY_LARGE);
  273.    middleInitial.setLimit(DISPLAY_VERY_SMALL);
  274.    intPhone.setLimit     (DISPLAY_LARGE);
  275.    extPhone.setLimit     (DISPLAY_LARGE);
  276.    room.setLimit         (DISPLAY_LARGE);
  277.    building.setLimit     (DISPLAY_LARGE);
  278.    deptName.setLimit     (DISPLAY_LARGE);
  279.    division.setLimit     (DISPLAY_LARGE);
  280.    mgrEmpId.setLimit     (DISPLAY_LARGE);
  281.    mgrName.setLimit      (DISPLAY_LARGE);
  282.  
  283. /*---------------------------------------------------------------------------
  284. | On a VGA monitor, the general page almost completely fills the screen.    |
  285. | Therefore, reduce the default minimum size of the entryfields.            |
  286. ---------------------------------------------------------------------------*/
  287.    ISize efMinSize( employeeId.minimumSize() );
  288.    efMinSize.setWidth( efMinSize.width() - 40 );
  289.    employeeId.setMinimumSize   (efMinSize);
  290.    lastName.setMinimumSize     (efMinSize);
  291.    firstName.setMinimumSize    (efMinSize);
  292.    intPhone.setMinimumSize     (efMinSize);
  293.    extPhone.setMinimumSize     (efMinSize);
  294.    room.setMinimumSize         (efMinSize);
  295.    building.setMinimumSize     (efMinSize);
  296.    deptName.setMinimumSize     (efMinSize);
  297.    division.setMinimumSize     (efMinSize);
  298.    mgrEmpId.setMinimumSize     (efMinSize);
  299.    mgrName.setMinimumSize      (efMinSize);
  300.  
  301.    return *this;
  302. }
  303.  
  304.  
  305. //*****************************************************************************
  306. // CLASS GeneralPage :: ~GeneralPage()
  307. //*****************************************************************************
  308. GeneralPage :: ~GeneralPage()
  309. {
  310.    ICommandHandler::stopHandlingEventsFor( &pageButtons );
  311.    ISelectHandler::stopHandlingEventsFor( &pageButtons );
  312. #ifdef IC_MOTIF
  313.    if (!isAquery)
  314.    {
  315.      alphaNumericHandler.stopHandlingEventsFor( &employeeId );
  316.      alphaHandler.stopHandlingEventsFor( &lastName );
  317.      alphaHandler.stopHandlingEventsFor( &firstName );
  318.      alpha1Handler.stopHandlingEventsFor( &middleInitial );
  319.      phoneHandler.stopHandlingEventsFor( &intPhone );
  320.      phoneHandler.stopHandlingEventsFor( &extPhone );
  321.      alphaNumericHandler.stopHandlingEventsFor( &mgrEmpId );
  322.      fullNameHandler.stopHandlingEventsFor( &mgrName );
  323.    }
  324. #endif
  325. }
  326.  
  327. //*****************************************************************************
  328. // CLASS GeneralPage :: setCells() - set up the multi-cell canvas cells
  329. //*****************************************************************************
  330. GeneralPage&  GeneralPage :: setCells()
  331. {
  332. /*---------------------------------------------------------------------------
  333. | Add objects to the multicell.                                             |
  334. | Allow the entryfields to dynamically widen if the user enlarges the       |
  335. | notebook.                                                                 |
  336. ---------------------------------------------------------------------------*/
  337.    //                         col,row,col,row
  338.    addToCell(&employeeIdText ,  2,  2);
  339.    addToCell(&employeeId     ,  3,  2);
  340.    setColumnWidth( 3, 2, true );
  341.  
  342.    addToCell(&lastNameText   ,  2,  4);
  343.    addToCell(&lastName       ,  3,  4);
  344.    setColumnWidth( 3, 2, true );
  345.  
  346.    addToCell(&firstNameText  ,  5,  4);
  347.    addToCell(&firstName      ,  6,  4);
  348.    setColumnWidth( 6, 2, true );
  349.  
  350.    addToCell(&middleNameText ,  8,  4,  2, 1);
  351.    addToCell(&middleInitial  , 10,  4,  2, 1);
  352.  
  353.    addToCell(&intPhoneText    , 2,  6);
  354.    addToCell(&intPhone        , 3,  6);
  355.    setColumnWidth( 3, 2, true );
  356.  
  357.    addToCell(&extPhoneText    , 5,  6);
  358.    addToCell(&extPhone        , 6,  6);
  359.    setColumnWidth( 6, 2, true );
  360.  
  361.    addToCell(&roomText        , 2,  8);
  362.    addToCell(&room            , 3,  8);
  363.    setColumnWidth( 3, 2, true );
  364.  
  365.    addToCell(&bldgText        , 5,  8);
  366.    addToCell(&building        , 6,  8);
  367.    setColumnWidth( 6, 2, true );
  368.  
  369.    addToCell(&deptText        , 2, 10);
  370.    addToCell(&deptName        , 3, 10);
  371.    setColumnWidth( 3, 2, true );
  372.  
  373.    addToCell(&divText         , 5, 10);
  374.    addToCell(&division        , 6, 10);
  375.    setColumnWidth( 6, 2, true );
  376.  
  377.    addToCell(&employeeType    , 2, 12, 5, 5);
  378.  
  379.    addToCell(&mgrEmpNumText   , 2, 19);
  380.    addToCell(&mgrEmpId        , 3, 19);
  381.    setColumnWidth( 3, 2, true );
  382.  
  383.    addToCell(&mgrEmpNameText  , 5, 19);
  384.    addToCell(&mgrName         , 6, 19);
  385.    setColumnWidth( 6, 2, true );
  386.  
  387.    addToCell(&pageButtons     , 2, 21, 5, 4);
  388.  
  389.    return *this;
  390. }
  391.  
  392.  
  393. //*****************************************************************************
  394. // CLASS GeneralPage :: displayData() - set up
  395. //*****************************************************************************
  396. GeneralPage&  GeneralPage :: displayData()
  397. {
  398.  
  399.     employeeId.setText(   employeeData.employeeNumber());
  400.     lastName.setText(     employeeData.lastName());
  401.     firstName.setText(    employeeData.firstName());
  402.     middleInitial.setText(employeeData.middleInitial());
  403.     intPhone.setText(     employeeData.internalPhone() );
  404.     extPhone.setText(     employeeData.externalPhone());
  405.     room.setText(         employeeData.room());
  406.     building.setText(     employeeData.building());
  407.     deptName.setText(     employeeData.department());
  408.     division.setText(     employeeData.division());
  409.  
  410.     switch ((LEmployeeData::EmplType)employeeData.employeeType()) {
  411.  
  412.       case (LEmployeeData::Regular):    //Get the original data back
  413.            employeeType.selectReg();
  414.            break;
  415.       case (LEmployeeData::Manager):
  416.            employeeType.selectMgr();
  417.            break;
  418.       case (LEmployeeData::Supplemental):
  419.            employeeType.selectSup();
  420.            break;
  421.     }
  422.  
  423.     mgrEmpId.setText(employeeData.managerNumber());
  424.     mgrName.setText(employeeData.managerName());
  425.  
  426.     return *this;
  427.  
  428. }
  429.  
  430.  
  431. //*****************************************************************************
  432. // CLASS GeneralPage :: verifyAndSave() - save database info
  433. //*****************************************************************************
  434. IBase :: Boolean GeneralPage :: verifyAndSave( IString& theString,
  435.                                                IString& theEntry,
  436.                                                const IString theName )
  437. {
  438.  
  439.     /*  verify data for correctness */
  440.  
  441.     if ((theName.length() == 0) && (employeeId.text().length() == 0 ))
  442.         return true;
  443.  
  444.     // save person information
  445.     if ((theName.length() == 0 ) && (employeeId.text().isAlphanumeric()))
  446.         Key = employeeId.text();
  447.     else
  448.        Key = theName;
  449.  
  450.     // prime the page from data area
  451.     setEmployeeData();
  452.  
  453.     //-------------------------------------------------------------------------
  454.     // Save the query
  455.     // The key is either what was passed in or the employee number
  456.     //-------------------------------------------------------------------------
  457.     if (theName.length()>0)
  458.        employeeData.save(theName);
  459.     else
  460.        if ( (!isAquery) &&
  461.             (Key.length()> 0 ))
  462.              employeeData.save(Key);
  463.  
  464.      return true;
  465. }
  466.  
  467.  
  468.  
  469. //*****************************************************************************
  470. // CLASS GeneralPage :: setEmployeeData() - set page info to data area
  471. //*****************************************************************************
  472. GeneralPage&  GeneralPage :: setEmployeeData()
  473. {
  474.  
  475.      LEmployeeData::EmplType emplType;
  476.  
  477.      employeeData.setEmployeeNumber(employeeId.text());
  478.      employeeData.setLastName(      lastName.text());
  479.      employeeData.setFirstName(     firstName.text());
  480.      employeeData.setMiddleInitial( middleInitial.text());
  481.      employeeData.setInternalPhone( intPhone.text());
  482.      employeeData.setExternalPhone( extPhone.text());
  483.      employeeData.setRoom(          room.text());
  484.      employeeData.setBuilding(      building.text());
  485.      employeeData.setDepartment(    deptName.text());
  486.      employeeData.setDivision(      division.text());
  487.  
  488.      if (employeeType.isRegSelected())
  489.         emplType = (LEmployeeData:: Regular);
  490.      else
  491.      if (employeeType.isMgrSelected())
  492.         emplType = (LEmployeeData:: Manager);
  493.      else
  494.      if (employeeType.isSupSelected())
  495.         emplType = (LEmployeeData:: Supplemental);
  496.      else
  497.         emplType = (LEmployeeData:: Unemployed);
  498.  
  499.      employeeData.setEmployeeType(emplType);
  500.  
  501.      employeeData.setManagerNumber(mgrEmpId.text());
  502.      employeeData.setManagerName(  mgrName.text());
  503.  
  504.      return *this;
  505. }
  506.  
  507.  
  508. //*****************************************************************************
  509. // CLASS GeneralPage :: command() - command handler
  510. //*****************************************************************************
  511. IBase :: Boolean GeneralPage :: command(ICommandEvent &cmdEvent)
  512. {
  513.  
  514.   switch (cmdEvent.commandId()) {       //Get command id
  515.  
  516.     case ID_BUTTON_UNDO:                       //Get the original data back
  517.       this->displayData();
  518.       return(true);                     //Return command processed
  519.       break;                            //
  520.  
  521.     case ID_BUTTON_HELP:
  522.        // Product Information processing
  523.        IHelpWindow::helpWindow( this )->show(
  524.            IResourceId( ID_GENERAL_PAGE ) );
  525.        return true;
  526.  
  527.   } /* end switch */
  528.  
  529.   return(false);                        //Return command not processed
  530.  
  531. }
  532.  
  533. //*****************************************************************************
  534. // CLASS  EmployeeType - EmployeeType - constructor
  535. //*****************************************************************************
  536. EmployeeType :: EmployeeType(IWindow* pParent )
  537.               : ISetCanvas(ID_EMPLOYEE_TYPE_GROUP_BOX, pParent, pParent,
  538.                            IRectangle(),
  539. #ifdef IC_MOTIF
  540.                            defaultStyle() | ISetCanvas::border ),
  541. #else
  542.                            defaultStyle() ),
  543. #endif
  544.                 reg(ID_GEN_REG_BT,  this, this),
  545.                 mgr(ID_GEN_MGR_BT,  this, this),
  546.                 sup(ID_GEN_SUP_BT,  this, this)
  547. {
  548.    reg.setText(STR_GEN_REG_TEXT);
  549.    mgr.setText(STR_GEN_MGR_TEXT);
  550.    sup.setText(STR_GEN_SUP_TEXT);
  551.    setText(STR_GEN_EMPLOYEE_TYPE_TEXT);
  552.  
  553.    setDeckOrientation(ISetCanvas::horizontal);
  554.  
  555.    // a regular employee is the default
  556.    reg.select();
  557. }
  558.  
  559. //***************************************************************************** */
  560. // Class EmployeeType :: ~EmployeeType() _ Destructor
  561. //*****************************************************************************
  562. EmployeeType :: ~EmployeeType()
  563. {}
  564.  
  565. //*****************************************************************************
  566. // CLASS GeneralPage - pageSettings()
  567. //*****************************************************************************
  568. INotebook :: PageSettings GeneralPage :: pageSettings()
  569. {
  570.    return thePageSettings;
  571. }
  572.  
  573.