Commit Graph

59 Commits

Author SHA1 Message Date
Rein Klazes 7a560493fe user: Fix dereferencing a potential NULL pointer. 2006-04-13 11:27:46 +02:00
Rein Klazes b72c36fef8 user: Add an missing element to the hbmmenus array. 2006-04-08 15:53:10 +02:00
Vitaly Lipatov e96f03a1d7 user: Fix uninitialized rectangle in menu arrow painting. 2006-03-02 15:50:07 +01:00
Rein Klazes cc5b5cea96 user32: Fix handling of '\b' right flush character in menus.
- do not add extra space; modify the tests to confirm this;
- right flush to the menu tab stop, not to the menu border;
- small fixes to the menu tab stop calculation.
2006-03-01 20:40:17 +01:00
Jason Edmeades 24dc3de4c9 user32: Ensure VK_UP displays the popup menu for the selected item if
the popup menu is not visible
2006-03-01 12:39:09 +01:00
Rein Klazes 3a0b40fffb menu: Take the MF_DEFAULT flag in to account in MENU_CalcItemSize. 2006-02-20 20:32:02 +01:00
Rein Klazes 00ca259872 user: Menu drawing fixes.
- check mark is drawn left of a bitmap;
- if a MNS_CHECKORBMP-style menu has a checkmark, do no draw any bitmap;
- space for the popup arrow is also reserved for non popup items;
- implement the MNS_NOCHECK style.
2006-02-20 11:58:54 +01:00
Rein Klazes 885f217022 user: Menu string width calculation fixes.
- Use DrawText in stead of GetTextExtendPoint32, to properly measure
  strings with ampersands like "&File";
- Fix mess with strings with an embedded tab;
- In case of a menu bar, two extra pixels are added if the item has
  both a bitmap and string.
2006-02-20 11:58:03 +01:00
Rein Klazes 2757532fee user: Menu drawing fixes.
Replace some #defined constants by values calculated from windows
metrics.
2006-02-20 11:57:07 +01:00
Rein Klazes 444a547135 user: Menu drawing fixes.
- Move sending WM_MEASUREITEM message for HBMMENU_CALLBACK bitmaps to
MENU_GetBitmapItemSize();
- Save the received bitmap size in the menu item structure as it will
need to be sent in the WM_DRAWITEM message;
-  Move sending WM_DRAWITEM message for HBMMENU_CALLBACK bitmaps to
MENU_DrawBitmapItem();
- This also means that HBMMENU_CALLBACK bitmaps are now supported in
menu bars.
2006-02-20 11:56:21 +01:00
Rein Klazes 672a1e4e4e user: Move drawing of pop menu arrows to a subroutine reduces nesting
level of some large if statements in the drawing code. Some updates to
the comments.
2006-02-20 11:54:28 +01:00
Phil Krylov dafa5bf464 user: Implement scrolling in popup menus. 2006-02-17 18:34:31 +01:00
Dmitry Timoshkov 9b1ea63bf9 user32: Make GetMenuItemInfo tests pass under Wine.
- Change menu item search algorithm to recurse into a submenu first.
- Fallback to a found submenu if nothing else was found.
2006-01-23 11:59:21 +01:00
Troy Rollo b7652d89db user: Fix return type of EnableMenuItem. 2006-01-10 12:08:48 +01:00
Rein Klazes 079912c679 user32: Prevent a crash in GetMenuStringA caused by calling strlenW on
a NULL pointer, with a test.
2006-01-09 17:13:44 +01:00
Rein Klazes 1d4b52c254 user32: Menu tracing improvements. 2006-01-04 14:48:07 +01:00
Rein Klazes b34868dffa user32: Separate menu bitmaps and strings.
Store bitmaps and bitmaps always in separate fields in the internal
menu structure.  Get rid of a lot of assumptions in the code that the
menu can have strings only when it is not some other type and that
bitmaps come in two flavors.
Add a lot of conformance tests, including some submitted by Jason
Edmeades.
2006-01-03 13:23:28 +01:00
Dmitry Timoshkov b9212e2aba set_menu_item_text handles converting an empty menu item to a
separator on its own, give it a chance to do its work in the
MIIM_FTYPE case.
2005-11-28 11:53:20 +01:00
Markus Amsler 86b6749208 Improve c2man Documented-Total count. Changes:
- add missing description
- add missing returns section
- complete missing A/W pairs
- reformate comments, to match c2man requirements
2005-11-09 10:33:40 +00:00
Francois Gouget baab789ce8 Replace the 'if (!cond) ; else code' construct with the standard 'do {
code } while (0)' construct combined with a regular 'if'.
2005-09-26 09:57:38 +00:00
Alexandre Julliard 9f859692f9 Replace DPRINTF by TRACE in a few places. 2005-09-25 15:23:21 +00:00
Alexandre Julliard ba41fe20bc Fixed a few more pointer to integer typecast issues for 64-bit
platforms.
2005-09-12 21:22:32 +00:00
Alexandre Julliard 5c37785881 Use Get/SetWindowLongPtr when accessing pointers in the window extra
bytes.
2005-09-12 12:20:38 +00:00
Mike McCormack f919b72769 Fix magic item handling and warnings. 2005-08-22 18:56:05 +00:00
Dmitry Timoshkov 4ffc11ad0e Make CreateWindow with invalid menu handle test pass on Wine. 2005-08-09 10:22:45 +00:00
Alexandre Julliard bf575f1f8f Initialize the various menu global variables on demand instead of at
startup time.
2005-07-19 11:51:31 +00:00
Robert Shearman 7a9bacc45d Replace calls to DIALOG_GetCharSize with code to do the equivalent
using GdiGetCharDimensions.
2005-07-18 18:05:33 +00:00
Alexandre Julliard 8eb6664603 Removed creation of the no longer used shading brush. 2005-07-07 20:31:16 +00:00
Rein Klazes f5d2ea6ca4 - when sending the WM_DRAWITEM message in case of a menu item with
hbmpItem = HBMMENU_CALLBACK, move the drawing origin to the top left
  of the item rectangle
