00001 /* ---------------------------------------------------------------------- * 00002 * dialbox.h 00003 * This file is part of lincity. 00004 * Lincity is copyright (c) I J Peters 1995-1997, (c) Greg Sharp 1997-2001. 00005 * Portions copyright (c) Corey Keasling 2001. 00006 * ---------------------------------------------------------------------- */ 00007 00008 #ifndef __dialbox_h__ 00009 #define __dialbox_h__ 00010 00011 /* External argument typing constants */ 00012 #define DB_PARA 0 /* Paragraph/line arguments; non-button */ 00013 00014 struct dialog_box_struct 00015 { 00016 short type; /* 0 if line/paragraph, button return value (!0) if button */ 00017 short retval; /* 0 for no return, character (keyboard hotkey) for others */ 00018 char * text; 00019 }; 00020 00021 typedef struct dialog_box_struct Dialog_Box; 00022 00023 /* Public functions */ 00024 int dialog_box(int colour, int argc, ...); 00025 void dialog_refresh(); 00026 void dialog_close(int return_value); 00027 00028 #define MAX_DBOX_ENTRIES 64 /* Huge, but necessary for current use */ 00029 00030 #define LINE_MIN_SPACING 10 /* Extra space on both sides of Line items */ 00031 00032 #define BUTTON_BORDER 2 00033 #define BUTTON_HEIGHT CHAR_HEIGHT + BUTTON_BORDER 00034 #define BUTTON_MIN_SPACING 8 00035 00036 #define BORDER_SIZE 7 00037 #define DB_V_SPACE 2 /* Extra space above and below text */ 00038 00039 00040 void dialog_close(int return_value) ; 00041 00042 #endif
1.3.9.1