home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / IOC / LANCELOT / LGENL.CPP < prev    next >
C/C++ Source or Header  |  1995-04-07  |  24KB  |  576 lines

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