/*
 * freescope - Free source browser
 * Copyright (C) 2001  Olivier Deme
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

/*
 * FILE:        wndhelp.h
 *
 * DESCRIPTION: This file defines a class that displays a window containing
 *              a summary of all availbale commands.
 *
 */

#ifndef _WNDHELP_H_
#define _WNDHELP_H_

/************/
/* INCLUDES */
/************/

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /* HAVE_CONFIG_H */

#include <string>
#include <curses.h>
#include <form.h>
#include <panel.h>


/*********************/
/* CLASS DEFINITIONS */
/*********************/

class WndHelp
{
    // CONSTANTS
private:
    const int WND_WIDTH;
    const int WND_HEIGHT;
    // CONSTRUCTORS
public:
             WndHelp ();
    virtual ~WndHelp ();

    // METHODS
private:
    bool do_key      (int key);
    void scroll_down ();
    void scroll_up   ();


    // ATTRIBUTES
    WINDOW*             m_window;
    PANEL*              m_panel;
    string              m_text;
    int                 m_start_line;
    string::size_type   m_start_pos;
};

#endif // _WNDHELP_H_


syntax highlighted by Code2HTML, v. 0.9.1