|
CeresEngine 0.2.0
A game development framework
|
#include <CeresEngine/UI/UILayoutSolver.hpp>
Public Member Functions | |
| UILayoutSolver (UIView &view) | |
| Span< const UILayoutConstraint > | getConstraints () const |
| void | setConstraints (const Span< const UILayoutConstraint > &constraints) |
| void | setConstraints (Vector< UILayoutConstraint > &&constraints) |
| void | addConstraint (const UILayoutConstraint &constraint) |
| Add a constraint to the solver. | |
| void | addConstraints (const Span< const UILayoutConstraint > &constraints) |
| void | removeConstraint (const UILayoutConstraint &constraint) |
| Remove a constraint from the solver. | |
| void | removeConstraints (const Span< const UILayoutConstraint > &constraints) |
| bool | hasConstraint (const UILayoutConstraint &constraint) const |
| Test whether a constraint has been added to the solver. | |
| void | solve (const UIRect &bounds) |
| Solves the layout for the given bounds frame. | |
| UISize | solveFittingSize (const UISize &targetSize) |
| void | setNeedsRebuild () |
| void | rebuildIfNeeded () |
| void | rebuild () |
Private Attributes | |
| UIView & | mView |
| The view this solver solves the layout for. | |
| Constraint::ConstraintSolver | mSolver |
| Vector< UILayoutConstraint > | mConstraints |
| The. | |
| bool | mNeedsRebuild = true |
| Determines if the solver needs to be rebuilt. | |
| CeresEngine::UILayoutSolver::UILayoutSolver | ( | UIView & | view | ) |
| void CeresEngine::UILayoutSolver::addConstraint | ( | const UILayoutConstraint & | constraint | ) |
Add a constraint to the solver.
| DuplicateConstraint | The given constraint has already been added to the solver. |
| UnsatisfiableConstraint | The given constraint is required and cannot be satisfied. |
| void CeresEngine::UILayoutSolver::addConstraints | ( | const Span< const UILayoutConstraint > & | constraints | ) |
| Span< const UILayoutConstraint > CeresEngine::UILayoutSolver::getConstraints | ( | ) | const |
| bool CeresEngine::UILayoutSolver::hasConstraint | ( | const UILayoutConstraint & | constraint | ) | const |
Test whether a constraint has been added to the solver.
| void CeresEngine::UILayoutSolver::rebuild | ( | ) |
| void CeresEngine::UILayoutSolver::rebuildIfNeeded | ( | ) |
| void CeresEngine::UILayoutSolver::removeConstraint | ( | const UILayoutConstraint & | constraint | ) |
Remove a constraint from the solver.
| UnknownConstraint | The given constraint has not been added to the solver. |
| void CeresEngine::UILayoutSolver::removeConstraints | ( | const Span< const UILayoutConstraint > & | constraints | ) |
| void CeresEngine::UILayoutSolver::setConstraints | ( | const Span< const UILayoutConstraint > & | constraints | ) |
| void CeresEngine::UILayoutSolver::setConstraints | ( | Vector< UILayoutConstraint > && | constraints | ) |
| void CeresEngine::UILayoutSolver::setNeedsRebuild | ( | ) |
Solves the layout for the given bounds frame.
|
private |
The.
Determines if the solver needs to be rebuilt.
|
private |
|
private |
The view this solver solves the layout for.