xref: /haiku/src/apps/debugger/user_interface/gui/util/AlertWithCheckbox.h (revision 1454f3c27aec3e7879a58e7cedc9d66d90c773a7)
1 /*
2  * Copyright 2019-2023, Adrien Destugues, pulkomandy@pulkomandy.tk.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef ALERTWITHCHECKBOX_H
6 #define ALERTWITHCHECKBOX_H
7 
8 
9 #include <Bitmap.h>
10 #include <Window.h>
11 
12 
13 class BCheckBox;
14 
15 
16 class AlertWithCheckbox : public BWindow {
17 public:
18 					AlertWithCheckbox(const char* title, const char* message, const char* checkBox,
19 						const char* button1, const char* button2, const char* button3);
20 					~AlertWithCheckbox();
21 
22 	void			MessageReceived(BMessage* message);
23 	int32			Go(bool& dontAskAgain);
24 
25 private:
26 	static	BRect	IconSize();
27 
28 private:
29 	BBitmap			fBitmap;
30 	BCheckBox*		fDontAskAgain;
31 	sem_id			fSemaphore;
32 	int32			fAction;
33 };
34 
35 
36 #endif /* !ALERTWITHCHECKBOX_H */
37