source: trunk/src/user32/win32wndchild.h@ 5655

Last change on this file since 5655 was 3663, checked in by sandervl, 25 years ago

Set/GetParent changes/fixes

File size: 1.2 KB
Line 
1/* $Id: win32wndchild.h,v 1.5 2000-06-07 21:45:52 sandervl Exp $ */
2/*
3 * Win32 Child/Parent window class for OS/2
4 *
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#ifndef __WIN32WNDCHILD_H__
13#define __WIN32WNDCHILD_H__
14
15#include <vmutex.h>
16
17#ifdef __cplusplus
18
19class ChildWindow
20{
21public:
22 ChildWindow();
23virtual ~ChildWindow();
24
25ChildWindow *getFirstChild() { return children; };
26ChildWindow *getNextChild() { return nextchild; };
27
28protected:
29
30 ChildWindow *getParentOfChild() { return parent; };
31 ChildWindow *setParentOfChild(ChildWindow *newParent)
32 {
33 ChildWindow *oldparent = parent;
34
35 parent = newParent;
36 return oldparent;
37 }
38
39 BOOL addChild(ChildWindow *child);
40 BOOL removeChild(ChildWindow *child);
41
42 void setNextChild(ChildWindow *child) { nextchild = child; };
43
44 BOOL destroyChildren();
45
46private:
47 VMutex mutex;
48
49 ChildWindow *parent; //GWL_HWNDPARENT
50 ChildWindow *children; //linked list of children of this window
51 ChildWindow *nextchild; //pointer to next child of our parent window
52};
53
54
55#endif //__cplusplus
56
57#endif //__WIN32WNDCHILD_H__
Note: See TracBrowser for help on using the repository browser.