8 #include "../platform_win32.h" 12 #include "../../cframe.h" 17 class Win32Frame :
public IPlatformFrame,
public IWin32PlatformFrame
20 Win32Frame (IPlatformFrameCallback* frame,
const CRect& size, HWND parent, PlatformType parentType);
21 ~Win32Frame () noexcept;
23 HWND getHWND ()
const override {
return windowHandle; }
24 HWND getPlatformWindow ()
const {
return windowHandle; }
25 HWND getParentPlatformWindow ()
const {
return parentWindow; }
26 HWND getOuterWindow ()
const;
27 IPlatformFrameCallback* getFrame ()
const {
return frame; }
30 bool getGlobalPosition (CPoint& pos)
const override;
31 bool setSize (
const CRect& newSize)
override;
32 bool getSize (CRect& size)
const override;
33 bool getCurrentMousePosition (CPoint& mousePosition)
const override;
34 bool getCurrentMouseButtons (CButtonState& buttons)
const override;
35 bool setMouseCursor (CCursorType type)
override;
36 bool invalidRect (
const CRect& rect)
override;
37 bool scrollRect (
const CRect& src,
const CPoint& distance)
override;
38 bool showTooltip (
const CRect& rect,
const char* utf8Text)
override;
39 bool hideTooltip ()
override;
40 void* getPlatformRepresentation ()
const override {
return windowHandle; }
41 SharedPointer<IPlatformTextEdit> createPlatformTextEdit (IPlatformTextEditCallback* textEdit)
override;
42 SharedPointer<IPlatformOptionMenu> createPlatformOptionMenu ()
override;
43 #if VSTGUI_OPENGL_SUPPORT 44 SharedPointer<IPlatformOpenGLView> createPlatformOpenGLView ()
override;
46 SharedPointer<IPlatformViewLayer> createPlatformViewLayer (IPlatformViewLayerDelegate* drawDelegate, IPlatformViewLayer* parentLayer =
nullptr)
override {
return 0; }
47 SharedPointer<COffscreenContext> createOffscreenContext (CCoord width, CCoord height,
double scaleFactor = 1.)
override;
48 DragResult doDrag (IDataPackage* source,
const CPoint& offset, CBitmap* dragBitmap)
override;
50 void setClipboard (
const SharedPointer<IDataPackage>& data)
override;
51 SharedPointer<IDataPackage> getClipboard ()
override;
52 PlatformType getPlatformType ()
const override {
return PlatformType::kHWND; }
54 LONG_PTR WINAPI proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
58 void paint (HWND hwnd);
60 static void initWindowClass ();
61 static void destroyWindowClass ();
62 static LONG_PTR WINAPI WindowProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
63 static int32_t gUseCount;
70 COffscreenContext* backBuffer;
71 CDrawContext* deviceContext;
77 RGNDATA* updateRegionList;
78 DWORD updateRegionListSize;
85 #endif // __win32frame__ Definition: customcontrols.cpp:8