Skip to content

Window

Represents a native window. On iOS and Android there can be only a single Window instance at a time currently.

Declaration

namespace bdn::ui {
    class Window : public View
}

Example

#include <bdn/ui/Window.h>
// ...
auto window = std::make_shared<Window>();
window->title = "My Awesome App";

Properties

  • const Property<Rect> contentGeometry

    (Read-only) The "safe" area that the content view will occupy.

  • Property<std::string> title

    The title of the window.

    On Android this will be reflected in the Activities Toolbar.

  • Property<std::shared_ptr<View>> contentView

    The content view of the window.

  • Property<Orientation> allowedOrientations

    The orientations the UI will rotate too.

  • Property<Orientation> currentOrientation

    The current orientation of the device.

Enums

enum Orientation : int
{
    Portrait = 0x1,
    LandscapeLeft = 0x2,
    LandscapeRight = 0x4,
    PortraitUpsideDown = 0x8,
    LandscapeMask = (LandscapeLeft | LandscapeRight),
    PortraitMask = (Portrait | PortraitUpsideDown),
    All = (LandscapeMask | PortraitMask)
};

Relationships

Inherits from: View

Source

Window.h