Commit Graph
59 Commits
Author SHA1 Message Date
Jonathan Pobst 4dedcb1107 2007-03-30 Jonathan Pobst <[email protected]>
* ScollableControl.cs: Add HorizontalScroll and VerticalScroll properties.
	* ScrollProperties.cs, HScrollProperties.cs, VScrollProperties.cs: Added.
	[Based on submitted patch from Olivier Duff.]

2007-03-30  Jonathan Pobst  <[email protected]>

	* System.Windows.Forms.dll.sources: Add ScrollProperties, 
	HScrollProperties, and VScrollProperties.
	* System.Windows.Forms_test.dll.sources: Add HScrollPropertiesTest and
	VScrollPropertiesTest.

2007-03-30  Jonathan Pobst  <[email protected]>

	* HScrollPropertiesTest.cs, VScrollPropertiesTest.cs: Added.

svn path=/trunk/mcs/; revision=75208
2007-03-30 15:37:18 +00:00
Rolf Bjarne Kvinge 82202c92a7 * Control.cs: ChangeParent: Call Form's ChangingParent even if the
handle is not created yet.
* Form.cs: Select: Don't call CreateHandle if the handle is already
  created, avoids a stack overflow on Windows when we are recreating
  controls.
* ScrollableControl.cs: Set the correct z-order for the scrollbars when
  they are made visible, and override AfterTopMostControl to keep
  them on top when other controls are brought to front.
  CalculateCanvas: Scrollbars are only visible if auto_scroll is true
  or force_*scroll_visible is true (old implementation always shows
  scrollbars when needed, no matter what auto_scroll was set to).
* InternalWindowManager.cs: UpdateWindowDecorations: Add a
  IsHandleCreated check.

svn path=/trunk/mcs/; revision=74798
2007-03-22 11:57:42 +00:00
Jonathan Pobst 7263924e12 2007-03-21 Jonathan Pobst <[email protected]>
* ScrollableControl.cs: Add implicit controls with AddRangeImplicit
	to save some re-layouts.

