home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Mobile / Chip_Mobile_2001.iso / palm / business / printcar / printcar.exe / src / UI / FormObject.cc < prev    next >
C/C++ Source or Header  |  2000-06-03  |  624b  |  30 lines

  1. //
  2. //  $Id: FormObject.cc,v 1.1.1.1 2000/06/02 22:22:59 sergey Exp $
  3. //
  4.  
  5. #include <Pilot.h>
  6. #include "FormObject.h"
  7. #include "Form.h"
  8.  
  9.  
  10. namespace UI
  11. {
  12.     FormObject::FormObject(Form& parent, Word objectID):
  13.         _parent(&parent),
  14.         _objectID(objectID)
  15.     {}
  16.  
  17.     // operations
  18.  
  19.     void FormObject::setFocus()
  20.     {
  21.         FrmSetFocus(_parent->formPtr(), FrmGetObjectIndex(_parent->formPtr(), objectID()));
  22.     }
  23.  
  24.     bool FormObject::hasFocus() const
  25.     {
  26.         return FrmGetFocus(_parent->formPtr()) == FrmGetObjectIndex(_parent->formPtr(), objectID());
  27.     }
  28. }
  29. // namespace UI
  30.