Exteor/include/xtr/dialog/PickOperation.h

39 lines
891 B
C
Raw Normal View History

2024-06-07 20:30:06 +03:00
#pragma once
namespace xtr::dialog {
//! Dialog: Choose OSS operation type
class PickOperationDlg final : public CDialog {
public:
BOOL autorun{ FALSE };
private:
int32_t type{};
CListBox m_OperationList;
ccl::oss::OSSchema& oss;
const ccl::oss::PictID activePID;
std::vector<ccl::ops::Type> operations;
public:
PickOperationDlg(ccl::oss::OSSchema& schema, ccl::oss::PictID pid, CWnd* pParent = nullptr);
private:
void DoDataExchange(CDataExchange* pDX) override;
BOOL OnInitDialog() override;
public:
[[nodiscard]] ccl::ops::Type GetSelectedOperation() const {
return ID2Operation(type);
}
DECLARE_MESSAGE_MAP()
afx_msg void OpenHelp();
afx_msg void OnChange();
private:
[[nodiscard]] ccl::ops::Type ID2Operation(int32_t selectedID) const;
[[nodiscard]] int32_t Operation2ID(ccl::ops::Type operation) const noexcept;
};
} // namespace xtr::dialog