1 /* ---------------------------------------------------------------------- * 2 * dialbox.h 3 * This file is part of lincity. 4 * Lincity is copyright (c) I J Peters 1995-1997, (c) Greg Sharp 1997-2001. 5 * Portions copyright (c) Corey Keasling 2001. 6 * ---------------------------------------------------------------------- */ 7 8 #ifndef __dialbox_h__ 9 #define __dialbox_h__ 10 11 /* External argument typing constants */ 12 #define DB_PARA 0 /* Paragraph/line arguments; non-button */ 13 14 struct dialog_box_struct 15 { 16 short type; /* 0 if line/paragraph, button return value (!0) if button */ 17 short retval; /* 0 for no return, character (keyboard hotkey) for others */ 18 char * text; 19 }; 20 21 typedef struct dialog_box_struct Dialog_Box; 22 23 /* Public functions */ 24 int dialog_box(int colour, int argc, ...); 25 void dialog_refresh(); 26 void dialog_close(int return_value); 27 28 #define MAX_DBOX_ENTRIES 64 /* Huge, but necessary for current use */ 29 30 #define LINE_MIN_SPACING 10 /* Extra space on both sides of Line items */ 31 32 #define BUTTON_BORDER 2 33 #define BUTTON_HEIGHT CHAR_HEIGHT + BUTTON_BORDER 34 #define BUTTON_MIN_SPACING 8 35 36 #define BORDER_SIZE 7 37 #define DB_V_SPACE 2 /* Extra space above and below text */ 38 39 40 void dialog_close(int return_value) ; 41 42 #endif 43