CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
UIClipView.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-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "UIView.hpp"
11
12namespace CeresEngine {
13
25 class UIClipView : public UIView {
26 using super = UIView;
27
28 private:
31
42
43 public:
46
49
50 public:
53 void scroll(const UIPoint& newOrigin);
54
58
65
66 public:
68 void layoutSubviews() override;
69
71 void displayIgnoringOpacity(UIGraphicsContext &context, const UIRect &aRect) override;
72
73 protected:
75
76 protected:
78 };
79
80} // namespace CeresEngine
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Pointer get() const noexcept
Definition SmartPtr.hpp:244
An object that represents a graphics context.
Definition GraphicsContext.hpp:45
An object that clips a document view to a scroll view's frame.
Definition UIClipView.hpp:25
void setDocumentView(UIView *documentView)
The clip view's document view.
UIEdgeInsets mContentInsets
The distance that the content view is inset from the enclosing scroll view.
Definition UIClipView.hpp:41
void scroll(const UIPoint &newOrigin)
Changes the origin of the clip view's bounds rectangle to newOrigin.
void displayIgnoringOpacity(UIGraphicsContext &context, const UIRect &aRect) override
Displays the view but does not back up to the first opaque ancestor—it simply causes the view and its...
UIViewPtr mDocumentView
The clip view's document view.
Definition UIClipView.hpp:30
UIRect getDocumentVisibleRect() const
The exposed rectangle of the clip view's document view, in the document view's own coordinate system.
UIView * getDocumentView() const
The clip view's document view.
Definition UIClipView.hpp:45
void layoutSubviews() override
Lays out subviews.
UIPoint constrainScrollPoint(UIPoint point)
UIRect getDocumentRect() const
The rectangle defining the document view's frame, adjusted to the size of the clip view if the docume...
The infrastructure for drawing and handling events in a UI.
Definition UIView.hpp:153
UIView()
Initializes new UIView object with an empty frame rectangle.
Definition Application.hpp:19
Rect2Edge UIEdgeInsets
The inset distances for views.
Definition UIUtility.hpp:42
Rect2 UIRect
A structure that contains the location and dimensions of a rectangle.
Definition UIUtility.hpp:33
Point2 UIPoint
A type that contains a point in a two-dimensional coordinate system.
Definition UIUtility.hpp:27
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25