diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:35 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:35 +0200 |
commit | 460091fb0b2ff114cc741372f15bb43b702ea3b1 (patch) | |
tree | 0562c2eda4c66969c6e6d0910080db9f5b0def3e /ui/msg_popup.h | |
parent | 5.15 (diff) | |
download | FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.tar.gz FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.tar.bz2 FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.zip |
5.16
Diffstat (limited to 'ui/msg_popup.h')
-rw-r--r-- | ui/msg_popup.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/ui/msg_popup.h b/ui/msg_popup.h index 5e59eb6b..5e7ea97f 100644 --- a/ui/msg_popup.h +++ b/ui/msg_popup.h @@ -4,12 +4,13 @@ // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** -#ifndef MESSAGEPOPUP_H_INCLUDED -#define MESSAGEPOPUP_H_INCLUDED +#ifndef MESSAGEPOPUP_H_820780154723456 +#define MESSAGEPOPUP_H_820780154723456 #include <wx/window.h> #include <wx/string.h> +class QuestionDlg; namespace zen { @@ -60,20 +61,17 @@ struct ReturnQuestionDlg }; }; -class QuestConfig; -ReturnQuestionDlg::ButtonPressed showQuestionDlg(wxWindow* parent, int activeButtons, const wxString& messageText, const QuestConfig& cfg); - class QuestConfig { public: - QuestConfig() : checkBoxValue() {} + QuestConfig() : checkBoxValue(), disabledButtonsWhenChecked_() {} QuestConfig& setCaption (const wxString& label) { caption = label; return *this; } QuestConfig& setLabelYes(const wxString& label) { labelYes = label; return *this; } QuestConfig& setLabelNo (const wxString& label) { labelNo = label; return *this; } - QuestConfig& showCheckBox(bool& value, const wxString& label) { checkBoxLabel = label; checkBoxValue = &value; return *this; } + QuestConfig& showCheckBox(bool& value, const wxString& label, int disabledButtonsWhenChecked) { checkBoxValue = &value; checkBoxLabel = label; disabledButtonsWhenChecked_ = disabledButtonsWhenChecked; return *this; } private: - friend ReturnQuestionDlg::ButtonPressed showQuestionDlg(wxWindow* parent, int activeButtons, const wxString& messageText, const QuestConfig& cfg); + friend class ::QuestionDlg; wxString caption; wxString labelYes; //overwrite default "Yes, No" labels @@ -81,9 +79,10 @@ private: //optional checkbox: bool* checkBoxValue; //in/out wxString checkBoxLabel; //in + int disabledButtonsWhenChecked_; }; ReturnQuestionDlg::ButtonPressed showQuestionDlg(wxWindow* parent, int activeButtons, const wxString& messageText, const QuestConfig& cfg = QuestConfig()); } -#endif // MESSAGEPOPUP_H_INCLUDED +#endif //MESSAGEPOPUP_H_820780154723456 |