dialogs.h

00001 /*
00002  * dialogs.h
00003  * This file is part of dbPager Classes Library (DCL)
00004  *
00005  * Copyright (c) 2008 Dennis Prochko <wolfsoft@mail.ru>
00006  *
00007  * DCL is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation version 3.
00010  *
00011  * DCL is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with DCL; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor,
00019  * Boston, MA  02110-1301  USA
00020  */
00021  
00022  
00023 #ifndef _DIALOGS_H_
00024 #define _DIALOGS_H_
00025 
00026 #include <string>
00027 
00028 namespace dbp {
00029 
00031 namespace message_type {
00032         enum message_type { info, warning, question, error };
00033 }
00034 
00036 namespace message_buttons {
00037         enum message_buttons {
00038                 ok, close, cancel, yes_no, ok_cancel, yes_no_cancel };
00039 }
00040 
00042 namespace message_response {
00043         enum message_response { none, ok, close, cancel, yes, no, help };
00044 }
00045 
00047 
00052 class message_box {
00053 public:
00055 
00063         virtual void init(const std::string &title, const std::string &message,
00064           message_type::message_type type = message_type::error,
00065           message_buttons::message_buttons buttons = message_buttons::ok) = 0;
00067 
00070         virtual message_response::message_response execute() = 0;
00071 };
00072 
00073 } //namespace
00074 
00075 #endif /*_DIALOGS_H_*/

 
Support This Project
SourceForge.net Logo