CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
UILayoutSolver.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2023 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "UILayout.hpp"
11
13
14namespace CeresEngine {
15
69
70} // namespace CeresEngine
An equation or inequality involving one or more variables.
Definition Constraint.hpp:38
Definition ConstraintSolver.hpp:26
Definition UILayoutSolver.hpp:16
void setConstraints(Vector< UILayoutConstraint > &&constraints)
Span< const UILayoutConstraint > getConstraints() const
void setConstraints(const Span< const UILayoutConstraint > &constraints)
void addConstraints(const Span< const UILayoutConstraint > &constraints)
void solve(const UIRect &bounds)
Solves the layout for the given bounds frame.
void removeConstraint(const UILayoutConstraint &constraint)
Remove a constraint from the solver.
bool mNeedsRebuild
Determines if the solver needs to be rebuilt.
Definition UILayoutSolver.hpp:27
bool hasConstraint(const UILayoutConstraint &constraint) const
Test whether a constraint has been added to the solver.
UISize solveFittingSize(const UISize &targetSize)
Vector< UILayoutConstraint > mConstraints
The.
Definition UILayoutSolver.hpp:24
void addConstraint(const UILayoutConstraint &constraint)
Add a constraint to the solver.
UIView & mView
The view this solver solves the layout for.
Definition UILayoutSolver.hpp:19
Constraint::ConstraintSolver mSolver
Definition UILayoutSolver.hpp:21
void removeConstraints(const Span< const UILayoutConstraint > &constraints)
The infrastructure for drawing and handling events in a UI.
Definition UIView.hpp:153
Definition Application.hpp:19
Size2 UISize
A type that contains width and height values.
Definition UIUtility.hpp:30
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
Rect2 UIRect
A structure that contains the location and dimensions of a rectangle.
Definition UIUtility.hpp:33
tcb ::span< T, Extent > Span
Span describes an object that can refer to a contiguous sequence of objects with the first element of...
Definition Span.hpp:708
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25