Audacity 3.2.0
Public Member Functions | List of all members
NativeWindow Class Reference

#include <NativeWindow.h>

Inheritance diagram for NativeWindow:
[legend]
Collaboration diagram for NativeWindow:
[legend]

Public Member Functions

 NativeWindow ()
 
virtual ~NativeWindow ()
 
bool Create (wxWindow *parent, WXWidget hwnd)
 

Detailed Description

Definition at line 26 of file NativeWindow.h.

Constructor & Destructor Documentation

◆ NativeWindow()

NativeWindow::NativeWindow ( )
inline

Definition at line 29 of file NativeWindow.h.

30 {
31 }

◆ ~NativeWindow()

virtual NativeWindow::~NativeWindow ( )
inlinevirtual

Definition at line 35 of file NativeWindow.h.

36 {
37 UnsubclassWin();
38 }

Member Function Documentation

◆ Create()

bool NativeWindow::Create ( wxWindow *  parent,
WXWidget  hwnd 
)
inline

Definition at line 40 of file NativeWindow.h.

41 {
42 const wxRect r = wxRectFromRECT(wxGetWindowRect((HWND)hwnd));
43
44 // Skip wxWindow::Create() which would try to create a new HWND, we don't
45 // want this as we already have one.
46 if (!CreateBase(parent,
47 wxID_ANY,
48 r.GetPosition(),
49 r.GetSize(),
50 0,
51 wxDefaultValidator,
52 wxS("nativewindow")))
53 {
54 return false;
55 }
56
57 parent->AddChild(this);
58
59 SubclassWin(hwnd);
60
61
62 InheritAttributes();
63
64 return true;
65 }

The documentation for this class was generated from the following file: