class
#include <bn_rect_window.h>
rect_window Rectangular window.
Base classes
- class inside_window
- Window which region can be covered by other window.
Public static functions
-
static auto internal() -> rect_
window - Returns the closest window to the screen.
-
static auto external() -> rect_
window - Returns the closest window to the screen not covered by the internal window.
Public functions
- auto top() const -> fixed
- Returns the position of the top boundary of this window (relative to its camera, if it has one).
- void set_top(fixed top)
- Sets the position of the top boundary of this window (relative to its camera, if it has one).
- auto left() const -> fixed
- Returns the position of the left boundary of this window (relative to its camera, if it has one).
- void set_left(fixed left)
- Sets the position of the left boundary of this window (relative to its camera, if it has one).
-
auto top_left() const -> const fixed_
point& - Returns the position of the top-left corner of this window (relative to its camera, if it has one).
- void set_top_left(fixed top, fixed left)
- Sets the position of the top-left corner of this window (relative to its camera, if it has one).
-
void set_top_left(const fixed_
point& top_left) - Sets the position of the top-left corner of this window (relative to its camera, if it has one).
- auto bottom() const -> fixed
- Returns the position of the bottom boundary of this window (relative to its camera, if it has one).
- void set_bottom(fixed bottom)
- Sets the position of the bottom boundary of this window (relative to its camera, if it has one).
- auto right() const -> fixed
- Returns the position of the right boundary of this window (relative to its camera, if it has one).
- void set_right(fixed right)
- Sets the position of the right boundary of this window (relative to its camera, if it has one).
-
auto bottom_right() const -> const fixed_
point& - Returns the position of the bottom-right corner of this window (relative to its camera, if it has one).
- void set_bottom_right(fixed bottom, fixed right)
- Sets the position of the bottom-right corner of this window (relative to its camera, if it has one).
-
void set_bottom_right(const fixed_
point& bottom_right) - Sets the position of the bottom-right corner of this window (relative to its camera, if it has one).
-
auto boundaries() const -> fixed_
rect - Returns the boundaries of this window (relative to its camera, if it has one) as a fixed_rect.
-
auto top_left_boundaries() const -> top_
left_ fixed_ rect - Returns the boundaries of this window (relative to its camera, if it has one) as a top_left_fixed_rect.
- void set_boundaries(fixed top, fixed left, fixed bottom, fixed right)
- Sets the boundaries of this window (relative to its camera, if it has one).
-
void set_boundaries(const fixed_
point& top_left, const fixed_ point& bottom_right) - Sets the boundaries of this window (relative to its camera, if it has one).
-
void set_boundaries(const fixed_
rect& boundaries) - Sets the boundaries of this window (relative to its camera, if it has one).
-
void set_boundaries(const top_
left_ fixed_ rect& boundaries) - Sets the boundaries of this window (relative to its camera, if it has one).
- void restore_boundaries()
- Restores the boundaries of this window to its initial values.
-
auto camera() const -> const optional<camera_
ptr>& - Returns the camera_
ptr attached to this rect window (if any). -
void set_camera(const camera_
ptr& camera) - Sets the camera_
ptr attached to this rect window. -
void set_camera(camera_
ptr&& camera) - Sets the camera_
ptr attached to this rect window. -
void set_camera(const optional<camera_
ptr>& camera) - Sets or removes the camera_
ptr attached to this rect window. -
void set_camera(optional<camera_
ptr>&& camera) - Sets or removes the camera_
ptr attached to this rect window. - void remove_camera()
- Removes the camera_
ptr attached to this rect window (if any).
Function documentation
void bn:: rect_window:: set_top_left(fixed top,
fixed left)
Sets the position of the top-left corner of this window (relative to its camera, if it has one).
Parameters | |
---|---|
top | Position of the top boundary of this window (relative to its camera, if it has one). |
left | Position of the left boundary of this window (relative to its camera, if it has one). |
void bn:: rect_window:: set_bottom_right(fixed bottom,
fixed right)
Sets the position of the bottom-right corner of this window (relative to its camera, if it has one).
Parameters | |
---|---|
bottom | Position of the bottom boundary of this window (relative to its camera, if it has one). |
right | Position of the right boundary of this window (relative to its camera, if it has one). |
void bn:: rect_window:: set_boundaries(fixed top,
fixed left,
fixed bottom,
fixed right)
Sets the boundaries of this window (relative to its camera, if it has one).
Parameters | |
---|---|
top | Position of the top boundary of this window (relative to its camera, if it has one). |
left | Position of the left boundary of this window (relative to its camera, if it has one). |
bottom | Position of the bottom boundary of this window (relative to its camera, if it has one). |
right | Position of the right boundary of this window (relative to its camera, if it has one). |
void bn:: rect_window:: set_boundaries(const fixed_ point& top_left,
const fixed_ point& bottom_right)
Sets the boundaries of this window (relative to its camera, if it has one).
Parameters | |
---|---|
top_left | Position of the top-left corner of this window (relative to its camera, if it has one). |
bottom_right | Position of the bottom-right corner of this window (relative to its camera, if it has one). |
void bn:: rect_window:: set_camera(const camera_ ptr& camera)
Sets the camera_
Parameters | |
---|---|
camera | camera_ |
void bn:: rect_window:: set_camera(camera_ ptr&& camera)
Sets the camera_
Parameters | |
---|---|
camera | camera_ |
void bn:: rect_window:: set_camera(const optional<camera_ ptr>& camera)
Sets or removes the camera_
Parameters | |
---|---|
camera | Optional camera_ |
void bn:: rect_window:: set_camera(optional<camera_ ptr>&& camera)
Sets or removes the camera_
Parameters | |
---|---|
camera | Optional camera_ |