0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / WNT / WNT_WClass.hxx
42cf5bc1 1// Created on: 1996-01-26
2// Created by: PLOTNIKOV Eugeny
3// Copyright (c) 1996-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
6// This file is part of Open CASCADE Technology software library.
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
17#ifndef _WNT_WClass_HeaderFile
18#define _WNT_WClass_HeaderFile
20#include <Standard.hxx>
42cf5bc1 21
1ce0716b 22#if defined(_WIN32) && !defined(OCCT_UWP)
42cf5bc1 24#include <Aspect_Handle.hxx>
25#include <Standard_Address.hxx>
ad03c234 26#include <Standard_CString.hxx>
42cf5bc1 27#include <Standard_Integer.hxx>
ad03c234 28#include <Standard_Transient.hxx>
29#include <Standard_Type.hxx>
30#include <TCollection_AsciiString.hxx>
42cf5bc1 31
32//! This class defines a Windows NT window class.
33//! A window in Windows NT is always created based on a
34//! window class. The window class identifies the window
35//! procedure that processes messages to the window. Each
36//! window class has unique name ( character string ). More
37//! than one window can be created based on a single window
38//! class. For example, all button windows in Windows NT
39//! are created based on the same window class. The window
40//! class defines the window procedure and some other
41//! characteristics ( background, mouse cursor shape etc. )
42//! of the windows that are created based on that class.
43//! When we create a window, we define additional
44//! characteristics of the window that are unique to that
45//! window. So, we have to create and register window
46//! class before creation of any window. Of course, it's possible
47//! to create a new window class for each window inside
48//! the Window class and do not use the WClass at all.
49//! We implemented this class for sake of flexibility of
50//! event processing.
ad03c234 51class WNT_WClass : public Standard_Transient
42cf5bc1 52{
ad03c234 53 friend class WNT_Window;
54 DEFINE_STANDARD_RTTIEXT(WNT_WClass, Standard_Transient)
42cf5bc1 55public:
42cf5bc1 56
57 //! Creates a Windows NT window class and registers it.
ad03c234 58 Standard_EXPORT WNT_WClass (const TCollection_AsciiString& theClassName,
59 const Standard_Address theWndProc,
896faa72 60 const unsigned int theStyle,
ad03c234 61 const Standard_Integer theClassExtra = 0,
62 const Standard_Integer theWindowExtra = 0,
63 const Aspect_Handle theCursor = NULL,
64 const Aspect_Handle theIcon = NULL,
65 const TCollection_AsciiString& theMenuName = TCollection_AsciiString());
42cf5bc1 67 //! Destroys all resources attached to the class
e6f550da 68 Standard_EXPORT ~WNT_WClass();
42cf5bc1 69
ad03c234 70 //! Returns address of window procedure.
71 Standard_Address WndProc() const { return myWndProc; }
42cf5bc1 72
ad03c234 73 //! Returns a class name.
74 const TCollection_AsciiString& Name() const { return myClassName; }
42cf5bc1 75
ad03c234 76 //! Returns a program instance handle.
77 Aspect_Handle Instance() const { return myAppInstance; }
42cf5bc1 78
ad03c234 81 TCollection_AsciiString myClassName;
82 Aspect_Handle myAppInstance;
83 Standard_Address myWndProc;
42cf5bc1 84
42cf5bc1 85};
ad03c234 87DEFINE_STANDARD_HANDLE(WNT_WClass, Standard_Transient)
42cf5bc1 88
1ce0716b 89#endif // _WIN32
42cf5bc1 90#endif // _WNT_WClass_HeaderFile