Sha256: 94ac0d6b74ffca0af2ef66cc5204dd3dc7f37216f3be0711ebbd253f4c60a794

Contents?: true

Size: 1.83 KB

Versions: 108

Compression:

Stored size: 1.83 KB

Contents

/***********************************************************************
 * FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
 * Copyright (c) 2001-2009 by Lyle Johnson. All Rights Reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * For further information please contact the author by e-mail
 * at "lyle@lylejohnson.name".
 ***********************************************************************/

/// Point
class FXPoint {
public:
  FXshort x;
  FXshort y;
public:

  /// Constructors
  FXPoint(const FXSize& s);
  FXPoint(const FXPoint& p);
  FXPoint(FXshort xx=0,FXshort yy=0);

  %extend {
    /// Equality
    bool operator==(const FXPoint& p) const { return *self == p; }
    }

  /// Negation
  FXPoint operator-();

  %extend {
    /// Other operators
    FXPoint operator+(const FXPoint& p) const { return *self + p; }
    FXPoint operator+(const FXSize& s) const { return *self + s; }
    FXPoint operator-(const FXPoint& p) const { return *self - p; }
    FXPoint operator-(const FXSize& s) const { return *self - s; }
    FXPoint operator*(FXshort c) const { return *self * c; }
    FXPoint operator/(FXshort c) const { return *self / c; }
    }
  };

Version data entries

108 entries across 108 versions & 2 rubygems

Version Path
fxruby-1.6.37-x86-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.37.rc1 swig-interfaces/FXPoint.i
fxruby-1.6.37.rc1-x64-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.37.rc1-x86-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.36 swig-interfaces/FXPoint.i
fxruby-1.6.36-x64-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.36-x86-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.35-x86-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.35-x64-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.35 swig-interfaces/FXPoint.i
fxruby-1.6.34-x86-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.34-x64-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.34 swig-interfaces/FXPoint.i
fxruby-1.6.33-x86-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.33-x64-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.33 swig-interfaces/FXPoint.i
fxruby-1.6.32-x86-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.32-x64-mingw32 swig-interfaces/FXPoint.i
fxruby-1.6.32 swig-interfaces/FXPoint.i
fxruby-1.6.32.pre2-x64-mingw32 swig-interfaces/FXPoint.i