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

A region that takes files dropped from the operating system. More...

#include <view.hpp>

Public Attributes

std::vector< std::string > accept
 The extensions it takes, such as ".csv", compared without regard to case; empty takes every file. Set once.
bool multiple = false
 Whether a drop may carry more than one file; set once.
std::function< void(std::vector< std::string >)> onDrop
 Called with the paths of a drop it took. A drop with a file outside accept, or with several files when not multiple, is refused whole.
Node child
 The content shown inside the region; may be null.
Common common {}
 Visibility, enablement, layout, drag-and-drop.

Detailed Description

A region that takes files dropped from the operating system.

Definition at line 1128 of file view.hpp.

Member Data Documentation

◆ accept

std::vector<std::string> morph::ui::DropZone::accept

The extensions it takes, such as ".csv", compared without regard to case; empty takes every file. Set once.

Definition at line 1131 of file view.hpp.

◆ multiple

bool morph::ui::DropZone::multiple = false

Whether a drop may carry more than one file; set once.

Definition at line 1133 of file view.hpp.

◆ onDrop

std::function<void(std::vector<std::string>)> morph::ui::DropZone::onDrop

Called with the paths of a drop it took. A drop with a file outside accept, or with several files when not multiple, is refused whole.

Definition at line 1136 of file view.hpp.

◆ child

Node morph::ui::DropZone::child

The content shown inside the region; may be null.

Definition at line 1138 of file view.hpp.

◆ common

Common morph::ui::DropZone::common {}

Visibility, enablement, layout, drag-and-drop.

Definition at line 1140 of file view.hpp.


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