|
Blender
V2.93
|
#include <GHOST_WindowWin32.h>
Inherits GHOST_Window.
Public Attributes | |
| bool | m_tabletInRange |
| bool | m_inLiveResize |
| HMODULE | handle = NULL |
| GHOST_WIN32_WTInfo | info |
| GHOST_WIN32_WTOpen | open |
| GHOST_WIN32_WTClose | close |
| GHOST_WIN32_WTPacket | packet |
| GHOST_WIN32_WTEnable | enable |
| GHOST_WIN32_WTOverlap | overlap |
| HCTX | tablet |
| LONG | maxPressure |
| LONG | maxAzimuth |
| LONG | maxAltitude |
Additional Inherited Members | |
Protected Member Functions inherited from GHOST_Window | |
| GHOST_TSuccess | releaseNativeHandles () |
Protected Attributes inherited from GHOST_Window | |
| GHOST_TDrawingContextType | m_drawingContextType |
| GHOST_TUserDataPtr | m_userData |
| bool | m_cursorVisible |
| GHOST_TGrabCursorMode | m_cursorGrab |
| GHOST_TAxisFlag | m_cursorGrabAxis |
| GHOST_TInt32 | m_cursorGrabInitPos [2] |
| GHOST_TInt32 | m_cursorGrabAccumPos [2] |
| GHOST_Rect | m_cursorGrabBounds |
| GHOST_TStandardCursor | m_cursorShape |
| bool | m_progressBarVisible |
| bool | m_canAcceptDragOperation |
| bool | m_isUnsavedChanges |
| bool | m_fullScreen |
| bool | m_wantStereoVisual |
| GHOST_TUns32 | m_fullScreenWidth |
| GHOST_TUns32 | m_fullScreenHeight |
| float | m_nativePixelSize |
GHOST window on M$ Windows OSs.
Definition at line 247 of file GHOST_WindowWin32.h.
| GHOST_WindowWin32::GHOST_WindowWin32 | ( | GHOST_SystemWin32 * | system, |
| const char * | title, | ||
| GHOST_TInt32 | left, | ||
| GHOST_TInt32 | top, | ||
| GHOST_TUns32 | width, | ||
| GHOST_TUns32 | height, | ||
| GHOST_TWindowState | state, | ||
| GHOST_TDrawingContextType | type = GHOST_kDrawingContextTypeNone, |
||
| bool | wantStereoVisual = false, |
||
| bool | alphaBackground = false, |
||
| GHOST_WindowWin32 * | parentWindow = 0, |
||
| bool | is_debug = false, |
||
| bool | dialog = false |
||
| ) |
Constructor. Creates a new window and opens it. To check if the window was created properly, use the getValid() method.
| title | The text shown in the title bar of the window. |
| left | The coordinate of the left edge of the window. |
| top | The coordinate of the top edge of the window. |
| width | The width the window. |
| height | The height the window. |
| state | The state the window is initially opened with. |
| type | The type of drawing context installed in this window. |
| wantStereoVisual | Stereo visual for quad buffered stereo. |
| parentWindowHwnd | TODO. |
Definition at line 61 of file GHOST_WindowWin32.cpp.
References alloc_utf16_from_8(), CLSID_TaskbarList, FALSE, free(), GHOST_System::getTabletAPI(), GHOST_kTabletNative, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, GHOST_TABLET_DATA_NONE, height, left, LPVOID, GHOST_System::m_windowFocus, max, min, NULL, PACKETDATA, PACKETMODE, GHOST_Window::setDrawingContextType(), state, top, type, and width.
| GHOST_WindowWin32::~GHOST_WindowWin32 | ( | ) |
Destructor. Closes the window and disposes resources allocated.
Definition at line 301 of file GHOST_WindowWin32.cpp.
References GHOST_System::getWindowManager(), GHOST_WindowManager::getWindows(), NULL, GHOST_DropTargetWin32::Release(), GHOST_Window::releaseNativeHandles(), ITaskbarList3::SetProgressState(), and TBPF_NOPROGRESS.
|
inlinevirtual |
Implements GHOST_IWindow.
Definition at line 454 of file GHOST_WindowWin32.h.
References GHOST_kFailure.
| void GHOST_WindowWin32::bringTabletContextToFront | ( | ) |
Definition at line 1150 of file GHOST_WindowWin32.cpp.
References GHOST_kTabletWintab, and useTabletAPI().
Referenced by GHOST_SystemWin32::processWindowEvent().
|
virtual |
Converts a point in screen coordinates to client rectangle coordinates
| inX | The x-coordinate in the client rectangle. |
| inY | The y-coordinate in the client rectangle. |
| outX | The x-coordinate on the screen. |
| outY | The y-coordinate on the screen. |
Implements GHOST_IWindow.
Definition at line 507 of file GHOST_WindowWin32.cpp.
References Freestyle::Nature::POINT.
|
inlinevirtual |
Implements GHOST_IWindow.
Definition at line 459 of file GHOST_WindowWin32.h.
References GHOST_kFailure.
|
virtual |
Hides the progress bar in the icon
Reimplemented from GHOST_Window.
Definition at line 1255 of file GHOST_WindowWin32.cpp.
References GHOST_kFailure, GHOST_kSuccess, ITaskbarList3::SetProgressState(), and TBPF_NOPROGRESS.
|
virtual |
Returns the client rectangle dimensions. The left and top members of the rectangle are always zero.
| bounds | The bounding rectangle of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 398 of file GHOST_WindowWin32.cpp.
References bounds(), and Freestyle::Nature::POINT.
Referenced by GHOST_SystemWin32::processCursorEvent(), setClientHeight(), setClientSize(), and setClientWidth().
|
overridevirtual |
Returns the recommended DPI for this window.
Reimplemented from GHOST_Window.
Definition at line 1161 of file GHOST_WindowWin32.cpp.
References USER_DEFAULT_SCREEN_DPI.
| HWND GHOST_WindowWin32::getHWND | ( | ) | const |
Access to the handle of the window.
Definition at line 365 of file GHOST_WindowWin32.cpp.
Referenced by GHOST_DropTargetWin32::GHOST_DropTargetWin32().
| GHOST_TSuccess GHOST_WindowWin32::getPointerInfo | ( | std::vector< GHOST_PointerInfoWin32 > & | outPointerInfo, |
| WPARAM | wParam, | ||
| LPARAM | lParam | ||
| ) |
Translate WM_POINTER events into GHOST_PointerInfoWin32 structs.
| outPointerInfo | Storage to return resulting GHOST_PointerInfoWin32 structs. |
| wParam | WPARAM of the event. |
| lParam | LPARAM of the event. |
Definition at line 937 of file GHOST_WindowWin32.cpp.
References tagPOINTER_INFO::ButtonChangeType, fabs(), GET_POINTERID_WPARAM, GHOST_ISystem::getSystem(), GHOST_kButtonMaskButton4, GHOST_kButtonMaskButton5, GHOST_kButtonMaskLeft, GHOST_kButtonMaskMiddle, GHOST_kButtonMaskRight, GHOST_kFailure, GHOST_kSuccess, GHOST_kTabletModeEraser, GHOST_kTabletModeStylus, GHOST_kTabletNative, IS_POINTER_PRIMARY_WPARAM, NULL, PEN_FLAG_ERASER, PEN_MASK_PRESSURE, PEN_MASK_TILT_X, PEN_MASK_TILT_Y, tagPOINTER_INFO::PerformanceCount, GHOST_SystemWin32::performanceCounterToMillis(), POINTER_CHANGE_FIFTHBUTTON_DOWN, POINTER_CHANGE_FIFTHBUTTON_UP, POINTER_CHANGE_FIRSTBUTTON_DOWN, POINTER_CHANGE_FIRSTBUTTON_UP, POINTER_CHANGE_FOURTHBUTTON_DOWN, POINTER_CHANGE_FOURTHBUTTON_UP, POINTER_CHANGE_SECONDBUTTON_DOWN, POINTER_CHANGE_SECONDBUTTON_UP, POINTER_CHANGE_THIRDBUTTON_DOWN, POINTER_CHANGE_THIRDBUTTON_UP, tagPOINTER_INFO::pointerId, tagPOINTER_INFO::ptPixelLocation, and useTabletAPI().
Referenced by GHOST_SystemWin32::processPointerEvent().
| HCURSOR GHOST_WindowWin32::getStandardCursor | ( | GHOST_TStandardCursor | shape | ) | const |
Loads the windows equivalent of a standard GHOST cursor.
| visible | Flag for cursor visibility. |
| cursorShape | The cursor shape. |
Definition at line 734 of file GHOST_WindowWin32.cpp.
References GHOST_kStandardCursorBottomLeftCorner, GHOST_kStandardCursorBottomRightCorner, GHOST_kStandardCursorBottomSide, GHOST_kStandardCursorCrosshair, GHOST_kStandardCursorCrosshairA, GHOST_kStandardCursorCrosshairB, GHOST_kStandardCursorCrosshairC, GHOST_kStandardCursorCustom, GHOST_kStandardCursorDefault, GHOST_kStandardCursorDestroy, GHOST_kStandardCursorDownArrow, GHOST_kStandardCursorEraser, GHOST_kStandardCursorEWScroll, GHOST_kStandardCursorEyedropper, GHOST_kStandardCursorHelp, GHOST_kStandardCursorHorizontalSplit, GHOST_kStandardCursorKnife, GHOST_kStandardCursorLeftArrow, GHOST_kStandardCursorLeftRight, GHOST_kStandardCursorLeftSide, GHOST_kStandardCursorMove, GHOST_kStandardCursorNSEWScroll, GHOST_kStandardCursorNSScroll, GHOST_kStandardCursorPencil, GHOST_kStandardCursorRightArrow, GHOST_kStandardCursorStop, GHOST_kStandardCursorText, GHOST_kStandardCursorTopLeftCorner, GHOST_kStandardCursorTopRightCorner, GHOST_kStandardCursorTopSide, GHOST_kStandardCursorUpArrow, GHOST_kStandardCursorUpDown, GHOST_kStandardCursorVerticalSplit, GHOST_kStandardCursorWait, GHOST_kStandardCursorZoomIn, GHOST_kStandardCursorZoomOut, module, and NULL.
Referenced by loadCursor().
|
virtual |
Returns the state of the window (normal, minimized, maximized).
Implements GHOST_IWindow.
Definition at line 484 of file GHOST_WindowWin32.cpp.
References GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, and result.
Referenced by GHOST_SystemWin32::s_wndProc(), setOrder(), and setState().
|
inline |
Definition at line 427 of file GHOST_WindowWin32.h.
Referenced by GHOST_SystemWin32::processButtonEvent(), and GHOST_SystemWin32::processCursorEvent().
|
virtual |
Returns the title displayed in the title bar.
Implements GHOST_IWindow.
Definition at line 377 of file GHOST_WindowWin32.cpp.
References conv_utf_16_to_8(), count_utf_8_from_16(), and L.
|
virtual |
Returns indication as to whether the window is valid.
Reimplemented from GHOST_Window.
Definition at line 360 of file GHOST_WindowWin32.cpp.
References GHOST_Window::getValid().
Referenced by GHOST_SystemWin32::createWindow().
|
virtual |
Returns the window rectangle dimensions. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
| bounds | The bounding rectangle of the window. |
Implements GHOST_IWindow.
Definition at line 388 of file GHOST_WindowWin32.cpp.
References bounds().
Referenced by setClientHeight(), setClientSize(), and setClientWidth().
|
virtual |
Invalidates the contents of this window.
Implements GHOST_IWindow.
Definition at line 587 of file GHOST_WindowWin32.cpp.
References FALSE, GHOST_kFailure, and GHOST_kSuccess.
|
virtual |
Reimplemented from GHOST_Window.
Definition at line 701 of file GHOST_WindowWin32.cpp.
| void GHOST_WindowWin32::loadCursor | ( | bool | visible, |
| GHOST_TStandardCursor | cursorShape | ||
| ) | const |
Definition at line 860 of file GHOST_WindowWin32.cpp.
References FALSE, getStandardCursor(), GHOST_kStandardCursorDefault, and NULL.
Referenced by GHOST_SystemWin32::s_wndProc().
| void GHOST_WindowWin32::lostMouseCapture | ( | ) |
Inform the window that it has lost mouse capture, called in response to native window system messages.
Definition at line 692 of file GHOST_WindowWin32.cpp.
Referenced by GHOST_SystemWin32::s_wndProc().
| void GHOST_WindowWin32::processWin32TabletActivateEvent | ( | WORD | state | ) |
Definition at line 1019 of file GHOST_WindowWin32.cpp.
References GHOST_kTabletWintab, state, and useTabletAPI().
Referenced by GHOST_SystemWin32::s_wndProc().
| void GHOST_WindowWin32::processWin32TabletEvent | ( | WPARAM | wParam, |
| LPARAM | lParam | ||
| ) |
Definition at line 1082 of file GHOST_WindowWin32.cpp.
References GHOST_TabletData::Active, KDL::cos(), fabs(), float(), GHOST_kTabletModeEraser, GHOST_kTabletModeNone, GHOST_kTabletModeStylus, GHOST_kTabletWintab, M_PI, GHOST_TabletData::Pressure, KDL::sin(), useTabletAPI(), GHOST_TabletData::Xtilt, and GHOST_TabletData::Ytilt.
Referenced by GHOST_SystemWin32::s_wndProc().
| void GHOST_WindowWin32::processWin32TabletInitEvent | ( | ) |
Definition at line 1050 of file GHOST_WindowWin32.cpp.
References GHOST_TabletData::Active, GHOST_kTabletModeNone, GHOST_kTabletWintab, and useTabletAPI().
Referenced by GHOST_SystemWin32::s_wndProc().
|
virtual |
Converts a point in screen coordinates to client rectangle coordinates
| inX | The x-coordinate on the screen. |
| inY | The y-coordinate on the screen. |
| outX | The x-coordinate in the client rectangle. |
| outY | The y-coordinate in the client rectangle. |
Implements GHOST_IWindow.
Definition at line 496 of file GHOST_WindowWin32.cpp.
References Freestyle::Nature::POINT.
|
virtual |
Resizes client rectangle height.
| height | The new height of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 446 of file GHOST_WindowWin32.cpp.
References getClientBounds(), GHOST_Rect::getHeight(), GHOST_Rect::getWidth(), getWindowBounds(), GHOST_kFailure, GHOST_kSuccess, and height.
|
virtual |
Resizes client rectangle.
| width | The new width of the client area of the window. |
| height | The new height of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 465 of file GHOST_WindowWin32.cpp.
References getClientBounds(), GHOST_Rect::getHeight(), GHOST_Rect::getWidth(), getWindowBounds(), GHOST_kFailure, GHOST_kSuccess, height, and width.
|
virtual |
Resizes client rectangle width.
| width | The new width of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 427 of file GHOST_WindowWin32.cpp.
References getClientBounds(), GHOST_Rect::getHeight(), GHOST_Rect::getWidth(), getWindowBounds(), GHOST_kFailure, GHOST_kSuccess, and width.
|
virtual |
Sets the order of the window (bottom, top).
| order | The order of the window. |
Implements GHOST_IWindow.
Definition at line 560 of file GHOST_WindowWin32.cpp.
References FALSE, getState(), GHOST_kFailure, GHOST_kSuccess, GHOST_kWindowOrderBottom, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, NULL, order, and setState().
|
virtual |
Sets the progress bar value displayed in the window/application icon
| progress | The progress percentage (0.0 to 1.0). |
Reimplemented from GHOST_Window.
Definition at line 1246 of file GHOST_WindowWin32.cpp.
References GHOST_kFailure, GHOST_kSuccess, and ITaskbarList3::SetProgressValue().
|
virtual |
Sets the state of the window (normal, minimized, maximized).
| state | The state of the window. |
Implements GHOST_IWindow.
Definition at line 518 of file GHOST_WindowWin32.cpp.
References getState(), GHOST_kFailure, GHOST_kSuccess, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, and state.
Referenced by GHOST_SystemWin32::s_wndProc(), and setOrder().
|
virtual |
Sets the title displayed in the title bar.
| title | The title to display in the title bar. |
Implements GHOST_IWindow.
Definition at line 370 of file GHOST_WindowWin32.cpp.
References alloc_utf16_from_8(), and free().
| void GHOST_WindowWin32::updateMouseCapture | ( | GHOST_MouseCaptureEventWin32 | event | ) |
Register a mouse capture state (should be called for any real button press, controls mouse capturing).
| event | Whether mouse was pressed and released, or an operator grabbed or ungrabbed the mouse. |
Definition at line 706 of file GHOST_WindowWin32.cpp.
References MousePressed, MouseReleased, OperatorGrab, and OperatorUngrab.
Referenced by GHOST_SystemWin32::processButtonEvent(), and GHOST_SystemWin32::processPointerEvent().
| bool GHOST_WindowWin32::useTabletAPI | ( | GHOST_TTabletAPI | api | ) | const |
Query whether given tablet API should be used.
| api | Tablet API to test. |
Definition at line 1034 of file GHOST_WindowWin32.cpp.
References GHOST_System::getTabletAPI(), GHOST_kTabletAutomatic, GHOST_kTabletNative, and GHOST_kTabletWintab.
Referenced by bringTabletContextToFront(), getPointerInfo(), GHOST_SystemWin32::processCursorEvent(), GHOST_SystemWin32::processPointerEvent(), processWin32TabletActivateEvent(), processWin32TabletEvent(), and processWin32TabletInitEvent().
| GHOST_WIN32_WTClose GHOST_WindowWin32::close |
Definition at line 564 of file GHOST_WindowWin32.h.
| GHOST_WIN32_WTEnable GHOST_WindowWin32::enable |
Definition at line 566 of file GHOST_WindowWin32.h.
| HMODULE GHOST_WindowWin32::handle = NULL |
WinTab.dll handle.
Definition at line 559 of file GHOST_WindowWin32.h.
| GHOST_WIN32_WTInfo GHOST_WindowWin32::info |
API functions
Definition at line 562 of file GHOST_WindowWin32.h.
| bool GHOST_WindowWin32::m_inLiveResize |
if the window currently resizing
Definition at line 470 of file GHOST_WindowWin32.h.
Referenced by GHOST_SystemWin32::s_wndProc().
| bool GHOST_WindowWin32::m_tabletInRange |
Whether a tablet stylus is being tracked.
Definition at line 467 of file GHOST_WindowWin32.h.
Referenced by GHOST_SystemWin32::processCursorEvent(), and GHOST_SystemWin32::processPointerEvent().
| LONG GHOST_WindowWin32::maxAltitude |
Definition at line 572 of file GHOST_WindowWin32.h.
| LONG GHOST_WindowWin32::maxAzimuth |
Definition at line 572 of file GHOST_WindowWin32.h.
| LONG GHOST_WindowWin32::maxPressure |
Definition at line 571 of file GHOST_WindowWin32.h.
| GHOST_WIN32_WTOpen GHOST_WindowWin32::open |
Definition at line 563 of file GHOST_WindowWin32.h.
| GHOST_WIN32_WTOverlap GHOST_WindowWin32::overlap |
Definition at line 567 of file GHOST_WindowWin32.h.
| GHOST_WIN32_WTPacket GHOST_WindowWin32::packet |
Definition at line 565 of file GHOST_WindowWin32.h.
| HCTX GHOST_WindowWin32::tablet |
Stores the Tablet context if detected Tablet features using WinTab.dll
Definition at line 570 of file GHOST_WindowWin32.h.