mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 12:24:16 +00:00
Add support for position() and set_position() to C++ slint::Window
This commit is contained in:
parent
e499adf11e
commit
372ad60a8f
4 changed files with 81 additions and 4 deletions
22
api/cpp/include/slint_point.h
Normal file
22
api/cpp/include/slint_point.h
Normal 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;
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue