[143] | 1 | #ifndef GWT_DIALOG |
---|
[437] | 2 | #define GWT_DIALOG |
---|
[143] | 3 | |
---|
| 4 | #include <Wt/WDialog> |
---|
| 5 | #include <Wt/WString> |
---|
[174] | 6 | #include <Wt/WContainerWidget> |
---|
[143] | 7 | |
---|
| 8 | using namespace Wt; |
---|
| 9 | |
---|
[148] | 10 | /** |
---|
[336] | 11 | CrÃer une fenÃtre de dialogue et permet de la paramÃtres facilement |
---|
| 12 | @param titre : titre de la fenÃtre |
---|
| 13 | @param icon : icone â¡ afficher dans le corps de la boite (Warning, Error, Info, Wait, NoIcon) |
---|
| 14 | @param modal : true si cette fenÃtre doit Ãtre bloquante |
---|
| 15 | @param okButton : true pour fermer cette fenÃtre avec un bouton "ok". false n'affiche aucun bouton |
---|
[272] | 16 | */ |
---|
[148] | 17 | |
---|
[143] | 18 | class GWt_dialog : public WDialog |
---|
| 19 | { |
---|
[272] | 20 | |
---|
| 21 | public : |
---|
| 22 | |
---|
| 23 | enum iconType { Warning, Error, Info, Wait, NoIcon }; |
---|
| 24 | |
---|
| 25 | /** Add a dialog with the given container inside |
---|
| 26 | @param titre: A title displayed on the window title bar |
---|
| 27 | @param message: The message inside this dialog |
---|
| 28 | @param container: a valid WContainer |
---|
| 29 | */ |
---|
| 30 | GWt_dialog(WString titre, WContainerWidget* container, bool modal=false); |
---|
| 31 | |
---|
| 32 | /** Add a full dialog window configure with title, message, iconType and button |
---|
| 33 | @param titre: A title displayed on the window title bar |
---|
| 34 | @param message: The message inside this dialog |
---|
| 35 | @param icon: IconType, could be Warning, Error, Info, Wait or NoIcon |
---|
| 36 | @param modal: true for a blocking dialog, false for a non-blocking dialog |
---|
| 37 | @param okButton: true if you want a "ok" button at the end |
---|
| 38 | */ |
---|
[299] | 39 | GWt_dialog(WString titre, WString message, iconType icon=NoIcon, bool modal=false, bool okButton=false); |
---|
[401] | 40 | |
---|
| 41 | /** Add a v content to this widget |
---|
| 42 | */ |
---|
| 43 | void addVContent(WContainerWidget* wc); |
---|
| 44 | |
---|
| 45 | private : |
---|
| 46 | WVBoxLayout* vDialogLayout_; |
---|
[143] | 47 | }; |
---|
| 48 | #endif |
---|