Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

messagebox.h

Go to the documentation of this file.
00001 /*
00002         ClanGUI, copyrights by various people. Have a look in the CREDITS file.
00003         
00004         This sourcecode is distributed using the Library GNU Public Licence,
00005         version 2 or (at your option) any later version. Please read LICENSE
00006         for details.
00007 */
00008 
00010 
00011 #ifndef header_messagebox
00012 #define header_messagebox
00013 
00014 #include "component.h"
00015 #include "window.h"
00016 
00017 class CL_MessageBox : public CL_Window
00018 //: MessageBox component
00019 {
00021 public:
00022         CL_MessageBox(
00023                 const CL_ComponentOptions &options,     
00024                 CL_Component *parent,
00025                 CL_StyleManager *style = NULL);
00026 
00027         CL_MessageBox(
00028                 const std::string &title,
00029                 const std::string &text,
00030                 const std::string &button1,
00031                 const std::string &button2,
00032                 const std::string &button3,
00033                 CL_Component *parent,
00034                 CL_StyleManager *style = NULL);
00035 
00036         virtual ~CL_MessageBox();
00037 
00038         static void info(
00039                 const std::string &title,
00040                 const std::string &text,
00041                 CL_GUIManager *gui);
00042 
00043         static int info(
00044                 const std::string &title,
00045                 const std::string &text,
00046                 const std::string &button1,
00047                 const std::string &button2,
00048                 const std::string &button3,
00049                 CL_GUIManager *gui);
00050 
00052 public:
00053         const std::string &get_text() const;
00054         //: Returns the message text.
00055 
00056         int get_result_button() const;
00057         //: Returns the index of the button clicked.
00058 
00060 public:
00061         void set_text(const std::string &text);
00062         //: Sets the message text.
00063 
00065 public:
00066         CL_Signal_v0 &sig_button1();
00067         CL_Signal_v0 &sig_button2();
00068         CL_Signal_v0 &sig_button3();
00069 
00071 private:
00072         // TODO:Fix this copy constructor:
00073 //      CL_MessageBox(const CL_MessageBox &copy) : CL_Window(NULL, NULL) { return; } // disallow copy construction.
00074         class CL_MessageBox_Generic *impl;
00075 };
00076 
00077 #endif

Generated at Wed Apr 4 19:54:01 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001