Skip to content

Commit ff59385

Browse files
committed
Merge branch 'release/v23.1.3' into main
2 parents e6766b4 + fcf0999 commit ff59385

File tree

13 files changed

+97
-33
lines changed

13 files changed

+97
-33
lines changed

Documentation/topics/licensing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ The contents of a *licenses.licx* file are pretty simple. It needs a single lin
144144
This single line (update the version to match the one you use) should be added to the *licenses.licx* file in any project that uses Actipro @@PlatformName control or SyntaxEditor add-on products:
145145

146146
```
147-
ActiproSoftware.Products.ActiproLicenseToken, ActiproSoftware.Shared.WinForms, Version=23.1.2.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763
147+
ActiproSoftware.Products.ActiproLicenseToken, ActiproSoftware.Shared.WinForms, Version=23.1.3.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763
148148
```
149149

150150
### Notes on Build Machines When Using Licenses.licx Files

Documentation/topics/syntaxeditor/text-parsing/core-text/text-changes.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,18 @@ while (!reader.IsAtSnapshotEnd) {
144144
}
145145
```
146146

147+
### Setting the Post-Change Selection
148+
149+
After a text change is applied, an editor view's selection will by default be collapsed to the offset location after the last operation. This is accurate for many scenarios, however in some cases, the exact selection needs to be set to something else.
150+
151+
This can be done by setting the [ITextChange](xref:ActiproSoftware.Text.ITextChange).[PostSelectionPositionRanges](xref:ActiproSoftware.Text.ITextChange.PostSelectionPositionRanges) property to an [ITextPositionRangeCollection](xref:ActiproSoftware.Text.ITextPositionRangeCollection) instance. The static [TextPositionRange](xref:ActiproSoftware.Text.TextPositionRange).[CreateCollection](xref:ActiproSoftware.Text.TextPositionRange.CreateCollection*) method can create an [ITextPositionRangeCollection](xref:ActiproSoftware.Text.ITextPositionRangeCollection) instance. The first overload for that method is most commonly used. It takes a single [TextPositionRange](xref:ActiproSoftware.Text.TextPositionRange) and indicates if it should be a block or continuous stream selection. The second overload is for supporting multiple selection ranges.
152+
153+
This code uses a [TextPositionRange](xref:ActiproSoftware.Text.TextPositionRange) value in variable `selectionPositionRange` to indicate what the final editor view selection should become after the text change is applied:
154+
155+
```csharp
156+
change.PostSelectionPositionRanges = TextPositionRange.CreateCollection(selectionPositionRange, isBlock: false)
157+
```
158+
147159
### Applying the Text Change
148160

149161
Finally, when you have completely constructed the text change, call its [Apply](xref:ActiproSoftware.Text.ITextChange.Apply*) method to perform the text change on the document.

Documentation/topics/syntaxeditor/user-interface/editor-view/overlay-panes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ Pressing keys like <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd>, which nor
3333
To prevent these keys (or any other key combination) from reaching the `SyntaxEditor` control, override the overlay pane control's `OnKeyDown` method and set `KeyEventArgs.Handled = true`.
3434

3535
> [!TIP]
36-
> The [OverlayPaneBase](xref:@ActiproUIRoot.Controls.SyntaxEditor.OverlayPaneBase) control has built-in support for handling key presses. By default, <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> will be handled and used to move keyboard focus. Override the [OnMoveFocus](xref:@ActiproUIRoot.Controls.SyntaxEditor.OverlayPaneBase.OnMoveFocus) method to customize which elements receive focus. Set [AllowTabKeyToMoveFocus](xref:@ActiproUIRoot.Controls.SyntaxEditor.OverlayPaneBase.AllowTabKeyToMoveFocus) = `false` to disable the automatic handling of these keys.
36+
> The [OverlayPaneBase](xref:@ActiproUIRoot.Controls.SyntaxEditor.Implementation.OverlayPaneBase) control has built-in support for handling key presses. By default, <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> will be handled and used to move keyboard focus. Override the [OnMoveFocus](xref:@ActiproUIRoot.Controls.SyntaxEditor.Implementation.OverlayPaneBase.OnMoveFocus*) method to customize which elements receive focus. Set [AllowTabKeyToMoveFocus](xref:@ActiproUIRoot.Controls.SyntaxEditor.Implementation.OverlayPaneBase.AllowTabKeyToMoveFocus) = `false` to disable the automatic handling of these keys.
3737
>
38-
>To customize the handling of additional keys, override the [ProcessKeyDown](xref:@ActiproUIRoot.Controls.SyntaxEditor.OverlayPaneBase.ProcessKeyDown) method and return `true` for any keys that were handled by the overlay pane.
38+
>To customize the handling of additional keys, override the [ProcessKeyDown](xref:@ActiproUIRoot.Controls.SyntaxEditor.Implementation.OverlayPaneBase.ProcessKeyDown*) method and return `true` for any keys that were handled by the overlay pane.
3939
4040
}
4141

Documentation/topics/syntaxeditor/user-interface/searching/search-overlay-pane.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Search results can be highlighted as the find text and other search options are
126126

127127
The search overlay pane animates to be semi-transparent when the <kbd>Ctrl</kbd> key is held down, thereby allowing the end user to see the text behind it. [SearchOverlayPane](xref:@ActiproUIRoot.Controls.SyntaxEditor.Primitives.SearchOverlayPane).[ControlKeyDownOpacity](xref:@ActiproUIRoot.Controls.SyntaxEditor.Primitives.SearchOverlayPane.ControlKeyDownOpacity) property specifies the opacity when the popup is semi-transparent.
128128

129-
Set this property to `1.0` to prevent the list from being semi-transparent.
129+
Set this property to `1.0` to prevent the pane from being semi-transparent.
130130

131131
## Programmatically Opening the Pane
132132

Samples/SampleBrowser/ProductSamples/DockingSamples/Demo/DockingFeatures/MainForm.cs

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ public MainForm() {
3434
//
3535
InitializeComponent();
3636

37+
#if NETFRAMEWORK
38+
// 11/15/2023 - Workaround for issue detected on Win11 23H2 (OS Build 22635.2700) where the 'resize' event of the panel
39+
// that contains these property grids was not being raised and, as a result, the property grid layout was incorrect until
40+
// they were resized. Could not reproduce on Win11 22H2. Issue was not present on "netcoreapp3.1" or "net6.0-windows".
41+
ResizeDockManagerPropertyGrid();
42+
ResizeToolWindowPropertyGrid();
43+
#endif
44+
3745
// Select the first item
3846
if (toolWindowPropertyGridComboBox.Items.Count > 0)
3947
toolWindowPropertyGridComboBox.SelectedIndex = 0;
@@ -353,16 +361,7 @@ private void dockManagerPropertyGridComboBox_SelectedIndexChanged(object sender,
353361
/// <param name="sender">Sender of the event.</param>
354362
/// <param name="e">Event arguments.</param>
355363
private void dockManagerPropertyGridPanel_Resize(object sender, EventArgs e) {
356-
dockManagerPropertyGrid.SuspendLayout();
357-
358-
// Reset the Anchor that is only used to keep designer layout consistent
359-
dockManagerPropertyGrid.Anchor = AnchorStyles.None;
360-
361-
// Set the size/location of the PropertyGrid to be 1px bigger than the containing panel so the PropertyGrid border is not visible
362-
dockManagerPropertyGrid.Location = new Point(-1, -1);
363-
dockManagerPropertyGrid.Size = new Size(dockManagerPropertyGridPanel.Width + 2, dockManagerPropertyGridPanel.Height + 2);
364-
365-
dockManagerPropertyGrid.ResumeLayout();
364+
ResizeDockManagerPropertyGrid();
366365
}
367366

368367
/// <summary>
@@ -731,16 +730,7 @@ private void toolWindowPropertyGridComboBox_SelectedIndexChanged(object sender,
731730
/// <param name="sender">Sender of the event.</param>
732731
/// <param name="e">Event arguments.</param>
733732
private void toolWindowPropertyGridPanel_Resize(object sender, EventArgs e) {
734-
toolWindowPropertyGrid.SuspendLayout();
735-
736-
// Reset the Anchor that is only used to keep designer layout consistent
737-
toolWindowPropertyGrid.Anchor = AnchorStyles.None;
738-
739-
// Set the size/location of the PropertyGrid to be 1px bigger than the containing panel so the PropertyGrid border is not visible
740-
toolWindowPropertyGrid.Location = new Point(-1, -1);
741-
toolWindowPropertyGrid.Size = new Size(toolWindowPropertyGridPanel.Width + 2, toolWindowPropertyGridPanel.Height + 2);
742-
743-
toolWindowPropertyGrid.ResumeLayout();
733+
ResizeToolWindowPropertyGrid();
744734
}
745735

746736
/// <summary>
@@ -1560,6 +1550,27 @@ private bool PromptSaveDocument(DocumentWindow document) {
15601550
return true;
15611551
}
15621552

1553+
private void ResizeDockManagerPropertyGrid() {
1554+
ResizePropertyGridWithinPanel(dockManagerPropertyGrid, dockManagerPropertyGridPanel);
1555+
}
1556+
1557+
private void ResizeToolWindowPropertyGrid() {
1558+
ResizePropertyGridWithinPanel(toolWindowPropertyGrid, toolWindowPropertyGridPanel);
1559+
}
1560+
1561+
private void ResizePropertyGridWithinPanel(PropertyGrid propertyGrid, Panel panel) {
1562+
propertyGrid.SuspendLayout();
1563+
1564+
// Reset the Anchor that is only used to keep designer layout consistent
1565+
propertyGrid.Anchor = AnchorStyles.None;
1566+
1567+
// Set the size/location of the PropertyGrid to be 1px bigger than the containing panel so the PropertyGrid border is not visible
1568+
propertyGrid.Location = new Point(-1, -1);
1569+
propertyGrid.Size = new Size(panel.Width + 2, panel.Height + 2);
1570+
1571+
propertyGrid.ResumeLayout();
1572+
}
1573+
15631574
/// <summary>
15641575
/// Update the border styles of child controls.
15651576
/// </summary>

Samples/SampleBrowser/ProductSamples/SyntaxEditorSamples/QuickStart/DocumentSwapping/MainControl.Designer.cs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Samples/SampleBrowser/ProductSamples/SyntaxEditorSamples/QuickStart/IntelliPromptCompletionCustomActions/CustomCompletionProvider.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ private void OnSessionCommitting(object sender, CancelEventArgs e) {
4949
e.Cancel = true;
5050

5151
// Show a messagebox instead
52-
MessageBox.Show("Show a dialog for building a URL here. Note that auto-complete was cancelled in code-behind.", "URL Builder", MessageBoxButtons.OK, MessageBoxIcon.Information);
52+
var owner = session.View?.SyntaxEditor?.FindForm();
53+
MessageBox.Show(owner, "Show a dialog for building a URL here. Note that auto-complete was cancelled in code-behind.", "URL Builder", MessageBoxButtons.OK, MessageBoxIcon.Information);
5354
}
5455
}
5556
}

Samples/SampleBrowser/ProductSamples/SyntaxEditorSamples/QuickStart/SearchResultHighlighting/MainControl.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,29 @@ public MainControl() {
3232

3333
// Refresh highlights
3434
this.RefreshHighlights();
35+
36+
// Listen for changes in the active view so highlights can be moved
37+
editor.ActiveViewChanged += this.OnEditorActiveViewChanged;
3538
}
3639

3740
/////////////////////////////////////////////////////////////////////////////////////////////////////
3841
// NON-PUBLIC PROCEDURES
3942
/////////////////////////////////////////////////////////////////////////////////////////////////////
4043

44+
/// <summary>
45+
/// Occurs when the active view in the editor is changed.
46+
/// </summary>
47+
/// <param name="sender">The sender of the event.</param>
48+
/// <param name="e">A <see cref="EditorViewChangedEventArgs"/> that contains the event data.</param>
49+
private void OnEditorActiveViewChanged(object sender, EditorViewChangedEventArgs e) {
50+
// Clear search options from the inactive view
51+
if (e.OldValue != null)
52+
e.OldValue.HighlightedResultSearchOptions = null;
53+
54+
// Apply highlights to the newly active view
55+
RefreshHighlights();
56+
}
57+
4158
/// <summary>
4259
/// Occurs when the control becomes the active control on the form.
4360
/// </summary>

Samples/SampleBrowser/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
//
3030
// You can specify all the values or you can default the Build and Revision Numbers
3131
// by using the '*' as shown below:
32-
[assembly: AssemblyVersion("23.1.2.0")]
33-
[assembly: AssemblyInformationalVersion("23.1.2.0 - 20230403")]
32+
[assembly: AssemblyVersion("23.1.3.0")]
33+
[assembly: AssemblyInformationalVersion("23.1.3.0 - 20230911")]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ActiproSoftware.Products.ActiproLicenseToken, ActiproSoftware.Shared.WinForms, Version=23.1.2.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763
1+
ActiproSoftware.Products.ActiproLicenseToken, ActiproSoftware.Shared.WinForms, Version=23.1.3.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763

0 commit comments

Comments
 (0)