Files
k7/PopupDeleter.h

55 lines
1.1 KiB
C
Raw Permalink Normal View History

2019-10-25 20:16:43 +02:00
/*
* File: PopupDeleter.h
2019-10-28 14:12:50 +01:00
* Author: SET - nmset@yandex.com
2019-10-25 20:16:43 +02:00
* License : GPL v2
* Copyright SET - © 2019
*
* Created on 15 octobre 2019, 18:39
*/
#ifndef POPUPDELETER_H
#define POPUPDELETER_H
#include <Wt/WPopupWidget.h>
#include <Wt/WContainerWidget.h>
#include <Wt/WCheckBox.h>
#include <Wt/WPushButton.h>
#include "TransientMessageWidget.h"
using namespace Wt;
2020-11-14 14:46:28 +01:00
2019-10-25 20:16:43 +02:00
/**
* A transient popup window with a forward confirmation
* before deleting a key.
*/
2020-11-14 14:46:28 +01:00
class PopupDelete : public WPopupWidget
{
2019-10-25 20:16:43 +02:00
public:
PopupDelete(WWidget * anchorWidget, TransientMessageWidget * txtMessage, const WLength& width = 350);
virtual ~PopupDelete();
2019-10-25 20:16:43 +02:00
void Create();
2020-11-14 14:46:28 +01:00
2019-10-25 20:16:43 +02:00
/**
* Caller can bind the delete function to this button.
* @return
*/
2020-11-14 14:46:28 +01:00
WPushButton* GetDeleteButton()
{
return m_btnDelete;
}
2019-10-25 20:16:43 +02:00
private:
TransientMessageWidget * m_tmwMessage;
WContainerWidget * m_cwMain;
WCheckBox * m_cbConfirm;
WCheckBox * m_cbReConfirm;
WPushButton * m_btnDelete;
2020-11-14 14:46:28 +01:00
2019-10-25 20:16:43 +02:00
// Visibility management
void Reset();
void OnCbConfirm();
void OnCbReConfirm();
};
#endif /* POPUPDELETER_H */