source: trunk/src/user32/win32wndchild.h

Last change on this file was 10587, checked in by sandervl, 21 years ago

KSO: Update

File size: 1.3 KB
RevLine 
[10587]1/* $Id: win32wndchild.h,v 1.7 2004-04-20 10:11:44 sandervl Exp $ */
[2469]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
[5935]15#ifdef OS2_INCLUDED
16#include <win32api.h>
17#endif
[10587]18#include <VMutex.h>
[2469]19
20#ifdef __cplusplus
21
22class ChildWindow
23{
24public:
[10587]25 ChildWindow(VMutex *pLock);
[2469]26virtual ~ChildWindow();
27
28ChildWindow *getFirstChild() { return children; };
29ChildWindow *getNextChild() { return nextchild; };
30
31protected:
32
[3663]33 ChildWindow *getParentOfChild() { return parent; };
34 ChildWindow *setParentOfChild(ChildWindow *newParent)
[2469]35 {
36 ChildWindow *oldparent = parent;
37
38 parent = newParent;
39 return oldparent;
[10587]40 }
[2469]41
[3663]42 BOOL addChild(ChildWindow *child);
43 BOOL removeChild(ChildWindow *child);
[2469]44
45 void setNextChild(ChildWindow *child) { nextchild = child; };
46
[3663]47 BOOL destroyChildren();
[2469]48
49private:
[10587]50 void Lock() { pLockChild->enter(); };
51 void Unlock() { pLockChild->leave(); };
[2469]52
[10587]53 VMutex *pLockChild;
54
[2469]55 ChildWindow *parent; //GWL_HWNDPARENT
56 ChildWindow *children; //linked list of children of this window
57 ChildWindow *nextchild; //pointer to next child of our parent window
58};
59
60
61#endif //__cplusplus
62
63#endif //__WIN32WNDCHILD_H__
Note: See TracBrowser for help on using the repository browser.