| 1 | #ifdef RCSID |
| 2 | static char RCSid[] = |
| 3 | "$Header$"; |
| 4 | #endif |
| 5 | |
| 6 | /* |
| 7 | * Copyright (c) 1999, 2002 Michael J. Roberts. All Rights Reserved. |
| 8 | * |
| 9 | * Please see the accompanying license file, LICENSE.TXT, for information |
| 10 | * on using and copying this software. |
| 11 | */ |
| 12 | /* |
| 13 | Name |
| 14 | indlg_tx.c - input dialog - formatted text-only version |
| 15 | Function |
| 16 | Implements the input dialog function using formatted text |
| 17 | Notes |
| 18 | Only one of indlg_tx or indlg_os should be included in a given |
| 19 | executable. The choice depends on whether a system-level dialog |
| 20 | is available or not. If no system-level dialog is available, |
| 21 | include indlg_tx, which provides an implementation using formatted |
| 22 | text. If a system-level dialog is available, use indlg_os, which |
| 23 | calls os_input_dialog(). |
| 24 | |
| 25 | This file exists in the portable layer, rather than in the OS layer, |
| 26 | so that we can provide an implementation using formatted text. An |
| 27 | OS-layer implementation could not provide formatted text. |
| 28 | Modified |
| 29 | 09/27/99 MJRoberts - Creation |
| 30 | */ |
| 31 | |
| 32 | #include <stdio.h> |
| 33 | #include <string.h> |
| 34 | |
| 35 | #include "std.h" |
| 36 | #include "os.h" |
| 37 | #include "tio.h" |
| 38 | |
| 39 | /* ------------------------------------------------------------------------ */ |
| 40 | /* |
| 41 | * Text-mode os_input_dialog implementation |
| 42 | */ |
| 43 | int tio_input_dialog(int icon_id, const char *prompt, |
| 44 | int standard_button_set, |
| 45 | const char **buttons, int button_count, |
| 46 | int default_index, int cancel_index) |
| 47 | { |
| 48 | /* call the OS implementation */ |
| 49 | return os_input_dialog(icon_id, prompt, standard_button_set, |
| 50 | buttons, button_count, |
| 51 | default_index, cancel_index); |
| 52 | } |