home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / include / xcosys.h < prev    next >
C/C++ Source or Header  |  1998-03-27  |  1KB  |  34 lines

  1. #ifndef __OOL_XCOSYS_H__
  2. #define __OOL_XCOSYS_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  6. /*===========================================================================*/
  7. /*                              class: XCoordinateSystem                     */
  8. /*                       derived from: XObject                               */
  9. /*                        last update: 3/98                                  */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13. #include "xfrmwnd.h"
  14.  
  15.  
  16. class XCoordinateSystem: public XObject
  17. {
  18.    public:
  19.       static void Convert( XRect * rect, const XWindow * window = NULL)
  20.          {
  21.             XRect r;
  22.             if( window )
  23.             {
  24.                window->GetSize(&r);
  25.                if(WinWindowFromID(window->GetHandle(), FID_TITLEBAR) != 0)
  26.                   r.SetHeight( r.GetHeight() - XWindow::GetSysValue( SV_CYTITLEBAR ));
  27.             } /* end if */
  28.             else
  29.                r.SetHeight( XWindow::GetSysValue( SV_CYSCREEN ) );
  30.             rect->SetY(r.GetHeight() - rect->GetY() - rect->GetHeight());
  31.          }
  32. };
  33.  
  34. #endif