bn::window class
#include <bn_window.h>

Base window class.

Derived classes

class inside_window
Window which region can be covered by other window.

Public static functions

static auto internal() -> window
Returns the closest window to the screen.
static auto external() -> window
Returns the closest window to the screen not covered by the internal window.
static auto sprites() -> window
Returns the window made out of the visible pixels of the sprites with the window attribute enabled.
static auto outside() -> window
Returns the window of the region not covered by any other window.

Public functions

auto id() const -> int
Returns the internal ID.
auto show_bg(const regular_bg_ptr& regular_bg) const -> bool
Indicates if the specified background is shown in this window.
auto show_bg(const affine_bg_ptr& affine_bg) const -> bool
Indicates if the specified background is shown in this window.
void set_show_bg(const regular_bg_ptr& regular_bg, bool show)
Sets if the specified background must be shown in this window.
void set_show_bg(const affine_bg_ptr& affine_bg, bool show)
Sets if the specified background must be shown in this window.
auto show_sprites() const -> bool
Indicates if sprites are shown in this window.
void set_show_sprites(bool show)
Sets if sprites must be shown in this window.
auto show_blending() const -> bool
Indicates if blending is shown in this window.
void set_show_blending(bool show)
Sets if blending must be shown in this window.
auto show_all() const -> bool
Indicates if sprites, backgrounds and blending are shown in this window.
void set_show_all()
Show sprites, backgrounds and blending in this window.
auto show_nothing() const -> bool
Indicates if sprites, backgrounds and blending are hidden in this window.
void set_show_nothing()
Hide sprites, backgrounds and blending in this window.
void restore()
Restores this window to its initial state.

Friends

auto operator==(const window& a, const window& b) -> bool defaulted
Default equal operator.

Function documentation

bool bn::window::show_bg(const regular_bg_ptr& regular_bg) const

Indicates if the specified background is shown in this window.

Parameters
regular_bg Regular BG to ask for.
Returns true if the specified background is shown in this window, otherwise false.

bool bn::window::show_bg(const affine_bg_ptr& affine_bg) const

Indicates if the specified background is shown in this window.

Parameters
affine_bg Affine BG to ask for.
Returns true if the specified background is shown in this window, otherwise false.

void bn::window::set_show_bg(const regular_bg_ptr& regular_bg, bool show)

Sets if the specified background must be shown in this window.

Parameters
regular_bg Regular BG to show or hide.
show true if the specified background must be shown in this window, otherwise false.

void bn::window::set_show_bg(const affine_bg_ptr& affine_bg, bool show)

Sets if the specified background must be shown in this window.

Parameters
affine_bg Affine BG to show or hide.
show true if the specified background must be shown in this window, otherwise false.

void bn::window::set_show_sprites(bool show)

Sets if sprites must be shown in this window.

Parameters
show true if sprites must be shown in this window, otherwise false.

void bn::window::set_show_blending(bool show)

Sets if blending must be shown in this window.

Parameters
show true if blending must be shown in this window, otherwise false.