Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

htiobox.h

Go to the documentation of this file.
00001 /* 
00002  *      HT Editor
00003  *      htiobox.h
00004  *
00005  *      Copyright (C) 1999-2002 Stefan Weyergraf (stefan@weyergraf.de)
00006  *
00007  *      This program is free software; you can redistribute it and/or modify
00008  *      it under the terms of the GNU General Public License version 2 as
00009  *      published by the Free Software Foundation.
00010  *
00011  *      This program 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 this program; if not, write to the Free Software
00018  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  */
00020 
00021 #ifndef __HTIOBOX_H__
00022 #define __HTIOBOX_H__
00023 
00024 #include "htdialog.h"
00025 
00026 /* buttonmask */
00027 #define btmask_ok                       1
00028 #define btmask_cancel           2
00029 #define btmask_yes                      4
00030 #define btmask_no                       8
00031 #define btmask_skip                     16
00032 #define btmask_all                      32
00033 #define btmask_none                     64
00034 
00035 int msgbox(int buttonmask, const char *title, bool modal, statictext_align align, const char *format, ...);
00036 int msgboxrect(bounds *b, int buttonmask, const char *title, bool modal, statictext_align align, bounds *b, const char *format, ...);
00037 
00038 #define errorbox(a...) msgbox(btmask_ok, "error", false, align_center, a)
00039 #define infobox(a...) msgbox(btmask_ok, "information", false, align_center, a)
00040 #define warnbox(a...) msgbox(btmask_ok, "warning", false, align_center, a)
00041 #define confirmbox(a...) msgbox(btmask_yes+btmask_no, "confirmation", false, align_center, a)
00042 
00043 #define errorbox_c(a...) msgbox(btmask_ok, "error", false, align_custom, a)
00044 #define infobox_c(a...) msgbox(btmask_ok, "information", false, align_custom, a)
00045 #define warnbox_c(a...) msgbox(btmask_ok, "warning", false, align_custom, a)
00046 #define confirmbox_c(a...) msgbox(btmask_yes+btmask_no, "confirmation", false, align_custom, a)
00047 
00048 #define errorbox_modal(a...) msgbox(btmask_ok, "error", true, align_center, a)
00049 #define infobox_modal(a...) msgbox(btmask_ok, "information", true, align_center, a)
00050 #define warnbox_modal(a...) msgbox(btmask_ok, "warning", true, align_center, a)
00051 #define confirmbox_modal(a...) msgbox(btmask_yes+btmask_no, "confirmation", true, align_center, a)
00052 
00053 bool inputbox(const char *title, const char *label, char *result, int limit, dword histid = 0);
00054 bool inputboxrect(bounds *b, const char *title, const char *label, char *result, int limit, dword histid = 0);
00055 
00056 void get_std_progress_indicator_metrics(bounds *b);
00057 
00058 #endif /* __HTIOBOX_H__ */
00059 

Generated on Fri May 7 21:15:34 2004 by doxygen 1.3.5