Add support for position() and set_position() to C++ slint::Window

This commit is contained in:
Simon Hausmann 2022-07-07 21:10:44 +02:00 committed by Simon Hausmann
parent e499adf11e
commit 372ad60a8f
4 changed files with 81 additions and 4 deletions

View file

@ -0,0 +1,22 @@
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
#pragma once
namespace slint {
/// The Point structure is used to represent a two-dimensional point
/// with x and y coordinates.
template<typename T>
struct Point
{
/// The x coordinate of the point
T x;
/// The y coordinate of the point
T y;
/// Compares with \a other and returns true if they are equal; false otherwise.
bool operator==(const Point &other) const = default;
};
}