Commit Graph
101 Commits
Author SHA1 Message Date
Everaldo Canuto 37f51fa990 * MenuAPI.cs: When deactivate menu verify if hotkey (_) is active and redraw
menu bar. It fixes some drawing issues in menu bar.

2007-04-27  Everaldo Canuto  <[email protected]>


svn path=/trunk/mcs/; revision=76391
2007-04-27 16:20:34 +00:00
Everaldo Canuto c4838ae2da 2007-04-27 Everaldo Canuto <[email protected]>
* MenuAPI.cs: Remove unneeded "keynav_state = KeyNavState.Idle" before 
	Deactivate calls, Deactivate method already do it. Also ser ActiveTracker
	when <alt> key is pressed.


svn path=/trunk/mcs/; revision=76389
2007-04-27 15:27:15 +00:00
Everaldo Canuto eb0086f341 * MenuAPI.cs:
- Remove unneeded parameters in UpdateCursor.
	- Fix UpdateCursor to check if menu is active.
	- Call UpdateCursor when menu deactivate my click.
	[Fixes remaining issues from #80410]

2007-04-04  Everaldo Canuto  <[email protected]>


svn path=/trunk/mcs/; revision=75377
2007-04-04 09:01:49 +00:00
Everaldo Canuto f830c10560 2007-04-04 Everaldo Canuto <[email protected]>
* Control.cs: GetRealChildAtPoint method added, it make an
	recursive child control search for the point. 

	* Form.cs: Makes use of GetRealChildAtPoint in mouse event after closes
	menu.

	* MenuAPI.cs: Makes use of GetRealChildAtPoint in UpdateCursor.


svn path=/trunk/mcs/; revision=75376
2007-04-04 08:29:24 +00:00
Everaldo Canuto 200dde04e7 2007-03-29 Everaldo Canuto <[email protected]>
* MenuAPI.cs: Make OnMouseDown returns a boolean to identify if event is
	processed.

	* Form.cs: When active tracker mouse down is not processed, send event 
	back to control inside mouse position. [Fixes #81227]


svn path=/trunk/mcs/; revision=75170
2007-03-29 19:27:42 +00:00
Everaldo Canuto 9dea99b850 * MenuAPI.cs: Remove unneeded check for grab_control in UpdateCursor.
2007-03-22  Everaldo Canuto  <[email protected]>


svn path=/trunk/mcs/; revision=74795
2007-03-22 11:17:05 +00:00
Everaldo Canuto 3be540ef57 2007-03-22 Everaldo Canuto <[email protected]>
* MenuAPI.cs: UpdateCursor method added, it is calling in OnMotion to update
	cursor for child controls. In ShowWindow and HideWindow now call SetCursor 
	every time. Fixes #81410.


svn path=/trunk/mcs/; revision=74794
2007-03-22 10:58:17 +00:00
Everaldo Canuto 4fb085fa28 2007-03-21 Everaldo Canuto <[email protected]>
* MenuAPI.cs: In ProcessKeys returns false when key is not processed.
	[Fixes #81203]


svn path=/trunk/mcs/; revision=74740
2007-03-21 15:02:38 +00:00
Jonathan Pobst 21bb3933cf 2007-03-07 Jonathan Pobst <[email protected]>
* XplatUIWin32.cs: The no_activate stuff was forcing us to create a
	Handle before we were supposed to.  Now checks ActivateOnShow property
	in Control.
	* Control.cs: Add internal ActivateOnShow property.
	* ComboBox.cs, Form.cs, MenuAPI.cs, ToolStripDropDown.cs: Return false
	for ActivateOnShow.
	* Hwnd.cs Remove no longer needed no_activate field.

svn path=/trunk/mcs/; revision=73921
2007-03-07 22:31:11 +00:00
Everaldo Canuto f8d8985967 2007-02-27 Everaldo Canuto <[email protected]>
* MenuAPI.cs: Change keynav_state before call SelectItem. Fixes #80901.


svn path=/trunk/mcs/; revision=73518
2007-02-27 22:12:03 +00:00
Everaldo Canuto 1fec3d5f31 2007-01-06 Everaldo Canuto <[email protected]>
* MenuAPI.cs: hotkey_active internal field added, it is required because
	we need to know when hotkeys must be draw, before this change a keystate
	Navigating was used but we can have menu in navigating state without
	hotkeys. Fixes #80694.
	
	* ThemeWin32Classic.cs: Only draw hot keys when hotkey_active is true.


svn path=/trunk/mcs/; revision=72400
2007-02-07 06:25:32 +00:00
Everaldo Canuto 0cb693f7eb 2007-01-26 Everaldo Canuto <[email protected]>
* MenuAPI.cs: Fixed kerboard grab problem when "enter"key is pressed,
	also remove ProcessArrowKey and put the code inside ProcessKeys.


svn path=/trunk/mcs/; revision=71772
2007-01-27 00:47:42 +00:00
Everaldo Canuto dc0ace1a65 * MenuAPI.cs: Prevent second level and beyond submenus to close
until first level when move out side of popup.
	
2007-01-02  Everaldo Canuto  <[email protected]>


svn path=/trunk/mcs/; revision=70339
2007-01-02 10:52:37 +00:00
Everaldo Canuto 815afff74a * MenuAPI.cs:
- Down submenu positin in three pixels.
	- Closes sub menu when mouse leaves from menu. Fixes #80402.

2007-01-02  Everaldo Canuto  <[email protected]>


svn path=/trunk/mcs/; revision=70337
2007-01-02 08:29:26 +00:00
Everaldo Canuto 17470847b8 Revert MenuAPI wrong commit
svn path=/trunk/mcs/; revision=70315
2007-01-01 10:13:18 +00:00
Everaldo Canuto 6bc5e3bb1f Clean code and fix identation
svn path=/trunk/mcs/; revision=70314
2007-01-01 10:11:57 +00:00
Everaldo Canuto 4752ca4517 2006-12-31 Everaldo Canuto <[email protected]>
* MenuAPI.cs: After click, dont close popup menu when menu is
	ContextMenu. Fixes #80399.


svn path=/trunk/mcs/; revision=70292
2006-12-31 17:49:13 +00:00
Everaldo Canuto 642ddb2bbf 2006-12-29 Everaldo Canuto <[email protected]>
* MenuAPI.cs: Set popup as active when open a ContextMenu. 
	Fixes #80395.


svn path=/trunk/mcs/; revision=70232
2006-12-29 18:44:07 +00:00
Everaldo Canuto 18b30900c9 * MenuAPI.cs: When deselect items deselect also selected subitems.
2006-12-23  Everaldo Canuto  <[email protected]>


svn path=/trunk/mcs/; revision=69989
2006-12-23 09:28:29 +00:00
Everaldo Canuto 2f78d08ee6 2006-12-23 Everaldo Canuto <[email protected]>
* MenuAPI.cs: When hides menu set Wnd to null, it prevents
	FindSubItemByCoord to found itens that is not active, also an
	cheking added to FindSubItemByCoord to search for items only 
	in visible popup windows. Fixes #80274.


svn path=/trunk/mcs/; revision=69988
2006-12-23 09:14:58 +00:00
Everaldo Canuto f5e42ffabc * MenuAPI.cs: Dont trigger select event when closes top menu
item. Fixes #80270.

2006-12-18  Everaldo Canuto  <[email protected]>


svn path=/trunk/mcs/; revision=69697
2006-12-18 23:02:43 +00:00
Everaldo Canuto 865b225d0e 2006-12-18 Everaldo Canuto <[email protected]>
* MenuAPI.cs: When you click on menuitem only trigger onselect
	event for top menu itens. Fixes #80272.
	

svn path=/trunk/mcs/; revision=69692
2006-12-18 22:01:34 +00:00
Everaldo Canuto 8691c24527 2006-12-18 Everaldo Canuto <[email protected]>
* MenuAPI.cs: Fix click when menuitem is not popup,
	this regression was caused by last commit (#80272).


svn path=/trunk/mcs/; revision=69668
2006-12-18 16:29:36 +00:00
Everaldo Canuto d34e158af6 2006-12-17 Everaldo Canuto <[email protected]>
* MenuAPI.cs: When a non-toplevel menuitem is clicked dont
	fire click event or close menu. Fixes #80271.


svn path=/trunk/mcs/; revision=69651
2006-12-18 09:28:57 +00:00
Everaldo Canuto d5a2c758d4 2006-12-13 Everaldo Canuto <[email protected]>
* MenuAPI.cs: Closes menu when right click out side of popup
	it fix problem in ContextMenu and MainMenu. Fixes #80252.


svn path=/trunk/mcs/; revision=69468
2006-12-14 04:06:06 +00:00
Everaldo Canuto 8862903651 2006-12-12 Everaldo Canuto <[email protected]>
* MenuAPI.cs: Set cursor to default in popup menus, a XplatUI.SetCursor 
	was used because we must set cursor without trigger ChangeCursor event
	and without change Cursor control property. Fixes #79963.


svn path=/trunk/mcs/; revision=69433
2006-12-13 00:33:07 +00:00
Rolf Bjarne Kvinge bd74a116ba 2006-12-11 Rolf Bjarne Kvinge <[email protected]>
* MenuAPI.cs: Deselect a menu item after performing
	the click (fixes #80197).


svn path=/trunk/mcs/; revision=69377
2006-12-12 00:39:03 +00:00
Everaldo Canuto 4d3a84ed7e 2006-11-02 Everaldo Canuto <[email protected]>
* MenuAPI.cs:
	- Changes to fix behavior in Menu control, some reported in #80097
	and other detected during behavior refactory like a select event
	problems.
	- Remove unneded "if's" conditions.
	- Created an internal to flag when popup is active in control, we need 
	it because in .NET you can have menu active but without popup active
	when you active menu using popup without visible items.
	- Mimic win32 behavior for Select and Popup events.  
	- Dont open popup menu when you dont have visible subitems.
	- Do nothing when click on disabled menu item.
	- Some small changes to follow the coding style guidelines.
	- Unselect menu only when another control gives focus. Fixes #80097.
	- Remove unused code.
	
	* MenuItem.cs: internal VisibleItems method to check if menu
	theres visible subitems, it will be usefull to fix some 
	behavior in Menu control.
	

svn path=/trunk/mcs/; revision=68933
2006-12-04 09:04:27 +00:00
Everaldo Canuto 36d288d8c4 Fixes behavior when menu is opened by kerboard and later navigate by mouse
svn path=/trunk/mcs/; revision=68321
2006-11-22 06:39:53 +00:00
Jonathan Pobst 040567d6ac 2006-11-15 Jonathan Pobst <[email protected]>
[Fixes 79433]

	* Hwnd.cs: Add a flag to show a window, but not activate it, to 
	keep popup window types from stealing focus from the main form
	on Windows.

	* XPlatUIWin32.cs: Use SW_SHOWNOACTIVATE if above field is true.

	* MenuAPI.cs: Set above flag to true.

svn path=/trunk/mcs/; revision=67949
2006-11-15 20:46:29 +00:00
Everaldo Canuto 33a7522266 Ignore right click for menu actions
svn path=/trunk/mcs/; revision=67510
2006-11-08 11:12:09 +00:00
Everaldo Canuto cc3b35eb22 Deactivate menu on mouse up when menus it is already activated
svn path=/trunk/mcs/; revision=67411
2006-11-06 18:11:52 +00:00
Mike Kestner 756194ffe1 2006-10-31 Mike Kestner <[email protected]>
* MenuAPI.cs : fix keynav when menu is click activated.

svn path=/trunk/mcs/; revision=67182
2006-10-31 18:17:47 +00:00
Andreia Gaita 4ed1eeff54 2006-10-25 Andreia Gaita <[email protected]>
* MenuAPI.cs: prevent ExecFocusedItem from blowing up if there
	is no menu selected. fixes #79739

svn path=/trunk/mcs/; revision=66983
2006-10-25 23:07:25 +00:00
Mike Kestner 12e46d9443 2006-10-25 Mike Kestner <[email protected]>
* MenuAPI.cs : set the ActiveTracker for MainMenu non-popup 
	clicks too.  Fixes #79725.

svn path=/trunk/mcs/; revision=66952
2006-10-25 14:30:14 +00:00
Chris Toshok 67a6e59e32 2006-09-11 Chris Toshok <[email protected]>
* MenuAPI.cs: rework OnMouseUp a bit so that releasing the mouse
	button on various spots (including outside the menu) works closer
	to MS, and doesn't crash.  Fixes #79343.


svn path=/trunk/mcs/; revision=65255
2006-09-11 20:06:57 +00:00
Jackson Harper c299ab2f5d * MenuAPI.cs: Deslect popup context menu items before closing
* the
        window, so that you don't see the previously selected item
        selected when you reopen the menu.


svn path=/trunk/mcs/; revision=65113
2006-09-08 15:29:18 +00:00
Chris Toshok 8dbaa09aca * MenuAPI.cs: move the PerformClick call to OnMouseUp. Fixes bug
79244.

2006-09-07  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=65084
2006-09-08 01:54:07 +00:00
Chris Toshok cc91707964 2006-08-10 Chris Toshok <[email protected]>
* Menu.cs, MainMenu.cs, MenuAPI.cs: get rid of most of the
	flickering by setting a clip rectangle on the Graphics when we
	need to redraw just a particular menuitem.  Also, rename "OnClick"
	to "OnMouseDown" to reflect what it actually is.
	
	* Form.cs: track the OnMouseDown change.


svn path=/trunk/mcs/; revision=63623
2006-08-10 20:18:24 +00:00
Mike Kestner 507c26ed27 2006-06-29 Mike Kestner <[email protected]>
* MenuAPI.cs: handle arrow keys in keynav state. Go active on down
	arrow in keynav state.  Fixes #78682.

svn path=/trunk/mcs/; revision=62142
2006-06-29 15:26:17 +00:00
Peter Dennis Bartok 6c69350032 2006-05-26 Peter Dennis Bartok <[email protected]>
* MenuAPI.cs (ProcessMenuKey): We can legally get msg types other
	  than WM_SYSKEY, don't throw if get something unexpected (#78507)


svn path=/trunk/mcs/; revision=61179
2006-05-26 21:31:50 +00:00
Atsushi Eno ca17b9df08 2006-05-23 Atsushi Enomoto <[email protected]>
* MenuAPI.cs : don't handle OnClick event when it was not the left
	  button. Fixed bug #78487.


svn path=/trunk/mcs/; revision=61007
2006-05-23 16:51:23 +00:00
Mike Kestner e0a3088816 2006-05-23 Mike Kestner <[email protected]>
* MenuAPI.cs: fix placement of submenus for multi-row menu bars, and
	prefer submenus to the top menu for item lookup, to avoid popping down
	top-row items.

svn path=/trunk/mcs/; revision=61000
2006-05-23 15:17:25 +00:00
Peter Dennis Bartok 2a06a1f205 2006-04-28 Peter Dennis Bartok <[email protected]>
* Application.cs: Updated to new StartLoop/GetMessage API
	* RichTextBox.cs: Provide some output on RTF parsing errors
	* XplatUI.cs, XplatUIDriver.cs, XplatUIOSX.cs, XplatUIWin32.cs: Added
	  new queue_id argument to GetMessage and PeekMessage to allow faster
	  handling of per-thread queues in drivers.
	* Hwnd.cs: Added Queue tracking and property
	* MenuAPI.cs: Updated to new StartLoop/GetMessage API
	* XEventQueue.cs: Added thread trackingA
	* PropertyGridView.cs: Updated to new StartLoop/GetMessage API
	* XplatUIX11.cs:
	  - Implemented new per-thread queue
	  - GetMessage: Fixed return/break behaviour on several cases. We were
	    returning stale messages in some cases, instead of just processing
	    the next message


svn path=/trunk/mcs/; revision=60063
2006-04-28 22:18:21 +00:00
Mike Kestner 8d51f085ae 2006-04-13 Mike Kestner <[email protected]>
* MenuAPI.cs: null guarding for the disbled click check fixes crash
	reported by Alex.

svn path=/trunk/mcs/; revision=59462
2006-04-13 16:55:18 +00:00
Mike Kestner 7e0d2fa737 2006-04-12 Mike Kestner <[email protected]>
* MenuAPI.cs: ignore clicks on disabled menu items. Thanks to Alex for
	reporting.

svn path=/trunk/mcs/; revision=59430
2006-04-12 23:16:47 +00:00
Jackson Harper d2ce310b30 * Control.cs: Enable OnPaintInternal so we can use it for drawing
all of our controls instead of Paint +=.
        * ListBox.cs:
        * ListView.cs:
        * MenuAPI.cs:
        * MessageBox.cs:
        * NotifyIcon.cs:
        * ProgressBar.cs:
        * ScrollBar.cs:
        * Splitter.cs:
        * StatusBar.cs:
        * TabControl.cs:
        * TextBoxBase.cs:
        * ToolBar.cs:
        * TrackBar.cs:
        * UpDownBase.cs:
        * ComboBox.cs: Remove handling of WM_PAINT and WM_ERASEBKGND and
        use OnPaintInternal. Remove Width/Height and Visible checks in
        paint handler, this is done at a higher level now.
        * GroupBox.cs: Don't need to handle WM_ERASEBKGND anymore.
        * PaintEventArgs.cs: Add a handled flag so controls that don't
        want anymore painting after OnPaintInternal can make sure
OnPaint
        isn't called.


svn path=/trunk/mcs/; revision=59104
2006-04-05 18:42:26 +00:00
Mike Kestner 3110d91764 2006-03-31 Mike Kestner <[email protected]>
* MenuAPI.cs: setup menu.tracker for popup/context menus.
	* ToolTip.cs: guard against timer expirations with no active control.
	Not sure why it happened.

svn path=/trunk/mcs/; revision=58856
2006-03-31 19:15:45 +00:00
Mike Kestner 339d5c0f32 2006-03-30 Mike Kestner <[email protected]>
* Menu.cs (SelectedItem): use new MenuItem.Selected prop.
	* MenuAPI.cs: use new MenuItem.Selected prop. redraw MainMenu when we
	go active to account for HotLight to Selected transition.
	* MenuItem.cs: add internal Selected prop. Fill out the Status
	property by calculating it from item info. Add HotLight,
	NoAccelerator, Checked, Grayed, and Disabled flags where appropriate.

svn path=/trunk/mcs/; revision=58790
2006-03-30 15:25:11 +00:00
Mike Kestner 77e45b94f0 2006-03-28 Mike Kestner <[email protected]>
* MenuAPI.cs: Deactivate on MainMenu item click. Fixes #77917.

svn path=/trunk/mcs/; revision=58657
2006-03-28 16:02:44 +00:00