svn path=/trunk/mcs/; revision=74754
2007-03-21 17:49:30 +00:00
Chris Toshok 1bf0484315 2007-03-19 Chris Toshok <[email protected]>
* ScrollableControl.cs: create the controls from within the ctor,
	but don't actually add them until our handle is created.  this
	fixes a NRE possibility jpobst found (if you override OnLayout in
	a subclass, it's called before your ctor).  Also, add a
	IsHandleCreated guard to UpdateSizeGripVisibility as well.


svn path=/trunk/mcs/; revision=74638
2007-03-19 21:17:23 +00:00
Chris Toshok 26413b615c * ScrollableControl.cs: the scroll position should not effect the
canvas size.  commit patch from [email protected], which
	fixes some really bizarre behavior on resizing.  Fixes bug #80778.
	
2007-03-19  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=74626
2007-03-19 19:41:14 +00:00
Chris Toshok 7a2255fdc5 2007-03-19 Chris Toshok <[email protected]>
* ScrollableControl.cs: clean this up a bit.  create the
	scrollbars in the ctor and just show/hide them as needed.  Also,
	make hscroll_visible/vscroll_visible internal to Recalculate, and
	just use hscrollbar.VisibleInternal/vscrollbar.VisibleInternal
	everywhere else.  This seems to fix the scrollbars appearing
	beneath the content for me (i have *no* idea why that is,
	however.)


svn path=/trunk/mcs/; revision=74625
2007-03-19 19:30:55 +00:00
Rolf Bjarne Kvinge a0e0099310 * Control.cs: ControlCollection.Add: Remove a couple of duplicated
casts and throw if setting the parent of an mdichild that already
  has an mdiparent. Update signature for 2.0 profile. ProductName: If
  there's no AssemblyProductAttribute in the assembly, use the type's
  namespace (as MS seems to do). CreateControl: don't create the
  handle if the control is not visible (according to MS behaviour and
  spec).  SetTopLevel: Only create handle if the control is not a
  form. Change FocusInternal to virtual so that it can be overriden
  by Form.

* TextBox.cs: Update call to FocusInternal.
* Form.cs: Always create the handle when calling Focus on a MdiChild.
  The form is not a toplevel form when it's a mdi child, so update
  is_toplevel accordingly. ShowIcon/TransparencyKey: avoid creating
  the handle if it hasn't been created. Show (IWin32Window): Don't
  allow this overload for toplevel windows.
  CenterToParent/CenterToScreen/Select: create the handle as MS does.
  SetVisibleCore: if called on a MdiChild and the parent isn't
  visible yet, save the visibility and restore it when the parent is
  made visible.
* ScrollableControl.cs: Refactor out scrollbar visibility code to
  separate methods, since the visibility of the scrollbars can be
  changed from several places, not only from AutoScroll.

svn path=/trunk/mcs/; revision=74609
2007-03-19 15:15:06 +00:00
George Giolfan 20b2d5c420 2007-03-09 George Giolfan <[email protected]>
* ScrollableControl.cs: Fix mouse wheel scrolling.

svn path=/trunk/mcs/; revision=74028
2007-03-09 20:39:27 +00:00
Chris Toshok 0d5bce9d20 In Test/System.Windows.Forms:
2007-03-05  Chris Toshok  <[email protected]>

	[merge -r72718:73765 from mwf-handle-branch]

	2007-03-05  Chris Toshok  <[email protected]>

		* ControlHandleTest.cs: make this build on both 1.1 and 2.0
		profiles.

	2007-02-28  Chris Toshok  <[email protected]>

		* ControlTest.cs: Flesh out ControlInvokeTest to make sure that
		the Control thread dies (that Application.Run returns, basically).
		This works in isolation, but for some reason it isn't exiting when
		run in concert with other tests (this test is the cause of the
		hangs running the unit tests.)  Marking NotWorking for the time
		being.  This needs to be fixed before merging back to the
		mainline, imo.

In System.Windows.Forms:
2007-03-07  Chris Toshok  <[email protected]>

	[merge -r72718:73765 from mwf-handle-branch, and include 2 changes
	to make the rest of the world happy]

	* Control.cs (CreateHandle): there's no need to call
	XplatUI.SetVisible here, it's effectively done by
	XplatUI.CreateWindow on X now, and always was on windows.

	* XplatUIX11.cs (WaitForHwndMessage): only use the PostQuitState
	shortcircuit out of the loop if we have a message loop running on
	this thread.

	[Changelog from merge]

	2007-03-05  Chris Toshok  <[email protected]>

		* Control.cs (AccessibilityNotifyClients): turns out in 1.1 this
		causes handle creation.

	2007-02-28  Chris Toshok  <[email protected]>

		* ApplicationContext.cs: Add a flag to make sure we only raise the
		ThreadExit event once (ExitThreadCore can be indirectly called
		from a few places.)  I don't like the additional flag, but it
		makes the event ordering/count correct.

		* Application.cs (MWFThread.LoopCount): don't use an enumerator
		without locking the collection.  An enumerator doesn't give us any
		protection from modification anyway.  Lock the thread hash and
		replace the complicated enumerator loop with a foreach.
		(Application.CloseForms): make internal so it can be called from
		ApplicationContext.  This should probably be moved to MWFThread.
		(Application.ExitThread): don't call MWFThread.Current.Exit()
		here.  just call XplatUI.PostQuitMessage.  We'll exit the thread
		when the runloop exits (in response to WM_QUIT.)
		(Application.RunLoop): add a comment (and check) for
		context.MainForm being null after setting context.MainForm.Visible
		= true.  This is because you're perfectly free to dispose of a
		form in VisibilityChanged.  Chalk this up to another case where we
		need to synchronously generate WM_ACTIVATE from Control.Show.
		Also, add handling for WM_QUIT here so we'll exit the loop.
		
		* XplatUIX11.cs: clean up MapWindow and UnmapWindow a bit.  The
		fact that we don't wait if we're only unmapping the whole_window
		makes me a bit nervous, but it doesn't seem to cause any problems
		yet.

		also, add a comment about the stupid, broken and wrong resetting
		of PostQuitState to false in GetMessage().

		In PostQuitMessage, we need to add a WM_QUIT message to the
		thread's queue.  We use the FosterParent to get the right
		handle/hwnd/queue.

		Lastly, in SetVisible, we need to unmap both windows, since the
		waiting only happens when we're unmapping the client window.  So
		now, the *only* time we unmap just the whole_window is in the hack
		for resizing a control to 0,0.
		
	2007-02-21  Chris Toshok  <[email protected]>

		* Application.cs (CloseForms): rewrite this so that we don't
		modify the list while we're traversing it.

	2007-02-20  Chris Toshok  <[email protected]>

		* ListBox.cs (.ctor): move the Control.AddImplicits here instead
		of OnHandleCreated.
		(HorizontalScrollEvent): only call XplatUI.ScrollWindow if the
		handle is created.  otherwise we'll create it here.
		(VerticalScrollEvent): same here.

		* Application.cs (CloseForms): call Form.Dispose, don't post
		WM_CLOSE_INTERNAL.

		* Form.cs (WndProc): we don't need to use CLOSE_INTERNAL
		here. Application should Dispose() of the Form's.

		* XplatUIX11.cs (WaitForHwndMessage): break out of the loop on
		WM_DESTROY as well.
		(MapWindow,UnmapWindow): only actually do the waiting for
		SHOWWINDOW if the control we're dealing with is a Form.
		(CreateWindow): if the control isn't a form, SendMessage
		WM_SHOWWINDOW here (if the WS_VISIBLE style is set).

		* Control.cs (SetVisibleCore): always use is_visible here, not
		value.  If we use value, we can end up re-setting something
		visible if, for instance, you do Control.Hide() in a delegate
		attached to VisibleChanged as we do in FormTest.ShowDialogTest.

	2007-02-20  Chris Toshok  <[email protected]>

		* XplatUIX11.cs (WaitForHwndMessage): we need to loop until we get
		the message we need.  PeekMessage returning false should not be a
		condition under which we exit the loop.

	2007-02-15  Chris Toshok  <[email protected]>

		* Control.cs (Refresh): only refresh if we've got a handle and are
		visible.
		(CreateAccessibilityInstance): CreateControl() here.
		(UpdateChildrenZOrder): complicate the code loop even more by
		taking into account controls that haven't had their handle
		created, and those that aren't visible.  But on the flip side,
		simplify the code by splitting it into two loops.  one which
		builds up the list of child controls we're interested in, and the
		other that sets the z order of those children.

	2007-02-14  Chris Toshok  <[email protected]>

		* Control.cs: Control.AccessibilityObject causes the control to be
		created, not just the handle.

	2007-02-14  Chris Toshok  <[email protected]>

		* Control.cs: rework UpdateChildrenZOrder to correctly handle the
		problem on X where a window might have its handle created (and be
		visible) while the window is unmapped.  calling XConfigureWindow
		on an unmapped window is bad, and generates X errors.

	2007-02-13  Chris Toshok  <[email protected]>

		* Control.cs (CreateHandle): don't loop over our children setting
		their parent here.  do it when in WndProc when we're shown.
		(UpdateChildrenZOrder): make this internal so we can call it from
		ScrollableControl.
		(WndProc): for WM_SHOWWINDOW, reparent the child control after
		creating its handle.  Also, remove the calls to PerformLayout from
		here.  they're done in ScrollableControl.OnVisibleChanged.  Also,
		OnVisibleChanged only seems to be called directly here for the
		toplevel control.  It's propagated down the window hierarchy by
		calls to child.OnParentVisibleChanged.
		(OnVisibleChanged): don't do layout here - it's done (oddly
		enough, according to a glance at stack traces on ms.net..) in
		ScrollableControl.
		
		* ScrollableControl.cs (OnVisibleChanged): make sure we update the
		z order of our children before calling PerformLayout.

	2007-02-12  Chris Toshok  <[email protected]>

		[big change, fixes #80020]
		
		* AccessibleObject.cs: we need to make owner internal again to fix
		some of ControlAccessibleObject.

		* Control.cs: lots of changes here.  add support for WM_CREATE,
		for which we generate OnHandleCreated.  Remove the OnHandleCreated
		call from CreateHandle.  Also add support for WM_SHOWWINDOW where
		we create child controls.  leave the MonoTODO's for the
		accessibility calls, but fix the exceptions so the tests pass.

		Add the InvalidOperationExceptions to Invoke methods, and remove a
		couple of InvokeInternal methods we aren't using.
		
		Also, add a couple of CreateHandle calls in places where we know
		the handles are being created but our code doesn't reference
		.Handle.

		Make SetVisibleCore call OnVisibleChange if the handle isn't
		created.  If the handle is created, we rely on XplatUI.SetVisible
		generating the event synchronously.
		
		Lastly, make sure we don't use this.Handle inside CreateHandle,
		because we can call back into client (and that code can dispose of
		the control).

		* XplatUIStructs.cs: misc/cleanup.

		* XplatUIX11.cs: Map/Unmap X events correspond to WM_SHOWWINDOW,
		although we don't populate the wParam properly.
		(CreateWindow): generate WM_CREATE.
		(MapWindow,UnmapWindow): make these calls synchronous, at great
		performance expense (particularly in the unmap case), to match
		win32 behavior.

		* Form.cs (.ctor): remove the call to UpdateBounds. we don't need
		to call it.
		(set_MdiParent): don't recreate the handle unless it's been
		created already.
		
		* MdiClient.cs (OnResize): don't InvalidateNC Parent.Handle unless
		it's created.

		* NativeWindow.cs: this is probably the weirdest part of the
		patch.  We need a way to link up the window being created to the
		WM_CREATE message.  Since we can only be creating one window at a
		time on a given thread, we keep track of a per-thread reference so
		we can dispatch it properly.  We also need to keep track of the
		Hwnd currently being created so that the win32 backend doesn't
		have problems.
		
		* XplatUIWin32.cs: a similar change to the one we made in
		NativeWindow.cs.


svn path=/trunk/mcs/; revision=73907
2007-03-07 20:22:27 +00:00
Rolf Bjarne Kvinge 190f424de9 * ComboBox.cs: Remove warning (unused code).
* ScrollableControl.cs: Remove warning for 1.1 profile.

svn path=/trunk/mcs/; revision=72488
2007-02-08 16:43:55 +00:00
Rolf Bjarne Kvinge bb630051ca * Control.cs: Handle WM_CAPTURECHANGED in 1.1 code as well, and change
corresponding events and methods to be internal for 1.1 profile and
  public for 2.0 profile (required by SizeGrip).
* Form.cs: Use SizeGrip as a virtual SizeGrip (and don't add it to the
  implicit control list). Don't set the size nor the location of the
  SizeGrip anymore as it's not needed.
* SizeGrip.cs: Rewrote large parts, it now supports a virtual mode to
  draw directly on the captured control (fixes #80656). Removed
  ShowGrip (it wasn't used anywhere), redraw (always true), added
  GetDefaultSize and GetDefaultRectangle to calculate defaults.
* ScrollableControl.cs: Make UpdateSIzeGripVisible internal so it can
  be called from SizeGrip.

svn path=/trunk/mcs/; revision=72375
2007-02-06 19:38:51 +00:00
Rolf Bjarne Kvinge 3dd529762a Removed a cwl.
svn path=/trunk/mcs/; revision=72156
2007-02-02 11:52:33 +00:00
Rolf Bjarne Kvinge bf5573e63d * SizeGrip.cs: Only draw sizegrip if enabled (but always draw
background) and only allow dragging if enabled. This way the
  sizegrip can be used to fill the open square that otherwise would
  have been shown in the bottom right corner of ScrollableControl
  when ScrollableControl is not suppose to support sizing.
* ScrollableControl.cs: Create UpdateSizeGripVisible to decide when the
  sizegrip is shown and enabled, and hook up with necessary events.

svn path=/trunk/mcs/; revision=72155
2007-02-02 11:43:27 +00:00
Chris Toshok ea590d9ad7 In System.Windows.Forms.VisualStyles:
2007-01-19  Chris Toshok  <[email protected]>

	* VisualStyleElement.cs: rename TaskBar to Taskbar, and
	TaskBarClock to TaskbarClock to make corcompare happy.

2006-08-05  Jonathan Pobst <[email protected]>
	* TextMetrics.cs: Change variables to properties.
	* VisualStyleRenderer.cs, EdgeEffects.cs, Edges.cs,
	  HitTestOptions.cs, TextMetricsPitchAndFamilyValues.cs:
	    Add various attributes.
	* TabItemState.cs, TextBoxState.cs, TrackBarThumbState.cs:
	    Fix typos.

2006-08-04  Jonathan Pobst <[email protected]>
	* VisualStyleRenderer.cs: Fixed null compare that broke the build.

2006-08-04  Jonathan Pobst <[email protected]>
In System.Windows.Forms.Design:
2007-01-20  Chris Toshok  <[email protected]>

	* ComponentEditorPage.cs: class status fixes.

	* ComponentEditorForm.cs: same.

2006-11-08  Jonathan Pobst  <[email protected]>

	* ToolStripItemDesignerAvailability.cs: Added.
	* ToolStripItemDesignerAvailabilityAttribute.cs: Added.

2005-12-01  Peter Dennis Bartok  <[email protected]>

	* ComponentEditorForm.cs: Added missing attribute

2005-10-13  Peter Dennis Bartok  <[email protected]>

	* EventsTab.cs: Made .ctor() private to fix signature

2005-05-14  Rafael Teixeira <[email protected]>
	* EventsTab.cs: Implementation start with many gaping holes

2005-05-09  Marek Safar  <[email protected]>

	* PropertyTab.cs: Implemented.

2005-02-14  Peter Bartok  <[email protected]>

	* PropertyTab.cs: Made class abstract

2004-04-14  Andreas Nahr <[email protected]>

	* AssemblyInfo.cs: Removed
	* TODOAttribute.cs: Removed (duplicate)

	* System.Windows.Forms.Design.csproj.user
	* System.Windows.Forms.Design.csproj: Removed (outdated)

	* WindowsFormsComponentEditor.cs
	* ComponentEditorPage.cs: Added, mostly implemented

	* ComponentEditor.cs: Removed (does not belong here)

2004-02-24  Andreas Nahr <[email protected]>

	* IWindowsFormsEditorService.cs: Corrected casing,
	  it is not yet corrected in the filename, implemented

2003-08-30  Alexandre Pigolkine <[email protected]>

	* ComponentEditor.cs
	* IUIService.cs: stubs added 

2003-03-31  Alan Tam <[email protected]>

	* UITypeEditor.cs: Removed because it shan't be here

2002-08-04  DennisHayes <[email protected]>

	* Started cheanglog

2002-08-04  DennisHayes <[email protected]>

	* AnchorEditor.cs
	* AxImporter.cs
	* ComponentDocumentDesigner.cs
	* ComponentEditorForm.cs: Stubbed out
	
	* ComponentTray.cs
	* ControlDesigner.cs
	* ComponentEditor.cs
	* DocumentDesigner.cs
	* EventsTab.cs
	* FileNameEditor.cs
	* IMenuEditorService.cs
	* IUIService.cs
	* IWindowsformsEditorService.cs
	* MenusCommands.cs
	* ParentControlDesigner.cs
	* PropertyTab.cs
	* ScrollableControlDesigner.cs
	* SelectionRules.cs
	* UITypeEditor.cs: Class body defined only. No stubbs done.
	
	* TODOAttribute.cs:
	  Used to mark unimplemented functions.
	
	* System.Windows.Forms.Design.csproj
	* System.Windows.Forms.Design.csproj.user
	* AssemblyInfo.cs:
	  Needed for Visual Studio compile.

In System.Windows.Forms:
2007-01-20  Chris Toshok  <[email protected]>

	* CheckedListBox.cs: class status changes.

	* ScrollableControl.cs: same.

	* RichTextBox.cs: same.

	* ContainerControl.cs: same.

	* ListView.cs: same.

	* NotifyIcon.cs: same.

	* MenuStrip.cs: same.

	* RadioButton.cs: same.

	* CheckBox.cs: same.

	* PrintPreviewDialog.cs: same.

	* Form.cs: same.


svn path=/trunk/mcs/; revision=71385
2007-01-20 09:28:34 +00:00
Miguel de Icaza eb5b2ecefe 2007-01-02 Miguel de Icaza <[email protected]>
* ContainerControl.cs: Add AutoValidateChanged event (for PDN
	2.72). 

	* ScrollableControl.cs: Add Scroll event.


svn path=/trunk/mcs/; revision=70393
2007-01-03 01:05:30 +00:00
Gert Driesen 9527a76936 * System.Windows.Forms_test.dll.sources: Add ScrollableControlTest.cs.
* ScrollableControlTest.cs: Added tests for AutoScroll and
AutoScrollMinSize.
* ScrollableControl.cs: In AutoScrollMinSize, only set AutoScroll to
true if new value differs from current value.

svn path=/trunk/mcs/; revision=70125
2006-12-27 14:21:53 +00:00
Miguel de Icaza e25c6b7383 2006-12-15 Miguel de Icaza <[email protected]>
* Button.cs, ComboBox.cs, ScrollBar.cs, UserControl.cs,
	TextBoxBase.cs, ListView.cs, ContainerControl.cs,
	ScrollableControl.cs: Add a handful of methods that are
	overwritten in 2.0 


svn path=/trunk/mcs/; revision=69566
2006-12-16 04:28:02 +00:00
Chris Toshok 540c81e9c5 * AccessibleObject.cs, Control.cs, XplatUIX11GTK.cs,
XplatUIX11.cs, Form.cs, RadioButton.cs, ScrollableControl.cs: make
	Control.child_controls private.  switch all uses over to
	Control.Controls.

2006-12-06  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=69109
2006-12-06 15:58:04 +00:00
Chris Toshok 8fe4f9c691 * System.Windows.Forms/GroupBox.cs,
System.Windows.Forms/AccessibleObject.cs,
	System.Windows.Forms/ErrorProvider.cs,
	System.Windows.Forms/Control.cs,
	System.Windows.Forms/UpDownBase.cs,
	System.Windows.Forms/ScrollBar.cs,
	System.Windows.Forms/DateTimePicker.cs,
	System.Windows.Forms/Form.cs, System.Windows.Forms/Label.cs,
	System.Windows.Forms/ToolTip.cs,
	System.Windows.Forms/RadioButton.cs,
	System.Windows.Forms/LinkLabel.cs,
	System.Windows.Forms/Splitter.cs,
	System.Windows.Forms/TextBoxBase.cs,
	System.Windows.Forms/ToolStripTextBox.cs,
	System.Windows.Forms/ContainerControl.cs,
	System.Windows.Forms/ThemeWin32Classic.cs,
	System.Windows.Forms/SizeGrip.cs,
	System.Windows.Forms/ToolStripDropDown.cs,
	System.Windows.Forms/ScrollableControl.cs: Make Control.parent
	private.  switch all uses over to Control.Parent.

2006-12-06  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=69102
2006-12-06 15:43:50 +00:00
Chris Toshok a8ad8e66a0 2006-12-06 Chris Toshok <[email protected]>
* RichTextBox.cs: don't assign to has_focus in GotFocus/LostFocus.
	Control does this before calling emitting these events.

	* TabControl.cs: same.

	* ThemeWin32Classic.cs: use Control.ClientRectangle instead of
	Control.client_rect.

	* ButtonBase.cs: use the ClientSize property instead of the
	client_size field.

	* ScrollableControl.cs: same.

	* Control.cs: another pass at making properties private.  also,
	move the initialization of tab_stop to the ctor.


svn path=/trunk/mcs/; revision=69101
2006-12-06 15:26:01 +00:00
Chris Toshok 9279f78f95 [ after removing all warning suppressions, this cleans up over 100 warnings. ]
* Win32DnD.cs: comment out some unused fields.

	* XplatUIWin32.cs: comment out some unused pinvokes, and remove
	some unused properties/methods.

	* XplatUIX11.cs: fix MousePosition so we override the base class's
	property instead of conflicting with it.

	* PictureBox.cs: comment out some unused fields

	* OSXStructs.cs: make some struct fields public.

	* XplatUIOSX.cs: comment out some unused pinvokes, and fix
	MousePosition so we override the base class's property instead of
	conflicting with it.

	* X11Dnd.cs: comment out some unused fields

	* X11DesktopColors.cs: fix some struct field visibility to quiet
	the compiler.

	* X11Dnd.cs: remove some debug code.

	* ThemeClearlooks.cs: comment out unused field.

	* ThemeNice.cs: mark some methods as overriding ThemeWin32Classic as needed.

	* ThemeGtk.cs: comment out some unused pinvokes.

	* Timer.cs: remove some unused fields.

	* ThemeClearlooks.cs: comment out unused field.

	* UpDownBase.cs: comment out unused field.

	* DataObject.cs: comment out unused field.

	* DataGridBoolColumn.cs: reomve unused field.

	* DataGrid.cs: remove unused field.

	* Cursor.cs: remove old ToBitmap code.

	* ControlPaint.cs: remove unused method.

	* ScrollBar.cs: remove unused fields.

	* ComboBox.cs: remove unused field, and chain up to
	AccessibleObject ctor.

	* ListBox.cs: remove unused field.

	* ButtonBase.cs: wrap a couple fields in NET_2_0.

	* GridEntry.cs: remove unused fields.

	* Binding.cs: remove unused fields.

	* AxHost.cs: remove unused method.

	* ContainerControl.cs: remove unused field.

	* ScrollableControl.cs: remove unused fields.

2006-12-01  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=68867
2006-12-01 22:50:43 +00:00
Chris Toshok b111511a5d 2006-10-06 Chris Toshok <[email protected]>
* ScrollableControl.cs (DisplayRectangle): we need to take into
	account the DockPadding regardless of whether or not auto_scroll
	== true.  rework this slightly to this effect, and fix bug #79606,
	and part of #72499 (you can now see the drag handles and drag
	toolbars around).


svn path=/trunk/mcs/; revision=66376
2006-10-06 20:42:31 +00:00
Chris Toshok 301dac7859 * ScrollableControl.cs: make sure neither right_edge or
bottom_edge are < 0, since they're used as LargeChange for the
	horiz/vert scrollbars respectively.  Fixes #79539.

2006-10-01  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=66144
2006-10-01 22:14:44 +00:00
Peter Dennis Bartok 44222ac14b 2006-08-30 Peter Dennis Bartok <[email protected]>
* Control.cs:
	  - PerformLayout(): It would seem MS performs the fill even if the 
	    control is not visible (part of #79218 fix)
	  - ResetBackColor(): Use the setter to reset the color, to allow
	    overriders to catch the change.
	* Form.cs:
	  - .ctor: Call UpdateBounds to adjust client rectangle (part of #79218 fix)
	  - CreateHandle(): dito (part of $79218 fix)
	  - Don't set an icon if we have a dialog
	* ScrollableControl.cs:
	  - set_AutoScrollMinSize: Setting the property enables AutoScroll (#79218)
	  - ScrollIntoView(): No need to scroll if control is already visible
	    (resolves fixme and fixes #79218)


svn path=/trunk/mcs/; revision=64577
2006-08-30 22:48:54 +00:00
Peter Dennis Bartok a7d6bb7640 2006-08-23 Peter Dennis Bartok <[email protected]>
* ScrollableWindow.cs (ScrollWindow): Don't actually perform layouting
	  when allowing layout again. Otherwise we re-generate the anchoring 
	  distance to the border again and actually alter what the user wanted
	  This is ugly, it'd be better if we used DisplayRectangle instead of
	  ClientRectangle for Control.UpdateDistances, but that causes us to
	  have other problems (initial anchoring positons would be wrong)
	  (Fixes #78835)


svn path=/trunk/mcs/; revision=64421
2006-08-26 23:51:35 +00:00
Peter Dennis Bartok dbe154d035 2006-08-23 Peter Dennis Bartok <[email protected]>
* Control.cs:
	  - The size and location setters shouldn't go directly to 
	    SetBoundsCore, but to SetBounds, which triggers layout on the
	    parent, then calls SetBoundsCore. (Related to fix for #78835)
	  - SetBounds: Moved actual location update code into this function
	    from SetBoundsCore, to match MS. Added call to PerformLayout if
	    we have a parent (to trigger resizing of anchored parents if the 
	    child size has changed (see testcase for #78835) 
	* ListBox.cs, Form.cs: Call SetBounds instead of SetBoundsCore to match 
	  new control code
	* ScrollableControl.cs (CalculateCanvasSize): Use shortcut variable


svn path=/trunk/mcs/; revision=64418
2006-08-26 22:42:37 +00:00
Chris Toshok b6478106ed 2006-08-24 Chris Toshok <[email protected]>
* ScrollableControl.cs: fix #78271.  There's a lot of misc stuff
	in this patch (aggregating setting Left/Top/Width/Height to
	setting Bounds on the scrollbars), but the crux of the fix is in
	Recalculate, where we scroll by the remaining scroll_position if
	we're hiding a scrollbar.  The 2*$5 reward in the comment is
	serious.


svn path=/trunk/mcs/; revision=64322
2006-08-24 20:34:04 +00:00
Peter Dennis Bartok 3471ad58e4 2006-07-20 Peter Dennis Bartok <[email protected]>
* ScrollableControl.cs: Consider AutoScrollMinSize when calculating
	  the canvas size. Fixes #78868


svn path=/trunk/mcs/; revision=62835
2006-07-20 18:31:34 +00:00
Jonathan Chambers 3bf9fbf07e 2006-05-03 Jonathan Chambers <[email protected]>
* Control.cs: Add MWFCategoryAttributes
	* ScrollableControl.cs: Add MWFCategoryAttributes

svn path=/trunk/mcs/; revision=60203
2006-05-03 03:34:38 +00:00
Peter Dennis Bartok a0a75aaeb6 - oops
svn path=/trunk/mcs/; revision=59387
2006-04-11 23:49:36 +00:00
Peter Dennis Bartok 7af7728900 2006-04-11 Peter Dennis Bartok <[email protected]>
* ScrollableControl.cs: Calculate DisplayRect dynamically, so that
	  layout changes do to app-triggered resizes will have the proper
	  display rectangle for layout


svn path=/trunk/mcs/; revision=59386
2006-04-11 23:47:50 +00:00
Peter Dennis Bartok 276f286069 2006-04-11 Peter Dennis Bartok <[email protected]>
* ScrollabeControl.cs: We need to consider whether or not a scrollbar
	  is displayed when calculating the display rectangle. Thanks to Mike
	  for teaching me the err of my ways.


svn path=/trunk/mcs/; revision=59373
2006-04-11 20:50:14 +00:00
Peter Dennis Bartok 1e3c42c9ef 2006-04-10 Peter Dennis Bartok <[email protected]>
* ScrollableControl.cs:
	  - Rewrote DisplayRectangle code, now returning the proper x/y coords 
	    (instead of 0,0) and we now return the real width/height instead of
	    just the clientrectangle, adjusted for padding. The rectangle is
	    now cached and created by the new CalculateDisplayRectangle method.
	  - Created new CalculateDisplayRectange method, which basically does
	    what get_DisplayRectangle() did originally, but now using the 
	    right edge instead of DisplayRectangle to determine the size of
	    our scrollbars
	  - get_Canvas(): Fixed it to properly calculate canvas for 
	    right/bottom controls which seem to be placed to the right/bottom
	    of any controls that have a fixed location
	  - Removed TODO that's taken care of
	  - Removed NotImplementeds and attempted to implement AdjustFormScrollBars
	    and SetDisplayRectLocation according to new MSDN2 docs
	  - Added call to PerformLayout in OnVisibleChanged, MS causes a layout
	    event when that is called, this is added for compatibility
	  - ScrollControlIntoView(): Implemented.
	  - Switched scrollbars to be implicit, they shouldn't be selectable
	* ContainerControl: Now that ScrollControlIntoView is implemented, we 
	  call it when the active control is set/changed
	* ScrollBar.cs: Added support for generating Win32 scrollbar messages
	* ImplicitHScrollBar.cs, ImplicitVScrollBar.cs: Now setting new base
	  implicit_control variable (used for native Win32 message generation)
	* XplatUI.cs, XplatUIDriver.cs, XplatUIWin32.cs: Added new 
	  HorizontalScrollBarHeight and VerticalScrollBarWidth properties
	* ThemeWin32Classic.cs: Now calling the driver for the scrollbar sizes
	* XplatUIStructs.cs: Added ScrollBarCommands enum


svn path=/trunk/mcs/; revision=59370
2006-04-11 19:14:49 +00:00
Jackson Harper 9280120004 * ScrollableControl.cs: Dont recalc if we are not visible.
svn path=/trunk/mcs/; revision=58865
2006-03-31 21:42:00 +00:00
Jackson Harper e827ba87fe * ScrollableControl.cs: Special case negative sized areas, not
zero.


svn path=/trunk/mcs/; revision=58402
2006-03-24 00:47:37 +00:00
Jackson Harper efda161f46 * ScrollableControl.cs: Refactored the Recalculate method a
little, this wasn't handling all the variants of bottom and
        right
        bars needed to be added and added/removed based on their
        counterparts being added/removed (which changes the drawable
        size). Also we special case client widths and heights of 0 and
        don't add the scrollbar for those.


svn path=/trunk/mcs/; revision=56427
2006-02-01 23:09:12 +00:00
Peter Dennis Bartok 19b6313b55 2006-01-12 Peter Dennis Bartok <[email protected]>
* ScrollableControl.cs: Implemented dockpadding. Fixes #77166. And
	  I finally understand how the property can be set without a setter :-)


svn path=/trunk/mcs/; revision=55486
2006-01-13 04:53:45 +00:00
Peter Dennis Bartok 3563f3d0f5 2005-12-22 Peter Dennis Bartok <[email protected]>
* ScrollableControl.cs: When calculating the canvas, don't consider
	  the scrollbar widths. Instead, predict if horizontal scrollbar
	  will affect canvas when deciding on vertical display and vice versa.


svn path=/trunk/mcs/; revision=54769
2005-12-23 03:47:23 +00:00
Jackson Harper f73f3d2ad6 * ScrollableControl.cs: Calculate the maximum and change vars
(more) correctly so that scrollbars appear as a sensible size.


svn path=/trunk/mcs/; revision=52663
2005-11-07 19:42:42 +00:00
Jackson Harper 2841a73b10 * XEventQueue.cs: Increase the default queue size (very simple
apps needed to grow the queue).
	* Hwnd.cs: No finalizer so we don't need to suppress
	finalization. Compute the invalid area manually so a new rectangle
	does not newto be created.
	* ScrollableControl.cs: Don't set any params (otherwise visibility
	isn't set correctly).
	* MdiChildContext.cs: New constructor takes the mdi parent so it
	doesn't have to be computed and avoids a crash on windows. Draw
	the window icon properly, and allow the text to be seen.
	* Form.cs: Use new MdiChildContext constructor. Make sure the
	child context isn't null in wndproc.
	* TabControl.cs: Don't set focus, this is muddling keyboard
	behavoir. Expand the tab rows when a window size increase will
	allow extra tabs to be seen. Don't allow tabs smaller than the
	width of a window to be scrolled out of view.
	* TreeNode.cs:
	* TreeView.cs: Use measure string to calculate a nodes width, the
	width is cached and only updated when the text or the font is
	changed. Don't check for expand/collapse clicks on the first level
	nodes if root lines are disabled.


svn path=/trunk/mcs/; revision=51769
2005-10-16 18:26:11 +00:00
Peter Dennis Bartok 638b27e47c 2005-10-12 Peter Dennis Bartok <[email protected]>
* XplatUI.cs, XplatUIDriver.cs: Removed EraseWindowBackground 
	  and SetWindowBackground methods
	* Control.cs:
	  - Setting proper ControlStyles
	  - We no longer call XplatUI.SetWindowBackground and XplatUI.
	    EraseWindowBackground, instead we draw the window background
	    ourselves in PaintControlBackground. This behaviour is
	    required to match MS, where, when OnPaintBackground is not
	    called, the background is not drawn.
	  - Removed unneeded Refresh() in set_Text
	* Hwnd.cs: Dropped the ErasePending support. No longer needed
	* XplatUIX11.cs:
	  - Created DeriveStyles method to translate from CreateParams to
	    FormBorderStyle and TitleStyle, also handles BorderStyle (which
	    matches FormBorderStyle enum values)
	  - Consolidated SetHwndStyles and CalculateWindowRect border/title
	    style calculations into single DeriveStyles method
	  - Fixed CreateWindow to (finally) use Gravity. This prevents X11
	    from redrawing the whole window on any resize or expose.
	  - Fixed CreateWindow usage of SetWindowValuemask. Before not
	    all styles were applied to our whole/client window appropriately
	  - Removed EraseWindowBackground() and SetWindowBackground() methods
	  - Removed handling of WM_ERASEBKGND message from DefWndProc, we
	    no longer clear/redraw the background through X
	  - Removed handling of erase_pending bit, we have no use for it (or
	    so it seems)
	* XplatUIOSX.cs:
	  - Removed generation and handling of WM_ERASEBKGND message
	  - Removed EraseWindowBackground() and SetWindowBackground() methods
	  - Removed handling of hwnd.ErasePending flag
	* XplatUIWin32.cs:
	  - Removed EraseWindowBackground() and SetWindowBackground() methods
	  - We no longer call EraseWindowBackground on PaintEventStart, we 
	    ignore the fErase flag, erasing is handled in Control in the
	    background handler
	* Button.cs, GroupBox.cs, Label.cs, CheckBox.cs, ProgressBar.cs,
	  LinkLabel.cs, ListControl.cs, TabPage.cs, UpDownBase.cs,
	  TextBoxBase.cs, TextBox.cs, ListView.cs, ButtonBase.cs, 
	  CheckedListBox.cs, MdiClient.cs, Panel.cs, DataGrid.cs, 
	  DataGridTextBox.cs, ScrollBar.cs, ListBox.cs, TrackBar.cs, 
	  TabControl.cs, ScrollableControl.cs, ToolBar.cs, PictureBox.cs,
	  DateTimePicker.cs, StatusBar.cs, MonthCalendar.cs: Setting proper ControlStyles


svn path=/trunk/mcs/; revision=51670
2005-10-13 00:30:42 +00:00
Peter Dennis Bartok 2bfcf9d213 2005-09-30 Peter Dennis Bartok <[email protected]>
* Theme.cs: 
	  - Switched Theme color names to match the names defined in 
	    System.Drawing.KnownColors. Life's hard enough, no need to make 
	    it harder.
	  - Added setters to all theme color properties so themes can set
	    their color schemes. The setters also propagate the color changes
	    to System.Drawing.KnownColors via reflection
	* ControlPaint.cs,  Label.cs, TextControl.cs, ToolTip.cs, ThemeNice.cs,
	  ComboBox.cs, MdiChildContext.cs, TextBoxBase.cs, DateTimePicker.cs
	  DataGridColumnStyle.cs, MonthCalendar.cs, TreeView.cs: Updated to
	  use the new, more logical theme color names
	* XplatUIWin32.cs: Updated the GetSysColorIndex enum to include new
	  post-NT colors
	* ThemeWin32Classic.cs:
	  - Removed code to set the old classic Windows colors. Instead it
	    now relies on the colors returned by System.Drawing.KnownColors
	    which will be either modern static colors (Unix) or colors
	    read from the user's configuration (Win32)
	  - Updated to use the new, more logical theme color names
	  - Switched DataGrid drawing code to use only Theme colors instead of
	    a mix of System.Drawing.KnownColors and Theme colors
	  - DrawFrameControl(): Removed code that fills the button area, the
	    fill would overwrite any previous fill done by a control. This
	    fixes bug #75338 
	  - Added DrawReversibleRectangle() stub
	* ScrollableControl.cs: Set visible state to false when scrollbars
	  are removed (pdn fix)
	* XplatUI.cs, XplatUIOSX.cs, XplatUIDriver.cs: Added 
	  DrawReversibleRectangle() method to allow drawing primitive 
	  'rubber bands'
	* XplatUIX11.cs: Implemented DrawReversibleRectangle()


svn path=/trunk/mcs/; revision=51052
2005-09-30 16:25:06 +00:00
Jackson Harper e0487f76b8 * ListBox.cs:
* ListView.cs:
	* TextBoxBase.cs:
	* TreeView.cs:
	* ScrollableControl.cs:
	* ComboBox.cs: Add implicit controls using the new implict control
	functionality in ControlCollection. Also try to block multiple
	control add in a suspend/resume layout to save some cycles.


svn path=/trunk/mcs/; revision=50893
2005-09-27 21:20:59 +00:00
Peter Dennis Bartok a40566f22a 2005-05-24 Peter Bartok <[email protected]>
* OpenFileDialog.cs, Form.cs, Menu.cs, GroupBox.cs, UserControl.cs,
	  Label.cs, DataGridTextBoxColumn.cs, PropertyGrid.cs, ErrorProvider.cs
	  Splitter.cs, Control.cs, FontDialog.cs, TabPage.cs, 
	  FolderBrowserDialog.cs, HelpProvider.cs, DataGridTableStyle.cs,
	  NotifyIcon.cs, FileDialog.cs, ListView.cs, SaveFileDialog.cs,
	  ToolBarButton.cs, ImageList.cs, DataGridBoolColumn.cs, Panel.cs,
	  DataGrid.cs, DataGridTextBox.cs, ListBox.cs, TrackBar.cs,
	  AxHost.cs, TabControl.cs, ScrollableControl.cs, ToolBar.cs,
	  DataGridColumnStyle.cs, PictureBox.cs, DateTimePicker.cs,
	  StatusBar.cs, MonthCalendar.cs, TreeView.cs: Cleanup
	* DataGridPreferredColumnWidthTypeConverter.cs: Added
	* System.Windows.Forms.dll.sources: Added 
	  DataGridPreferredColumnWidthTypeConverter.cs
	* SWF.csproj: Updated

svn path=/trunk/mcs/; revision=44945
2005-05-24 22:19:07 +00:00
Peter Dennis Bartok dc0b825241 2005-05-19 Peter Bartok <[email protected]>
* ScrollableControl.cs (DisplayRectangle): Undid my last change until
	  I can investigate, apparently I broke FileDialog


svn path=/trunk/mcs/; revision=44756
2005-05-19 18:46:35 +00:00
Peter Dennis Bartok adfaeb77d2 2005-05-18 Peter Bartok <[email protected]>
* DataObject.cs: Entries are not global but particular to the 
	  DataObject, now it behaves that way
	* XplatUIWin32.cs: Implemented Clipboard methods
	* Clipboard.cs: Implemented
	* ScrollableControl.cs (DisplayRectangle): Fixed calculation
	* XplatUIOSX.cs: Updated to final clipboard prototypes
	* XplatUIX11.cs: Implemented Clipboard methods
	* XplatUIDriver.cs: Updated to final clipboard prototypes
	* XplatUIStructs.cs: 
	  - Added BITMAPINFOHEADER struct 
	  - Added ClipboardFormats enum
	* X11Structs.cs: 
	  - Added ClipboardStruct
	  - Added Atom enum items for clipboard types
	  - Fixed atom types for Selection event structures
	* DataFormats.cs: 
	  - Added internal properties and methods for drivers to enumerate 
	    all known formats
	  - Switched initialization method to allow drivers to assign their
	    own IDs even for the MS predefined clipboard IDs


svn path=/trunk/mcs/; revision=44710
2005-05-18 19:25:49 +00:00
Peter Dennis Bartok ea283a5786 2005-02-19 Peter Bartok <[email protected]>
* UserControl.cs: Added TextChanged event; added attributes
	* SizeGrip.cs: Implemented resizing and optional display of grip
	* Form.cs: Fixed attribute
	* XplatUI.cs, XplatUIDriver.cs, XplatUIOSX.cs, XplatUIWin32.cs:
	  Changed meaning of ScrollWindow bool argument; instead of the
	  clear attribute (which will be true usually anyway), it gives the
	  option of moving child controls as well.
	* XplatUIX11.cs:
	  - Changed to match new ScrollWindow argument
	  - Fixed GetWindowPos/SetWindowPos behaviour for toplevel controls,
	    now handles the implicit parent window a WM puts around us
	* ScrollableControl.cs: Implemented (not the prettiest, but it seems 
	  to work)
	* TextBoxBase.cs: Adjusted to new ScrollWindow arguments
	* TreeView.cs: Adjusted to new ScrollWindow arguments


svn path=/trunk/mcs/; revision=40918
2005-02-20 01:40:28 +00:00
Peter Dennis Bartok 6459692d1b 2005-02-16 Peter Bartok <[email protected]>
* ImeMode.cs: Added missing attributes
        * Menu.cs: Fixed attribute
        * GroupBox.cs: Fixed attribute
        * Label.cs: Fixed attribute
        * ColorDialog.cs (RunDialog): Removed TODO attribute
        * ComboBox.cs: Fixed attributes
        * ListControl.cs: Added missing attributes
        * PropertyGrid.cs: Fixed attributes
        * Control.cs: Fixed attributes
        * ListViewItem.cs: Added TypeConverter attribute
        * NotifyIcon.cs: Fixed attributes
        * ListView.cs: Fixed attributes
        * ButtonBase.cs: Fixed attribute
        * ImageList.cs: Added missing attributes
        * ContainerControl.cs: Fixed signature
        * CheckedListBox.cs: Fixed attribute; added missing attributes
        * Panel.cs: Fixed attributes
        * PropertyTabChangedEventArgs.cs: Added missing attribute
        * PropertyValueChangedEventArgs.cs: Added missing attribute
        * Binding.cs: Fixed attribute
        * ListViewItemConverter: Implemented ListViewSubItemConverter class
        * ListBox.cs: Fixed attribute; added missing attributes;
        * ScrollableControl.cs: Added missing attributes
        * PictureBox.cs: Added missing attributes; implemented missing property
        * DateTimePicker.cs: Added missing attributes
        * Theme.cs (ToolWindowCaptionHeight): Fixed type
        * MonthCalendar.cs: Fixed attributes
        * StatusBarPanel.cs: Added missing attributes
        * SystemInformation.cs (ToolWindowCaptionHeight): Fixed type


svn path=/trunk/mcs/; revision=40741
2005-02-16 11:33:50 +00:00
Jackson Harper faa9b7e0cb * ScrollBar.cs: Make abstract
* ScrollableControl.cs: Create H/V scrollbars now that scrollbar
	is abstract.


svn path=/trunk/mcs/; revision=40116
2005-02-04 07:59:14 +00:00
Peter Dennis Bartok 4c532a7332 - Removed debug output
- Setting proper foreground and background color for TextBox
- Added workaround for Form VisibleChanged notifications

svn path=/trunk/mcs/; revision=39816
2005-01-31 01:54:01 +00:00