MCPcopy Create free account
hub / github.com/audacity/audacity / MessageBoxOptions

Class MessageBoxOptions

libraries/lib-basic-ui/BasicUI.h:94–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92};
93
94struct MessageBoxOptions {
95 //! @name Chain-call style initializers
96 //! @{
97
98 MessageBoxOptions &&Parent(WindowPlacement *parent_) &&
99 { parent = parent_; return std::move(*this); }
100
101 MessageBoxOptions &&Caption(TranslatableString caption_) &&
102 { caption = std::move(caption_); return std::move(*this); }
103
104 MessageBoxOptions &&IconStyle(Icon style) &&
105 { iconStyle = style; return std::move(*this); }
106
107 MessageBoxOptions &&ButtonStyle(Button style) &&
108 { buttonStyle = style; return std::move(*this); }
109
110 //! Override the usual defaulting to Yes; affects only the YesNo case
111 MessageBoxOptions &&DefaultIsNo() &&
112 { yesOrOkDefaultButton = false; return std::move(*this); }
113
114 MessageBoxOptions &&CancelButton() &&
115 { cancelButton = true; return std::move(*this); }
116
117 //! Center the dialog on its parent window, if any
118 MessageBoxOptions &&Centered() &&
119 { centered = true; return std::move(*this); }
120
121 //! @}
122
123 WindowPlacement *parent{ nullptr };
124 TranslatableString caption{ DefaultCaption() };
125 Icon iconStyle{ Icon::None };
126 Button buttonStyle{ Button::Default };
127 bool yesOrOkDefaultButton{ true };
128 bool cancelButton{ false };
129 bool centered{ false };
130};
131
132enum class MessageBoxResult : int {
133 None, //!< May be returned if no Services are installed

Callers 5

DoEffectMethod · 0.85
ShowMessageBoxMethod · 0.85
IsValidCommandMethod · 0.85
CheckFileNameMethod · 0.85
OnAddEffectClickedMethod · 0.85

Calls 2

moveFunction · 0.85
DefaultCaptionFunction · 0.85

Tested by

no test coverage detected