home *** CD-ROM | disk | FTP | other *** search
/ Informática Multimedia: Special Games / INFESPGAMES.mdf / os2 / spl / src / splwin.hpp < prev   
Encoding:
C/C++ Source or Header  |  1994-07-26  |  1.8 KB  |  61 lines

  1. /* splwin.hpp: a class for displaying individual spells
  2.  
  3.     Copyright (C) 1993, 1994 John-Marc Chandonia
  4.  
  5.     This program is free software; you can redistribute it and/or modify
  6.     it under the terms of the GNU General Public License as published by
  7.     the Free Software Foundation; either version 2 of the License, or
  8.     (at your option) any later version.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19.  
  20. class spellwindow {
  21. public:
  22.     // handles for all relevant windows 
  23.     HWND hwnd;  // main window
  24.     HWND hwndmle;   // entry field
  25.     HWND hwndframe;  // frame window
  26.  
  27.     // double linked list
  28.     spellwindow *next;
  29.     spellwindow *prev;
  30.  
  31.     // default is readonly; can be edited.
  32.     boolean readonly;
  33.  
  34.     // one spelllist associated with the window:
  35.     spelllist *sl;
  36.  
  37.     // the window that the spelllist is in, if any.
  38.     bookwindow *parent;
  39.  
  40.     void load_attr(); // load the above from INI or EA
  41.     void save_attr(); // save these to INI or EA
  42.     
  43.     spellwindow(spelllist *spll=NULL, bookwindow *p=NULL);
  44.     ~spellwindow();
  45. };
  46.  
  47. // attributes saved with each window, in EA or INI
  48. class spell_attr {
  49.   public:
  50.     SHORT x, cx, y, cy;
  51.     ULONG foregroundcolor, backgroundcolor;
  52.     char fontnamesize[128];
  53. };
  54.  
  55. #define splclass "Spellwindow"
  56.  
  57. // client window procedure
  58. MRESULT EXPENTRY spell_window_func(HWND hwnd, ULONG msg, 
  59.                    MPARAM param1, MPARAM param2);
  60.  
  61.