Debian Codegraph @

xo/wdialog.h

raw
1 /* wdialog.h -*- C++ -*-
2 $Id: wdialog.h,v 1.3 1997/10/18 04:57:45 elf Exp $
3
4 written by Marc Singer
5 27 May 1997
6
7 This file is part of the project XO. See the file README for
8 more information.
9
10 Copyright (C) 1997 Marc Singer
11
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License as
14 published by the Free Software Foundation; either version 2 of the
15 License, or (at your option) any later version.
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 You should have received a copy of the GNU General Public License
23 in a file called COPYING along with this program; if not, write to
24 the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
25 02139, USA.
26
27 -----------
28 DESCRIPTION
29 -----------
30 */
31
32 #if !defined (__WDIALOG_H__)
33 # define __WDIALOG_H__
34
35 /* ----- Includes */
36
37 #include "lres.h"
38
39 /* ----- Classes */
40
41 class WDialog : public LWindow {
42
43 protected:
44 Font m_fid; // Default dialog font, used for dlg units
45 int m_unitWidth; // Width of a dialog character
46 int m_unitHeight; // Height of a dialog character
47 LResNode* m_pNodeResource; // Resource node
48
49 void create_pushbutton (XoCreateSelfWindowEvent* pEvent, LResNode* pNode);
50 void create_textedit (XoCreateSelfWindowEvent* pEvent, LResNode* pNode);
51
52 public:
53 void createself (XoCreateSelfWindowEvent* pEvent);
54
55 public:
56 WDialog (LDisplay* pDisplay) : LWindow (pDisplay) {
57 zero (); m_cbInstance = sizeof (*this) - sizeof (LWindow); }
58 WDialog (LWindow* pWindow) : LWindow (pWindow) {}
59 ~WDialog () {
60 release_this (); }
61 void release_this (void) {}
62 void zero (void) {
63 memset (((LWindow*) this) + 1, 0, sizeof (*this) - sizeof (LWindow)); }
64
65 static void register_template (LDisplay* pDisplay);
66
67 static WDialog* create (LWindow* pWindowOwner, char* szFileResource, int id);
68 };
69
70
71 #endif /* __WDIALOG_H__ */