* CheckedListBox.cs: Removed unused vars
* ListView.cs: Fixed signatures
* RichTextBox.cs: Removed unused vars
* TextBoxBase.cs: Removed unused vars
* XplatUIWin32.cs: Removed unused vars
* XplatUIX11.cs: Removed unused vars
* XplatUI.cs: Updated version and date to latest published
svn path=/trunk/mcs/; revision=51695
* 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
* TextBoxBase.cs:
- We now accept Enter even if AcceptEnter is false, if the containing
form does not have an AcceptButton configured (fixes bug #76355)
- Calculations are now fixed to no longer use Width/Height, but
ClientSize.Width/Height, since we now support borders (this was
a result of fixing borders and therefore bug #76166)
- We no longer show the horizontal scrollbar if TextBox.WordWrap is
true (fixes bug #76354)
svn path=/trunk/mcs/; revision=51383
* Control.cs:
- Defaulting BorderStyle and setting it in XplatUI when our window
is created
- Added enum check to InternalBorderStyle setter
* XplatUIX11.cs:
- Added drawing of window borders
- Now properly calculates WM decorations offset for toplevel
windows (fixes bug #74763)
* XplatUIWin32.cs:
- Implemented BorderStyles for windows (we're letting win32 draw
the border for us)
- Fixed the signature for SetWindowLong
* PictureBox.cs, DataGrid.cs, TextBoxBase.cs, ToolBar.cs, Panel.cs:
Now uses Control.InternalBorderStyle for setting borders
* UpDownBase.cs: Remove drawing of borders, this is handled by
the driver, outside the client area
* ListView.cs: Removed bogus border calculations. The control should
be oblivious to borders, since those are not part of the client
area.
* X11DesktopColors.cs: Commented out (currently) unneeded variables
svn path=/trunk/mcs/; revision=51379
* 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
* 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
* Control.cs, TextBoxBase.cs, TextControl.cs: Don't do certain
things if our window handle isn't created yet. Also disabled
debug for TextBoxBase
svn path=/trunk/mcs/; revision=50346
* Form.cs: Set proper default for Opacity property
* NotifyIcon.cs:
- ShowSystray(): Don't bother creating telling the OS
about the systray item if no icon is provided
- Now handles WM_NCPAINT message to deal with whole/client window
split
- Create window as visible to not get caught by Expose optimization
* Hwnd.cs: Removed debug message
* ComboBox.cs, ScrollBar.cs, ListBox.cs, TrackBar.cs, TabControl.cs,
StatusBar.cs, TreeView.cs, XplatUIOSX.cs, XplatUIWin32.cs: Switched
PaintEventStart/End to use new client argument
* TextBoxBase.cs:
- Commented out debug messages
- Switched PaintEventStart/End to use new client argument
* XplatUI.cs: Added client window bool to PaintEventStart()/
PaintEventEnd() calls, to support drawing in non-client areas
* XplatUIDriver.cs:
- Added client window bool to PaintEventStart()/PaintEventEnd()
calls, to support drawing in non-client areas
- Added conditional compile to allow using MWF BeginInvoke
on MS runtime
* XplatUIX11.cs:
- Added some conditional debug output
- Fixed SystrayAdd() method to support new (for SystrayAdd, anyway)
whole/client window split
- Implemented handling of client argument to PaintEventStart()/End()
* Control.cs:
- Throw exception if BeginInvoke() is called and the window handle
or one of the window's parent handles is not created
- Added conditional compile to allow using MWF BeginInvoke on
MS runtime
- get_Parent(): Only sets parent if handle is created. This avoids
forcing window handle creation when parent is set.
- Now fires Layout and Parent changed events in proper order
- Switched to use Handle instead of window.Handle for Z-Order setting,
the get_Parent() patch above causes us to possibly get null for 'window'
- Implemented handling of client argument to PaintEventStart()/End()
- Now reports back to windows that WM_SETCURSOR was handled (to avoid
default handling)
- Now sends a Refresh() to all child windows when Refresh() is called
svn path=/trunk/mcs/; revision=49103
* Form.cs (ShowDialog): Assign owner of the dialog
* TextBoxBase.cs: Always refresh caret size when deleting, caret
might have been moved to a tag with different height
svn path=/trunk/mcs/; revision=46807
* TextBoxBase.cs: Re-align caret after deleting a character
* TextControl.cs:
- DeleteChars(): Ensure that tag covers the provided position
- StreamLine(): Drop reference for dropped tag
svn path=/trunk/mcs/; revision=46750
* TextControl.cs:
- Made line ending size configurable (now allows for counting
lineendings as \n or \r\n)
- Added margin to viewport to keep caret visible on right side
- Fixed translation routines for line/pos to documentpos to consider
cr/lf when counting (Fixes RichTextBox.SelectionFont issues)
- Fixed some line-endings to be unix style
- Fixed Document.FormatText to perform it's calculations 1-based
- Added descriptions for a few methods that might otherwise get
used wrong
- Added NOTE section with some basic conventions to remember at
the top of the file
- Major fixup for RichTextBox selection drawing:
* Fixed crashes when multiple tags on a single line were selected
* fixed selection box drawing not overlaying text
* fixed bogus offset calculation for tags not starting at index 1
* Switched behaviour from using multiple Substrings of a
StringBuilder.ToString() to using multiple
StringBuilder.ToString(start, length) statements, hoping this is
faster (kept original version commented out in the code, in case
original version was faster)
* TextBox.cs (set_TextAlignment): TextBox always needs to wrap if
alignment != Left
* TextBoxBase.cs (CalculateDocument): Made protected so RichTextBox can
call it as well
svn path=/trunk/mcs/; revision=46618
* TextControl.cs: Added sanity check
* TextBoxBase.cs:
- Fixed wrapping behaviour, don't set wrap on single line controls
(this fixes the breakage of colordialog introduced in an earlier
checkin)
- Added rudimentary support for autoscrolling right-aligned controls
(still needs fixing, also, center alignment scroll is missing)
svn path=/trunk/mcs/; revision=46375
* TextBoxBase.cs:
- Now calling PositionCaret with absolute space coordinates
- Enabled vertical scrolling
- Better tracking of scrollbar changes, tied into WidthChange
event
- Improved cursor tracking
- Removed debug output
* TextControl.cs:
- PositionCaret coordinates are now works in absolute space, not
the canvas
- Improved tracking of document size
- Added events for width and height changes
svn path=/trunk/mcs/; revision=46340
* Form.cs: Set focus to active control when form is activated
* TextControl.cs:
- Added word-wrap functionality to RecalculateLine()
- Added some short function descriptions for VS.Net to aid in
writing dependent controls
- Added Caret property, returning the current coords of the caret
- Added ViewPortWidth and ViewPortHeight properties
- Added Wrap property
- Added CaretMoved event
- Removed some old debug code
- Split() can now create soft splits
- Added PreviousTag()/NextTag() to allow walking "tag-lists"
- Added method to format existing text
- Fixed size/alignment calculations to use viewport
- RecalculateDocument now can handle changing line-numbers while
calculating lines
* TextBox.cs:
- Added some wrap logic, we don't wrap if alignment is not left
- Added casts for scrollbar var, base class switched types to
also support RichTextBoxA
- Implemented handling of scrollbar visibility flags
* TextBoxBase.cs:
- Switched scrollbars type to RichTextBoxScrollBars to support
RichTextBox
- Added tracking of canvas width/height
- Switched scrollbars to be not selectable (to keep focus on text)
- Added central CalculateDocument() method to handle all redraw
requirements
- Added ReadOnly support
- Added WordWrap support
- Fixed handling of Enter key (we now treat it as a DialogKey)
- Fixed caret positioning when h or v scroll is not zero
- Fixed placing/generation of vertical scrollbar
- Added CalculateScrollBars() method to allow updating scrollbar
limits and visibility
- Fixed handling of horizontal scroll
- Added handling of vertical scroll
- Implemented auto-'jump' when caret moves to close to a left or
right border and there is text to be scrolled into view (currently
there's the potential for a stack overflow, until a bug in
scrollbar is fixed)
svn path=/trunk/mcs/; revision=46335
* AxHost.cs: Some simple properties.
* Control.cs: window must be accessible after ctor.
* Form.cs: Added TransparencyKey property.
* TextBoxBase.cs: Implemented Clear. Text property can be null.
* XplatUIWin32.cs: SetBorderStyle implemented.
svn path=/trunk/mcs/; revision=44739
* Hwnd.cs: Added DefaultClientRectangle property
* XplatUI.cs: Now using the X11 driver Where() method, which provides
more detailed debug information
* XplatUIX11.cs:
- Fixed size-change feedback loop, where we would pull an old size
off the queue and mistakenly change our window's size to an
earlier value
- Now compressing ConfigureNotify events, to reduce looping and
redraw issues
* TextBoxBase.cs: Preventing crash when no text is set and ToString()
is called
svn path=/trunk/mcs/; revision=41550
* Control.cs:
- Fixed ProcessKeyEventArgs to also handle WM_SYSKEY messages (and
only process mnemonics on those)
- Fixed event sequence for key handling; first calling
ProcessKeyEventArgs now
* TextBoxBase.cs:
- Removed WM_KEYDOWN hook, instead we now use ProcessDialogKey()
for processing non-character keys
- Fixed WM_CHAR to generate proper event sequence before processing
* XplatUIWin32.cs: Added ALT key state to ModifierKeys property
generation
svn path=/trunk/mcs/; revision=40925
* 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
- MouseButtons.cs: Added missing attributes
- XplatUIStructs.cs: Added enumeration for title styles
- LeftRightAlignment.cs: Added missing attributes
- Hwnd.cs: Switched to use client_window as handle (slower, but makes
it compatible with Graphics.FromHwnd()
- SelectedGridItemChangedEventArgs.cs: Fixed property type
- Keys.cs: Added missing attributes
- SelectionRange.cs: Added missing attributes
- SelectionRangeConverter.cs: Added
- XplatUI.cs:
- Introduced SetBorderStyle, SetMenu, GetMenuDC and
ReleaseMenuDC methods
- Renamed ReleaseWindow to UngrabWindow
- Added proper startup notice to allow version identification
- Form.cs:
- Added missing attributes
- Removed FormParent concept
- Label.cs: Removed border_style field, now in Control
- RadioButton.cs: Now properly selects RadioButton when focus is
received
- ThemeGtk.cs: Fixed SetDisplay call to match new X11 behaviour
- Control.cs:
- Added missing attributes
- Added borderstyle handling
- Removed FormParent concept support
- Fixed calls to XplatUI to match changed APIs
- Fixed bug that would case us to use disposed Graphics objects
- Removed unneeded internal methods
- PerformLayout(): Fixed to handle DockStyle.Fill properly
- SelectNextControl(): Fixed to properly check common parents
- TextBoxBase.cs: Removed border_style field (now in Control)
- MessageBox.cs:
- Patch by Robert Thompson ([email protected]): Added icon support,
fixed calculations for form size
- Added support for localized strings and icons
- Improved form size calculations, added border
- ListView.cs: Removed border_style field (now in Control)
- X11Structs.cs: Moved several structs from X11 driver here
- X11Keyboard.cs: Changed debug message
- Application.cs: Removed FormParent concept support
- CommonDialog.cs:
- Resetting end_modal flag
- Removed FormParent concept support
- NativeWindow.cs: Removed FormParent concept support
- XplatUIX11.cs: Rewritten, now using the new Hwnd class, implementing
Client area and Non-Client whole window to allow support for WM_NC
messages
- XplatUIOSX.cs: Updated to match latest driver spec; added exception
prevent using it until it supports Hwnd as per Geoff Norton's request
- ToolBar.cs: Fixed drawing, was not doing proper drawing
- PictureBox.cs: Removed border_style field, now in Control
- XplatUIWin32.cs: Added new driver methods
svn path=/trunk/mcs/; revision=40588
- Added automatic selection of the first control in modal forms
- TextBox improvements related to selections
- Changed the uglyness level of the frame hack for edit
- Added missing attributes to various controls
- Fixed drawing problems (missing clip styles on controls)
svn path=/trunk/mcs/; revision=39220
- Removed unused vars
- Added required overrides for TextControl
- Finished Text property implementation for Text control
- Finished Selection implementation for Text Control
svn path=/trunk/mcs/; revision=38303
- Added color argument to all functions dealing with tags
- Added color argument support to various functions
- Fixed miss-calculation of baseline/shift in certain circumstances
- Added new color option to test code
svn path=/trunk/mcs/; revision=37916
as formatting tester, which must go away soon)
- Added Debug section for Deleting/Combining lines
- Fixed calculations for UpdateView after Combining lines
svn path=/trunk/mcs/; revision=37870
XplatUI.GetFontMetrics() method. Simplified several calculations
- Moved #endif to allow compiling if Debug is not defined
svn path=/trunk/mcs/; revision=37867