| 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 | vmconnom.cpp - TADS 3 console input/output - HTML version |
| 15 | Function |
| 16 | There are three possible configurations for the output formatter. |
| 17 | For each configuration, there is one extra file that must be linked |
| 18 | into the system when building an application; the choice of this |
| 19 | file determines the configuration of the system. The three choices |
| 20 | are: |
| 21 | |
| 22 | Text only, MORE mode enabled - vmconmor.cpp |
| 23 | Text only, OS-level MORE handling - vmconnom.cpp |
| 24 | HTML mode - vmconhtm.cpp |
| 25 | Notes |
| 26 | |
| 27 | Modified |
| 28 | 09/06/99 MJRoberts - Creation |
| 29 | */ |
| 30 | |
| 31 | #include <assert.h> |
| 32 | |
| 33 | #include "os.h" |
| 34 | #include "t3std.h" |
| 35 | #include "vmconsol.h" |
| 36 | |
| 37 | |
| 38 | /* ------------------------------------------------------------------------ */ |
| 39 | /* |
| 40 | * This version uses OS-level MORE prompting (actually, the HTML |
| 41 | * renderer handles the prompting, but from our perspective the HTML |
| 42 | * renderer looks like the OS layer), so indicate that we do not handle |
| 43 | * the MORE prompt in the output formatter |
| 44 | */ |
| 45 | int CVmFormatter::formatter_more_mode() const |
| 46 | { |
| 47 | return FALSE; |
| 48 | } |
| 49 | |
| 50 | /* ------------------------------------------------------------------------ */ |
| 51 | /* |
| 52 | * This is an HTML-enabled version, so we turn on the HTML-target flag |
| 53 | */ |
| 54 | int CVmFormatter::get_init_html_target() const |
| 55 | { |
| 56 | return TRUE; |
| 57 | } |
| 58 | |
| 59 | /* ------------------------------------------------------------------------ */ |
| 60 | /* |
| 61 | * This is an HTML-enabled version. Pass through HTML start/end operations |
| 62 | * to the OS-layer renderer. |
| 63 | */ |
| 64 | void CVmFormatterMain::start_html_in_os() |
| 65 | { |
| 66 | os_start_html(); |
| 67 | } |
| 68 | |
| 69 | void CVmFormatterMain::end_html_in_os() |
| 70 | { |
| 71 | os_end_html(); |
| 72 | } |
| 73 | |
| 74 | /* |
| 75 | * The OS layer (i.e., the HTML renderer) handles line wrapping |
| 76 | */ |
| 77 | int CVmFormatterMain::get_os_line_wrap() |
| 78 | { |
| 79 | return TRUE; |
| 80 | } |
| 81 | |
| 82 | /* ------------------------------------------------------------------------ */ |
| 83 | /* |
| 84 | * This version handles MORE prompting in the OS code, so call the OS |
| 85 | * code when we need to display a MORE prompt |
| 86 | */ |
| 87 | void CVmConsole::show_con_more_prompt(VMG0_) |
| 88 | { |
| 89 | os_more_prompt(); |
| 90 | } |
| 91 |