- at the same time also make sure that the itemState field of the
 DRAWITEMSTRUCT is properly initialized
- do the drawing of the check mark before sending the WM_DRAWITEM
  message, some application likes to "overdraw" the checkmark.
2005-07-06 19:03:18 +00:00
Frank Richter b25fa587a7 Add support for drawing menus in "flat" style. 2005-07-05 11:45:28 +00:00
Rein Klazes 75d88907ff Owner drawn menu item size calculation fixes:
- Correct width calculation of owner drawn menu items;
- Set the height value in the MEASUREITEM struct to the same value as
  Windows (NT/2k/XP) does (problem debugged by Felix Nawothnig);
- Add tests for the fixes above;
- Also add tests for menu bars with owner drawn items.
2005-06-20 14:12:39 +00:00
Hans Leidekker 4f27582cc8 Stub implementation for GetMenuBarInfo. 2005-06-20 11:45:21 +00:00
Rein Klazes 1c5671df07 Multi column popup menus have 4 pixel space between the columns. With
conformance test.
2005-05-10 13:17:33 +00:00
Jose Alonso 0e21f376da Change the order of DispatchMessage and message removal. 2005-04-19 09:47:02 +00:00
Robert Shearman cec9e23cc3 Recalculate the menu on calling ModifyMenu so that the menu items are
shown at the correct width.
2005-04-14 13:56:29 +00:00
Dmitry Timoshkov 9640918917 - Make GetSystemMenu respect CS_NOCLOSE.
- EnableMenuItem should not generate WM_WINDOWPOSCHANGING message.
- Make nonclient code check for presence of SC_CLOSE, not CS_NOCLOSE
  window class style.
- Add a test case.
2005-03-30 18:59:27 +00:00
Uwe Bonnes af305c7462 Zero out return string in GetMenuStringA/W. 2005-03-30 10:24:07 +00:00
Ulrich Czekalla e64b875311 Child windows with the WS_POPUP style are allowed to have a menu. 2005-03-25 20:47:32 +00:00
Ulrich Czekalla 852fc5f161 Don't map point to parent's client window because the rest of the code
assumes screen coordinates.
2005-03-25 16:38:15 +00:00
Alexandre Julliard 039603c77d Don't maintain a client-side WND structure for the desktop window.
Made WIN_GetPtr return WND_DESKTOP in that case.
2005-03-24 15:18:50 +00:00
Maxime Bellengé cbd3a53d4b Implemented MIIM_BITMAP state.
Handle MNS_CHECKORBMP style.
2005-03-09 12:39:01 +00:00
Dmitry Timoshkov d515640b6a DestroyMenu should not destroy system menu popup owner. 2005-03-02 12:16:44 +00:00
Dmitry Timoshkov 600086372a Take Shift key state into account while processing an accelerator.
Add a couple of test cases.
2005-02-21 18:33:27 +00:00
Alexandre Julliard d7726c3a73 Store the "managed" flag as a window property instead of the
Wine-specific WS_EX_MANAGED style bit.
2005-02-01 18:53:59 +00:00
Alexandre Julliard 6382ffae2a Replace a number of calls to WIN_FindWndPtr by WIN_GetPtr. 2005-01-20 20:07:42 +00:00
Alexandre Julliard 6758db9a0c Get rid of nonclient.h and of the corresponding exported functions in
user32.spec.
2005-01-17 20:27:11 +00:00
Dmitry Timoshkov 61b5e90d34 Make Alt press/release test actually pass for not managed windows. 2005-01-11 15:47:13 +00:00
Dmitry Timoshkov b44b2cc880 Add more tests for keyboard/menu activation behaviour, make the tests
pass under Wine.
2005-01-11 10:38:31 +00:00
Michael Stefaniuc 5ad7d858e0 Do not check for non NULL pointer before HeapFree'ing it. It's
redundant.
2004-12-23 17:06:43 +00:00
Alexandre Julliard ebe3c529b1 Janitorial: C booleans must not be compared against TRUE. 2004-12-09 14:07:59 +00:00