morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::ShellFrame Class Reference

The frame around a client's screens. More...

#include <shell_frame.hpp>

Public Member Functions

 ShellFrame (IViewBackend &backend, ContainerWidget *parent, ShellFrameOptions options)
 The frame, appended to parent.
 ShellFrame (ShellFrame const &)=delete
ShellFrame & operator= (ShellFrame const &)=delete
 ShellFrame (ShellFrame &&)=delete
ShellFrame & operator= (ShellFrame &&)=delete
ContainerWidget & page () noexcept
 The container the client places the workspace in.
Navigator & navigator () noexcept
 The navigator in the sidebar.
ContainerWidget & headSlot () noexcept
 The container in the top bar a client mounts the active screen's head row into, beside the title.
void setTitle (std::string_view title)
 Shows the shown screen's title in the top bar.
void setPrincipal (std::string_view principal)
 Shows who is signed in, in the top bar.
void showSignedIn (bool signedIn)
 Shows or hides the sidebar and the top bar: signed out, the page is all there is.
void showToast (std::string_view text, Tone tone)
 Shows a passive, transient message over the frame's main content area. Made the first time it is asked for; a later call replaces its text and tone and restarts its dismiss interval, whether or not it is still showing.

Detailed Description

The frame around a client's screens.

A row filling the window: the sidebar (surface sidebar, kShellSidebarWidth units wide), holding the application's name and a Navigator, and the main column holding the top bar (surface toolbar: the shown screen's title, a slot for its active tab's head row, the principal and a sign-out button) above the page (surface page), where the client places the workspace. Signed out, the sidebar and the top bar are hidden and the page is all there is. Neither copyable nor movable; owned by the owner thread of its backend.

Definition at line 42 of file shell_frame.hpp.

Constructor & Destructor Documentation

◆ ShellFrame()

morph::ui::ShellFrame::ShellFrame ( IViewBackend & backend,
ContainerWidget * parent,
ShellFrameOptions options )
inline

The frame, appended to parent.

Parameters
backendThe backend its widgets are made with. Borrowed.
parentThe container it is appended to; null makes it a backend root.
optionsWhat it shows and reports.

Definition at line 48 of file shell_frame.hpp.

Member Function Documentation

◆ page()

ContainerWidget & morph::ui::ShellFrame::page ( )
inlinenodiscardnoexcept

The container the client places the workspace in.

Returns
It.

Definition at line 134 of file shell_frame.hpp.

◆ navigator()

Navigator & morph::ui::ShellFrame::navigator ( )
inlinenodiscardnoexcept

The navigator in the sidebar.

Returns
It.

Definition at line 138 of file shell_frame.hpp.

◆ headSlot()

ContainerWidget & morph::ui::ShellFrame::headSlot ( )
inlinenodiscardnoexcept

The container in the top bar a client mounts the active screen's head row into, beside the title.

Returns
It.

Definition at line 142 of file shell_frame.hpp.

◆ setTitle()

void morph::ui::ShellFrame::setTitle ( std::string_view title)
inline

Shows the shown screen's title in the top bar.

Parameters
titleThe title; empty shows none.

Definition at line 146 of file shell_frame.hpp.

◆ setPrincipal()

void morph::ui::ShellFrame::setPrincipal ( std::string_view principal)
inline

Shows who is signed in, in the top bar.

Parameters
principalThe principal's name; empty shows none.

Definition at line 150 of file shell_frame.hpp.

◆ showSignedIn()

void morph::ui::ShellFrame::showSignedIn ( bool signedIn)
inline

Shows or hides the sidebar and the top bar: signed out, the page is all there is.

Parameters
signedInWhether someone is signed in.

Definition at line 154 of file shell_frame.hpp.

◆ showToast()

void morph::ui::ShellFrame::showToast ( std::string_view text,
Tone tone )
inline

Shows a passive, transient message over the frame's main content area. Made the first time it is asked for; a later call replaces its text and tone and restarts its dismiss interval, whether or not it is still showing.

Parameters
textThe message, UTF-8.
toneThe tone, mapped to the backend's theme.

Definition at line 164 of file shell_frame.hpp.


The documentation for this class was generated from the following file: