- Timestamp:
- Jan 11, 2000, 6:34:44 PM (26 years ago)
- Location:
- trunk/src/user32/new
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/menu.cpp
r2406 r2410 1 /* $Id: menu.cpp,v 1. 6 2000-01-11 13:06:24 sandervlExp $*/1 /* $Id: menu.cpp,v 1.7 2000-01-11 17:34:42 cbratschi Exp $*/ 2 2 /* 3 3 * Menu functions … … 20 20 * This is probably not the meaning this style has in MS-Windows. 21 21 */ 22 23 /*24 CB: not yet implemented:25 - Win32BaseWindow handling26 - message functions27 */28 22 29 23 #include <assert.h> … … 1085 1079 FillRect( hdc, &rect, GetSysColorBrush(COLOR_HIGHLIGHT) ); 1086 1080 else { 1087 1081 //SvL: TODO: Bug in GDI32; draws black rectangle instead of menu color 1088 1082 /// for everything except the 1st menu item 1089 1090 1091 1092 1093 1083 RECT dummy = rect; 1084 dummy.bottom = dummy.top+1; 1085 dummy.right = dummy.right+1; 1086 FillRect( hdc, &dummy, GetSysColorBrush(COLOR_HIGHLIGHT) ); 1087 FillRect( hdc, &rect, GetSysColorBrush(COLOR_MENU) ); 1094 1088 } 1095 1089 … … 1789 1783 /* Find where to insert new item */ 1790 1784 1791 if ((pos==(UINT)-1) || ((flags & MF_BYPOSITION) && (pos == menu->nItems))) 1785 if ((pos==(UINT)-1) || ((flags & MF_BYPOSITION) && (pos == menu->nItems))) 1792 1786 { 1793 1787 /* Special case: append to menu */ … … 2123 2117 { 2124 2118 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(menu->hWnd); 2125 2126 2119 if(win32wnd==NULL) 2120 DebugInt3(); 2127 2121 2128 2122 ht = win32wnd->HandleNCHitTest(pt); -
trunk/src/user32/new/oslibwin.cpp
r2408 r2410 1 /* $Id: oslibwin.cpp,v 1.3 5 2000-01-11 13:52:18 sandervlExp $ */1 /* $Id: oslibwin.cpp,v 1.36 2000-01-11 17:34:43 cbratschi Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 26 26 #include "oslibgdi.h" 27 27 #include "pmwindow.h" 28 29 #define HAS_3DFRAME(exStyle) \30 ((exStyle & WS_EX_CLIENTEDGE_W) || (exStyle & WS_EX_STATICEDGE_W) || (exStyle & WS_EX_WINDOWEDGE_W))31 28 32 29 //****************************************************************************** -
trunk/src/user32/new/win32wbase.cpp
r2408 r2410 1 /* $Id: win32wbase.cpp,v 1.3 3 2000-01-11 13:52:19 sandervlExp $ */1 /* $Id: win32wbase.cpp,v 1.34 2000-01-11 17:34:43 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 5 5 * Copyright 1998-2000 Sander van Leeuwen (sandervl@xs4all.nl) 6 6 * Copyright 1999 Daniela Engert (dani@ngrt.de) 7 * Copyright 2000Christoph Bratschi (cbratschi@datacomm.ch)7 * Copyright 1999-2000 Christoph Bratschi (cbratschi@datacomm.ch) 8 8 * 9 9 * Parts based on Wine Windows code (windows\win.c) … … 51 51 #define SC_PUTMARK (SC_SCREENSAVE+2) 52 52 53 #define HAS_DLGFRAME(style,exStyle) \54 (((exStyle) & WS_EX_DLGMODALFRAME) || \55 (((style) & WS_DLGFRAME) && !((style) & WS_THICKFRAME)))56 57 #define HAS_THICKFRAME(style,exStyle) \58 (((style) & WS_THICKFRAME) && \59 !((exStyle) & WS_EX_DLGMODALFRAME) && \60 !((style) & WS_CHILD))61 62 #define HAS_THINFRAME(style) \63 (((style) & WS_BORDER) || !((style) & (WS_CHILD | WS_POPUP)))64 65 #define HAS_BIGFRAME(style,exStyle) \66 (((style) & (WS_THICKFRAME | WS_DLGFRAME)) || \67 ((exStyle) & WS_EX_DLGMODALFRAME))68 69 #define HAS_ANYFRAME(style,exStyle) \70 (((style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \71 ((exStyle) & WS_EX_DLGMODALFRAME) || \72 !((style) & (WS_CHILD | WS_POPUP)))73 74 #define HAS_3DFRAME(exStyle) \75 ((exStyle & WS_EX_CLIENTEDGE) || (exStyle & WS_EX_STATICEDGE) || (exStyle & WS_EX_WINDOWEDGE))76 77 #define HAS_BORDER(style, exStyle) \78 ((style & WS_BORDER) || HAS_THICKFRAME(style) || HAS_DLGFRAME(style,exStyle))79 80 #define IS_OVERLAPPED(style) \81 !(style & (WS_CHILD | WS_POPUP))82 83 #define HAS_MENU() (!(getStyle() & WS_CHILD) && (GetMenu() != 0))84 85 53 /* bits in the dwKeyData */ 86 54 #define KEYDATA_ALT 0x2000 … … 1090 1058 //dprintf(("CB: %d %d %d %d",rect.left,rect.top,rect.bottom,rect.right)); 1091 1059 DeleteObject(hrgn); 1092 //CB: todo: check if intersection with client 1060 //CB: todo: check if intersection with client, what does PM's frame??? 1093 1061 1094 1062 return rc; … … 1610 1578 case WM_SYSCHAR: 1611 1579 { 1612 1613 1614 { 1615 1580 int iMenuSysKey = 0; 1581 if (wParam == VK_RETURN && (getStyle() & WS_MINIMIZE)) 1582 { 1583 PostMessageA(getWindowHandle(), WM_SYSCOMMAND, 1616 1584 (WPARAM)SC_RESTORE, 0L ); 1617 1618 } 1619 1620 { 1621 1622 1585 break; 1586 } 1587 if ((HIWORD(lParam) & KEYDATA_ALT) && wParam) 1588 { 1589 if (wParam == VK_TAB || wParam == VK_ESCAPE) break; 1590 if (wParam == VK_SPACE && (getStyle() & WS_CHILD)) 1623 1591 getParent()->SendMessageA(Msg, wParam, lParam ); 1624 1592 else 1625 1593 SendMessageA(WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)(DWORD)wParam ); 1626 1594 } 1627 1595 else /* check for Ctrl-Esc */ 1628 1596 if (wParam != VK_ESCAPE) MessageBeep(0); 1629 1597 break; 1630 1598 } 1631 1599 … … 2728 2696 if(IsWindowDestroyed()) return; 2729 2697 2730 //CB: todo: dwExStyle, creating new frame controls, destroy not used controls, WS_VISIBLE, WS_CHILD, ...2731 // write test cases2732 2698 if ((dwStyle & 0xFFFF0000) != (oldStyle & 0xFFFF0000)) 2733 2699 { 2734 // dprintf(("updateWindowStyle: %x %x",oldStyle,dwStyle));2735 OSLibSetWindowStyle(OS2HwndFrame, dwStyle, fTaskList);2700 //CB: update 2701 //OSLibSetWindowStyle(OS2HwndFrame, dwStyle, fTaskList); 2736 2702 } 2737 2703 } -
trunk/src/user32/new/win32wbase.h
r2401 r2410 1 /* $Id: win32wbase.h,v 1.2 3 2000-01-10 23:37:24 sandervlExp $ */1 /* $Id: win32wbase.h,v 1.24 2000-01-11 17:34:44 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 56 56 #define BROADCAST_SEND 0 57 57 #define BROADCAST_POST 1 58 59 #define HAS_DLGFRAME(style,exStyle) \ 60 (((exStyle) & WS_EX_DLGMODALFRAME) || \ 61 (((style) & WS_DLGFRAME) && !((style) & WS_THICKFRAME))) 62 63 #define HAS_THICKFRAME(style,exStyle) \ 64 (((style) & WS_THICKFRAME) && \ 65 !((exStyle) & WS_EX_DLGMODALFRAME) && \ 66 !((style) & WS_CHILD)) 67 68 #define HAS_THINFRAME(style) \ 69 (((style) & WS_BORDER) || !((style) & (WS_CHILD | WS_POPUP))) 70 71 #define HAS_BIGFRAME(style,exStyle) \ 72 (((style) & (WS_THICKFRAME | WS_DLGFRAME)) || \ 73 ((exStyle) & WS_EX_DLGMODALFRAME)) 74 75 #define HAS_ANYFRAME(style,exStyle) \ 76 (((style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \ 77 ((exStyle) & WS_EX_DLGMODALFRAME) || \ 78 !((style) & (WS_CHILD | WS_POPUP))) 79 80 #define HAS_3DFRAME(exStyle) \ 81 ((exStyle & WS_EX_CLIENTEDGE) || (exStyle & WS_EX_STATICEDGE) || (exStyle & WS_EX_WINDOWEDGE)) 82 83 #define HAS_BORDER(style, exStyle) \ 84 ((style & WS_BORDER) || HAS_THICKFRAME(style) || HAS_DLGFRAME(style,exStyle)) 85 86 #define IS_OVERLAPPED(style) \ 87 !(style & (WS_CHILD | WS_POPUP)) 88 89 #define HAS_MENU() (!(getStyle() & WS_CHILD) && (GetMenu() != 0)) 58 90 59 91 class Win32BaseWindow : public GenericObject, public ChildWindow -
trunk/src/user32/new/win32wbasepos.cpp
r2396 r2410 1 /* $Id: win32wbasepos.cpp,v 1. 4 2000-01-10 17:18:11cbratschi Exp $ */1 /* $Id: win32wbasepos.cpp,v 1.5 2000-01-11 17:34:44 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (nonclient/position methods) … … 38 38 #include "pmframe.h" 39 39 #include "win32wdesktop.h" 40 41 /* Some useful macros */42 #define HAS_DLGFRAME(style,exStyle) \43 (((exStyle) & WS_EX_DLGMODALFRAME) || \44 (((style) & WS_DLGFRAME) && !((style) & WS_THICKFRAME)))45 46 #define HAS_THICKFRAME(style,exStyle) \47 (((style) & WS_THICKFRAME) && \48 !((exStyle) & WS_EX_DLGMODALFRAME))49 50 #define HAS_THINFRAME(style) \51 (((style) & WS_BORDER) || !((style) & (WS_CHILD | WS_POPUP)))52 53 #define HAS_BIGFRAME(style,exStyle) \54 (((style) & (WS_THICKFRAME | WS_DLGFRAME)) || \55 ((exStyle) & WS_EX_DLGMODALFRAME))56 57 #define HAS_ANYFRAME(style,exStyle) \58 (((style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \59 ((exStyle) & WS_EX_DLGMODALFRAME) || \60 !((style) & (WS_CHILD | WS_POPUP)))61 62 #define HAS_3DFRAME(exStyle) \63 ((exStyle & WS_EX_CLIENTEDGE) || (exStyle & WS_EX_STATICEDGE) || (exStyle & WS_EX_WINDOWEDGE))64 65 #define HAS_BORDER(style, exStyle) \66 ((style & WS_BORDER) || HAS_THICKFRAME(style) || HAS_DLGFRAME(style,exStyle))67 68 #define IS_OVERLAPPED(style) \69 !(style & (WS_CHILD | WS_POPUP))70 71 #define HAS_MENU() (!(getStyle() & WS_CHILD) && (GetMenu() != 0))72 40 73 41 /******************************************************************* -
trunk/src/user32/new/window.cpp
r2400 r2410 1 /* $Id: window.cpp,v 1. 29 2000-01-10 23:29:15 sandervlExp $ */1 /* $Id: window.cpp,v 1.30 2000-01-11 17:34:44 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 5 5 * Copyright 1999 Sander van Leeuwen 6 6 * Copyright 1999 Daniela Engert (dani@ngrt.de) 7 * Copyright 2000 Christoph Bratschi (cbratschi@datacomm.ch) 7 8 * 8 9 * Parts based on Wine Windows code (windows\win.c) … … 807 808 WS_EX_STATICEDGE | WS_EX_TOOLWINDOW); 808 809 if (exStyle & WS_EX_DLGMODALFRAME) style &= ~WS_THICKFRAME; 809 #if 0 //CB: todo 810 Win32BaseWindow::NC_AdjustRectOuter( rect, style, menu, exStyle ); 811 Win32BaseWindow::NC_AdjustRectInner( rect, style, exStyle ); 812 #endif 810 811 //Adjust rect outer (Win32BaseWindow::AdjustRectOuter) 812 /* Decide if the window will be managed (see CreateWindowEx) */ 813 //if (!WindowNeedsWMBorder()) //CB: check Options.managed 814 { 815 if (HAS_THICKFRAME(style,exStyle)) 816 InflateRect( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) ); 817 else 818 if (HAS_DLGFRAME(style,exStyle)) 819 InflateRect(rect, GetSystemMetrics(SM_CXDLGFRAME), GetSystemMetrics(SM_CYDLGFRAME) ); 820 else 821 if (HAS_THINFRAME(style)) 822 InflateRect( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER)); 823 824 if ((style & WS_CAPTION) == WS_CAPTION) 825 { 826 if (exStyle & WS_EX_TOOLWINDOW) 827 rect->top -= GetSystemMetrics(SM_CYSMCAPTION); 828 else 829 rect->top -= GetSystemMetrics(SM_CYCAPTION); 830 } 831 } 832 833 if (menu) 834 rect->top -= GetSystemMetrics(SM_CYMENU); 835 836 //Adjust rect inner (Win32BaseWindow::AdjustRectInner) 837 if (exStyle & WS_EX_CLIENTEDGE) 838 InflateRect (rect, GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE)); 839 840 if (exStyle & WS_EX_STATICEDGE) 841 InflateRect (rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER)); 842 843 if (style & WS_VSCROLL) rect->right += GetSystemMetrics(SM_CXVSCROLL); 844 if (style & WS_HSCROLL) rect->bottom += GetSystemMetrics(SM_CYHSCROLL); 845 813 846 dprintf(("AdjustWindowRectEx returned (%d,%d)(%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom)); 814 847 return TRUE;
Note:
See TracChangeset
for help on using the changeset viewer.