1 /******************************************************************************
2  *
3  *  swdisp.h -	code for base class 'swdisp'.  swdisp is the basis for all
4  *		types of displays (e.g. raw textout, curses, xwindow, etc.)
5  *
6  * $Id: swdisp.h 2833 2013-06-29 06:40:28Z chrislit $
7  *
8  * Copyright 1996-2013 CrossWire Bible Society (http://www.crosswire.org)
9  *	CrossWire Bible Society
10  *	P. O. Box 2528
11  *	Tempe, AZ  85280-2528
12  *
13  * This program is free software; you can redistribute it and/or modify it
14  * under the terms of the GNU General Public License as published by the
15  * Free Software Foundation version 2.
16  *
17  * This program is distributed in the hope that it will be useful, but
18  * WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * General Public License for more details.
21  *
22  */
23 
24 #ifndef SWDISP_H
25 #define SWDISP_H
26 
27 #include <swobject.h>
28 #include <defs.h>
29 
30 SWORD_NAMESPACE_START
31 
32 class SWModule;
33 
34 /** swdisp is the basis for all types of displays
35 * (e.g. raw textout, curses, xwindow, etc.)
36 */
37 class SWDLLEXPORT SWDisplay : public SWObject {
38   static SWClass classdef;
39 public:
SWDisplay()40   SWDisplay() { myclass = &classdef; };
~SWDisplay()41   virtual ~SWDisplay() {};
42 
43   /** casts a module to a character pointer and displays it to
44   * raw output (overriden for different display types and
45   * module types if necessary)
46   *
47   * @param imodule module to display
48   * @return error status
49   */
50   virtual char display(SWModule &imodule) = 0;
Display(SWModule & imodule)51   SWDEPRECATED char Display(SWModule &imodule) { return display(imodule); }
52 };
53 
54 SWORD_NAMESPACE_END
55 #endif
56