* DataGrid.cs:
- OnMouseDown: Switch to editing mode when clicking on the cell
even if we're clicking on the cell that's currently
selected
- ProcessGridKey: Left/Right now wrap like MS.Net does
- ProcessGridKey: Tab now knows to add a new row when tab is
pressed in the cell of the last column of the
last row
- ProcessGridKey: Enter now adds another row if pressed in the last
row and selectes the new row, same column cell
- ProcessGridKey: Home/End navigate columns, not rows, like
originally implemented
- Broke ProcessKeyPreview code out into an extra Internal method
so it can be called from the edit code
* DataGridTextBox.cs (ProcessKeyMessage):
- Switched to accept Tab keypresses
- Added F2 handling to allow jumping to the end of the edited cell
- Added logic to allow moving caret left/right inside edited cell
and making the edited cell jump when the caret hits cell borders
- Tab and Enter are now passed to the datagrid after being handled
* TextBoxBase.cs:
- Removed capture code now that Control handles it
- set_SelectionStart now ensures caret is visible
svn path=/trunk/mcs/; revision=58092
* RichTextBox.cs: Need to scroll to caret after text is inserted (#77672)
* TextBoxBase.cs:
- Scroll to caret after inserting text (#77672)
- Make scroll range one pixel higher, fixes off-by-one error (and
makes underlines visible on the last line)
svn path=/trunk/mcs/; revision=57887
* TextControl.cs:
- Switched caret to be just 1 pixel wide, matches MS and looks less
clunky
- Moved caret display 1 pixel down from the top of the control
to improve view
- InsertCharAtCharet: Update the selection start if moving the caret
(fixes bug #77696; based on patch suggested by [email protected])
- No longer always creating the caret when the caret methods are
called. Only the actual ShowCaret/HideCaret will do that now
- Only setting caret visible if the owner control has focus
- UpdateView: Added invalidation-shortcut logic for center and right
aligned text. Previously we'd update all according to the left
logic which caused drawing errors. Also fixed height of invalidated
areas, now properly invalidating the whole area (was off-by-one)
- owner_HandleCreated: Always generate the document when the
handle is created; this ensures that
* TextBoxBase.cs:
- Fixed situation where caret would disappear under the right
window border, also improved scrolling behaviour on left-
aligned textboxes
- Fixed right-aligned textboxes to have a border to the
right instead of the caret being under the right border
* XplatUIX11.cs:
- Switched from 'nested' to simple visible/not visible tracking
for caret (part of fix for #77671)
- No longer passing through translated FocusIn/FocusOut messages
since we were notifying too often and the wrong windows. Instead
we just notify our focussed window of receiving or loosing focus
* XplatUIWin32.cs: Switched from 'nested' show/hide
counting for caret to simple visible yes/no behaviour (part of
fix for #77671)
svn path=/trunk/mcs/; revision=57885
* TextBoxBase.cs: Honor the Handled state of KeyPress events. Instead
of calling base we simply process the key ourselves, since both
DefWindowProc and the handled method would set m.Result.
(Fixes#77732)
svn path=/trunk/mcs/; revision=57717
* Form.cs(ScaleCore): No longer calling base.ScaleCore since that
method also moves the window; instead implemented a copy of
Control.ScaleCore (Part of fix for #77456)
* TextBoxBase.cs:
- Created new CreateGraphicsInternal method to allow providing
a graphics context when no handle is created without triggering
handle creation. (Part of fix for #77456)
- Replaced use of Control.CreateGraphics with CreateGraphicsInternal
* TextControl.cs:
- Switched Constructor to require TextBoxBase instead of Control (to
allow uncast access to CreateGraphicsInternal)
- Safeguarded use of owner.Handle property. No longer accessing it
unless the handle is already created.
- Replaced use of Control.CreateGraphics with CreateGraphicsInternal
- Now triggering a recalc when owning control becomes visible
* TextBox.cs, RichTextBox.cs: Switched to use new internal
TextBoxBase.CreateGraphicsInternal() method to avoid triggering
premature handle creation (Part of fix for #77456)
* Control.cs:
- We now only destroy our double-buffering buffers when the
control is resized or disposed, but not when visibility
changes. (The code even re-created them twice every time)
- Now requiring a redraw of the buffer on visibility changes
(fixes bug 77654 part 2)
- Not passing OnParentVisibleChanged up unless the control
is visible
- CanFocus: Fixed to match MS documentation
- Focus: Fixed to return actual focus state and to check if
setting focus is legal before setting it
svn path=/trunk/mcs/; revision=57716
* Control.cs: Separated special WM_SYSKEYUP keyboard handling. That way
it's easier for a child control to handle the other messages without
having to duplicate the special functionality
* TextBoxBase.cs
- WndProc: Removed calling base handler for WM_KEYDOWN and added
code to handle processing the key ourselves, in order to get
access to the result of KeyEventArgs.Handled. We now only call
ProcessKey if they key hasn't been handled already. Fixes#77526.
- set_Text: If null or empty string is given, just clear the
document. Fixes part of #77526
svn path=/trunk/mcs/; revision=57363
* RichTextBox.cs:
- SelectionColor and SelectionFont methods no longer set absolute
styles. Instead, the keep font or color respectively (This
resolves a long-standing FIXME in the code)
- When flushing RTF text, the insert code now considers text trailing
behind the insertion point (Fixes the bug where when replacing
the selected text via SelectedRTF the remainder of the line behind
the selection would stay on the first insertion line)
* TextBoxBase.cs:
- AppendText now updates the selection points after inserting text
- AppendText now ensures that the last tag (sometimes 0-length) of
the document is used for the style information (Fixes part of
bug #77220)
* TextControl.cs:
- Created new FontDefiniton class to allow describing partial style
changes
- StreamLine() now takes a lines argument, to allow it to decide
whether an encountered zero-length tag is the last in the document
(which must be kept to not loose the font/color contained in it,
for later appends)
- Created Combine() and Split() methods for Marker structs, to
support marker updates due to reformatted documents (soft line
wraps)
- Implemented Document.CaretTag setter
- Fixed MoveCaret(CtrlEnd) handling, now moves to the last character
of the last line (Not the cause, but also exposed by bug #77220)
- Added LineTag argument to InsertString method, to allow callers
to force a certain tag to be used (required to force use of the
trailing zero-length tag of a document)
- Now updating markers in Combine(), to avoid stale tag markers
- Added some method descriptions to aid maintenance
- Implemented new FormatText concept, allowing additive/subtractive
formatting by only specifying the components that are to be
changed. This was needed for resolving the RTB.SelectedColor/
RTB.SelectedFont fixmes
- Added Break() support method to allow breaking up linetags (used
for partial formatting)
- Added GenerateTextFormat() method. It is used for partial
formatting and allows to generate a full font/color from given
attributes and an existing tag.
svn path=/trunk/mcs/; revision=57322
* Control.cs:
- ScaleCore needs to scale the bounds, not the ClientSize of the
control. Fixes#77416.
- DefaultSize is 0,0 for control
* TextBoxBase.cs:
- DefaultSize is 100, 20
- SetBoundsCore: Now enforcing the height, no matter if the provided
height is more or less than the preferred one, as long as AutoSize
is on
* Form.cs: Apply documented fudge factor. Part of item 3 fix for #77416
svn path=/trunk/mcs/; revision=56505
* TextBoxBase.cs (WndProc): When handling WM_KEYDOWN we need to
first call base before processing the event. Fixes#77279
svn path=/trunk/mcs/; revision=55803
* Control.cs: Undid my selection check fix, since it's not needed
* TextBoxBase.cs:
- Now considering the presence of hscroll/vscroll when sizing
vscroll/hscroll respectively. Fixed bug #77077
- Added Left/Up/Down/Right to IsInputKey list to prevent
ContainerControl from stealing them. This fixes what I broke
with my last checkin.
svn path=/trunk/mcs/; revision=55491
* Application.cs:
- Switched RunLoop to use static Message.Create to create a
Message object
- Added PreProcessMessage call in runloop for keyboard events; this
is part of the fix for #77219, I overlooked this originally in the
MSDN doc for PreProcessMessage
* Control.cs:
- Removed call to PreProcessMessage from handling of keyboard
messages; it's supposed to be done in the message pump
- Moved call to ProcessKeyEventArgs inside ProcessKeyMessage as
per MSDN documentation.
- IsInputChar: All chars are input chars by default; removed the
parent calling chain, MS does not document that
- PreProcessMessage: If IsInputChar is true, we want to return false
to allow dispatching of the message
- When selecting the next control, now also check that we're not
selecting ourselves again and therefore return a false positive.
* TextBoxBase.cs:
- Tried to match return values for IsInputKey and ProcessDialogKey
to what MS returns; moved processing of our special keys outside
ProcessDialogKey since MS does not seem to return true on those.
- Moved code that previously was in ProcessDialogKey into new private
ProcessKey method, which gets called upon receipt of WM_KEYDOWN
- Reworked handling of WM_CHAR to not have to duplicate code from
Control.cs anymore, instead we simply call down to base.
svn path=/trunk/mcs/; revision=55472
* TextBoxBase.cs:
- MaxLength now treats 2^31-1 equal to unlimited length (this is
not quite MS compatible, MS uses that number only for single line
and 2^32-1 for multi-line, but I figure it won't hurt keeping
the limit at 2GB)
- Now enforcing the MaxLength limit when entering characters
- Added argument to internal Paste() method to track if it's called
from programatically or via keyboard, since keyboard driven pastes
need to enforce max-length
- Added logic to Paste to only paste as many chars as MaxLength
allows
* RichTextBox.cs: Updated to use new obey argument for internal Paste()
* TextControl.cs:
- Added Length property to return number of characters in document
- Added private CharCount property which only tracks actual chars
in the document (no linefeeds) and fires event when CharCount
changes
- Added tracking of character count to all methods that alter it
- Added LengthChanged event to allow applications to subscribe
to any changes to the document
svn path=/trunk/mcs/; revision=54537
* TextBox.cs:
- Removed local password_char field (moved to TextBoxBase)
- Now setting the document's password var when password is
set
* TextBoxBase.cs:
- Added password_char field (needed here so MultiLine can
access it)
- Added logic to MultiLine property setter to set the document's
variable when password display is allowed
- Removed debug code and made some debug code conditional
* TextControl.cs:
- Added RecalculatePasswordLine() method to handle special password
char only lines
- Added PasswordChar property, also added related tracking vars
- Draw() method now uses local text var for grabbing text to draw,
this var is set to line.text unless we're doing password display,
then it is set to the pre-generated all-password-chars line
- Added calling RecalculatePasswordLine() method for password
lines
svn path=/trunk/mcs/; revision=54484
* TextBoxBase.cs: Now uses Jackson's new and improved ImplicitScrollbar
* RichTextBox.cs: FormatText position arguments are 1-based, now making
sure that what we pass to FormatText is always 1-based. Fixes#76885
svn path=/trunk/mcs/; revision=53857
* TextBoxBase.cs: Implemented Ctrl-Ins (Copy), Shift-Ins (Paste) and
Shift-Del (Cut), apparently Emacs uses these old Win 2.x keys. This
is for Jackson
* RichTextBox.cs: Added calls to base for DnD events
svn path=/trunk/mcs/; revision=53669
* TextControl.cs:
- Fixed drag-selection related crash; style fixes
- Implemented undo class
o Implemented method to capture document state for specified
range in document tree
o Implemented method to restore captured document state
o Implemented cursor tracking
o Implemented basic undo stack
- Added undo cursor tracking to methods altering cursor location
- Added undo tracking to selection deletion (still missing
other text-altering hookups)
* RichTextBox.cs:
- Added SelectionLength property
- Implemented CanPaste()
- Implemented Paste()
- Added missing protected methods
- Fixed RTF->Document conversion; now uses font index 0 and color
index 0 as the default font for the parsed text
- Fixed RTF<->Document font size translation
- Fixed RTF generation, now properly handles cross-tag boundaries
for single line selection
- No longer always appends blank line to generated RTF
- Removed TODOs
- Added missing attributes
- Hooked up undo-related methods
* TextBoxBase.cs:
- Implemented Copy()
- Implemented Paste()
- Implemented Cut()
- Fixed caret mis-behaviour on backspace across line-boundaries
svn path=/trunk/mcs/; revision=53667
* XplatUIWin32.cs:
- Clipboard methods now can translate Rtf format
- No longer removes clipboard contents whenever a new format is added
to allow placing multiple formats on the clipboard
* Clipboard.cs: Clipboard now supports getting a IDataObject and
will place all formats contained in it onto the clipboard. Also
now cleans the clipboard before placing a new object onto it
* RichTextBox.cs:
- Implemented set_Rtf
- Implemented set_SelectedRtf
- Created InsertRTFFromStream() method to allow single code base
for all properties and methods that insert RTF into document
- Removed debug output
* TextControl.cs:
- Fixed Delete(int) to fix up line numbers
- Fixed ReplaceSelection to combine start and end line
- Fixed serious DeleteChars bug that would leave the document tree
broken
- Improved DumpTree with several logic checks to detect broken
document trees
- Removed debug lines
- Fixed Caret.WordForward/WordBack moving code, now always also
updates caret.tag (fixes crash when word-selecting across tag
boundaries via keyboard)
- Added Insert() method for inserting multiline text into documents
- Fixed DeleteChars() calculation errors that would cause a broken
tag chain with multiple tag lines
- DeleteChars() no longer crashes on multi-tag lines if not all tags
- Split() no longer moves caret if split is at caret location
- ReplaceSelection() now updates the cursor and re-displays it
- ReplaceSelection() now uses new Insert() method to avoid code
duplication
- FormatText() can now handle formatting partial lines
* TextBoxBase.cs:
- Append now uses new TextControl.Insert() method (this avoids
duplicate code)
- Implemented Ctrl-X (Cut) (
- Implemented Ctrl-C (Copy)
- Implemented Ctrl-V (Paste) (Still some bugs related to screen
regeneration when pasting text; roundtripping Copy&Paste within
edit control still fails due to some calculation bugs in GenerateRTF)
- The Delete key will now remove the current selection if it is visible
* TextBox.cs: Removed debug lines
* XplatUI.cs: Trigger initialization of DataFormats (which requires the
driver to be initialized and can't therefore be done via a static ctor)
svn path=/trunk/mcs/; revision=52940
* TextControl.cs: Added backend code for finding char arrays and strings
* TextBoxBase.cs:
- Added mouse wheel scroll support
- Added support for VScroll and HScroll events
* RichTextBox.cs:
- Implemented all seven Find() variants
- Implemented GetCharFromPosition()
- Implemented GetCharIndexFromPosition()
- Implemented GetLineFromIndex()
- Implemented GetPositionFromCharIndex();
- Implemented SaveFile for PlainText and UnicodeText
- Fixed set_Font, now setting a new font applies that font to
the whole document
- Implemented generic Document to RTF converter
- Implemented SaveFile for RichText format (still missing unicode
conversion for non-ansi chars)
- Implemented get_Rtf
- Implemented get_SelectedRtf
2005-11-09 Peter Dennis Bartok <[email protected]>
* Control.cs (WndProc): Call HandleClick after having sent OnMouseUp
to allow any captures to be released before triggering OnClick. This
way a click handler may capture the mouse without interference.
* XplatUIX11.cs: Always send mouse messages to grab window if one exists.
This way we send them even though X may not allow a grab (if the window
isn't visible, for example)
svn path=/trunk/mcs/; revision=52872
* TextControl.cs:
- Added CaretSelection enum
- Added comparison methods to Marker struct, makes selection code
more readable
- Added SelectionStart and SelectionEnd as 'moveable' location for
the CaretDirection enum and handler
- Added selection_prev variable to track optimized invalidation for
word and line selection
- Added SelectionVisible property (returns true if there is a valid
selection)
- Switched CaretHasFocus to only display the caret if there is no
visible selection
- Avoiding StringBuilder.ToString to retrieve a single char, instead
using the direct character index; should be much faster
- Added various conditional debug statements
- Fixed invalidation calculation for selection ranges
- Added ExpandSelection() method to support word and line selection
- Switched SetSelectionToCaret to use new Marker compare overloads
- Added central IsWordSeparator() method to determine word
separators/whitespace and FindWordSeparator() to streamline common
usage of IsWordSeparator()
* TextBoxBase.cs:
- Removed unneeded grabbed variable, it was just mirroring
Control.Capture
- No longer firing OnTextChanged event when Text setter is called,
since the base will fire the event for us
- Added handling of Ctrl-Up/Down selection
- Added handling of Shift-Cursorkey selection
- Added handling for Ctrl-Delete and Ctrl-Backspace to remove
words
- Added handling of Shift and Ctrl-Shift-Home/End selection
- Removed some debug output
- Added handling for single/double/tripple-click to place caret/
select word/select line respectively (Fixes bug #76031)
- Added support for drag expansion of word/line selection
* RichTextBox.cs: Handle GotFocus event to trigger redrawing of
current selection
svn path=/trunk/mcs/; revision=52505
* TextBoxBase.cs:
- get_Text: Add last line (without trailing newline) to returned
value (Fixes 76212)
- get_TextLength: Count last line in returned length
- ToString: Call Text property instead of duplicating code
svn path=/trunk/mcs/; revision=52114
* 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