Merge commit 'a6b9657268eb3fe139b0c22df27c2cb2efc0013c'
This commit is contained in:
@@ -225,6 +225,18 @@ PopupResponse PopupControlsOkCancel(
|
||||
[[nodiscard]]
|
||||
bool BeginPopup(turbine::Context &ctx, ox::CStringViewCR popupName, bool &show, ImVec2 const&sz = {285, 0});
|
||||
|
||||
/**
|
||||
*
|
||||
* @param lbl
|
||||
* @param list
|
||||
* @param selectedIdx
|
||||
* @return true if new value selected, false otherwise
|
||||
*/
|
||||
bool ComboBox(
|
||||
ox::CStringView lbl,
|
||||
ox::SpanView<ox::CStringView> list,
|
||||
size_t &selectedIdx) noexcept;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param lbl
|
||||
@@ -291,6 +303,34 @@ class FilePicker {
|
||||
|
||||
};
|
||||
|
||||
class QuestionPopup {
|
||||
private:
|
||||
enum class Stage {
|
||||
Closed,
|
||||
Opening,
|
||||
Open,
|
||||
};
|
||||
Stage m_stage = Stage::Closed;
|
||||
bool m_open{};
|
||||
ox::String m_title;
|
||||
ox::String m_question;
|
||||
|
||||
public:
|
||||
ox::Signal<ox::Error(ig::PopupResponse)> response;
|
||||
|
||||
QuestionPopup(ox::StringParam title, ox::StringParam question) noexcept;
|
||||
|
||||
void open() noexcept;
|
||||
|
||||
void close() noexcept;
|
||||
|
||||
[[nodiscard]]
|
||||
bool isOpen() const noexcept;
|
||||
|
||||
void draw(StudioContext &ctx, ImVec2 const &sz = {}) noexcept;
|
||||
|
||||
};
|
||||
|
||||
[[nodiscard]]
|
||||
bool mainWinHasFocus() noexcept;
|
||||
|
||||
|
@@ -92,6 +92,8 @@ class Project: public ox::SignalHandler {
|
||||
|
||||
ox::Result<ox::FileStat> stat(ox::StringViewCR path) const noexcept;
|
||||
|
||||
ox::Error copyItem(ox::StringViewCR src, ox::StringViewCR dest) noexcept;
|
||||
|
||||
ox::Error moveItem(ox::StringViewCR src, ox::StringViewCR dest) noexcept;
|
||||
|
||||
ox::Error moveDir(ox::StringViewCR src, ox::StringViewCR dest) noexcept;
|
||||
|
Reference in New Issue
Block a user