/*1* $Id: help.c,v 1.3 2012/12/04 02:01:10 tom Exp $2*3* help.c -- implements the help dialog4*5* Copyright 2011,2012 Thomas E. Dickey6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU Lesser General Public License, version 2.19* as published by the Free Software Foundation.10*11* This program is distributed in the hope that it will be useful, but12* WITHOUT ANY WARRANTY; without even the implied warranty of13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU14* Lesser General Public License for more details.15*16* You should have received a copy of the GNU Lesser General Public17* License along with this program; if not, write to18* Free Software Foundation, Inc.19* 51 Franklin St., Fifth Floor20* Boston, MA 02110, USA.21*/2223#include <dialog.h>2425/*26* Display a help-file as a textbox widget.27*/28int29dialog_helpfile(const char *title,30const char *file,31int height,32int width)33{34int result = DLG_EXIT_ERROR;35DIALOG_VARS save;3637if (!dialog_vars.in_helpfile && file != 0 && *file != '\0') {38dlg_save_vars(&save);3940dialog_vars.no_label = NULL;41dialog_vars.ok_label = NULL;42dialog_vars.help_button = FALSE;43dialog_vars.extra_button = FALSE;44dialog_vars.nook = FALSE;4546dialog_vars.in_helpfile = TRUE;4748result = dialog_textbox(title, file, height, width);4950dlg_restore_vars(&save);51}52return (result);53}545556