#include <window_classes.hpp>
|
| | A menu item in this window's menu bar. More...
|
| | A top-level menu (e.g. "File", "Edit", "View") with its items. More...
|
◆ CloseConfirmationHandler
Hook called when the user requests the window to close (clicked the close button, hit ⌘W, or invoked request_close()).
Returning true allows the close to proceed; returning false cancels it (e.g. when the document is dirty and the user picked "Cancel" in a Save dialog). When unset, every close is allowed.
◆ DocumentWindow() [1/3]
| pulp::view::DocumentWindow::DocumentWindow |
( |
const std::string & | title, |
|
|
View & | content_root ) |
◆ ~DocumentWindow()
| pulp::view::DocumentWindow::~DocumentWindow |
( |
| ) |
|
◆ DocumentWindow() [2/3]
| pulp::view::DocumentWindow::DocumentWindow |
( |
const DocumentWindow & | | ) |
|
|
delete |
◆ DocumentWindow() [3/3]
| pulp::view::DocumentWindow::DocumentWindow |
( |
DocumentWindow && | | ) |
|
|
delete |
◆ content() [1/2]
| View & pulp::view::DocumentWindow::content |
( |
| ) |
|
|
inline |
The content View attached to this window's content area.
◆ content() [2/2]
| const View & pulp::view::DocumentWindow::content |
( |
| ) |
const |
|
inline |
◆ has_native_window()
| bool pulp::view::DocumentWindow::has_native_window |
( |
| ) |
const |
|
inline |
True if show() produced a live native window.
◆ hide()
| void pulp::view::DocumentWindow::hide |
( |
| ) |
|
Hide the window without closing it (close-confirm is NOT consulted).
◆ host()
Underlying WindowHost (nullptr until show() is called or until a factory becomes available).
Tests drive the lifecycle hooks via the DocumentWindow API directly and don't depend on this being non-null.
◆ menus()
| const std::vector< Menu > & pulp::view::DocumentWindow::menus |
( |
| ) |
const |
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ request_close()
| bool pulp::view::DocumentWindow::request_close |
( |
| ) |
|
Programmatic close request — runs the close-confirmation handler and (if it returns true) tears down the underlying WindowHost.
Returns true if the close was actually performed.
◆ set_close_confirmation_handler()
Install a close-confirmation hook.
Useful for "Save changes before
closing?" workflows. Returns the previously-installed handler so callers can chain.
◆ set_menus()
| void pulp::view::DocumentWindow::set_menus |
( |
std::vector< Menu > | menus | ) |
|
Set or replace the logical menu model.
The current DocumentWindow stores this descriptor for host/test consumption; show() does not install a platform menu. Hosts that need one should consume menus() and install their own backend.
◆ show()
| bool pulp::view::DocumentWindow::show |
( |
| ) |
|
Create the native window and show it.
Returns false if no WindowHost::Factory is registered on the current platform (the DocumentWindow stays usable as a logical container — its menus + content + close-confirm handler can still be inspected by tests).
◆ title()
| const std::string & pulp::view::DocumentWindow::title |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: