Skip to content

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed

CefSharp.Core/Internals/CefBrowserHostWrapper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ void CefBrowserHostWrapper::ImeSetComposition(String^ text, cli::array<Compositi
499499
c.color = underline.Color;
500500
c.background_color = underline.BackgroundColor;
501501
c.thick = (int)underline.Thick;
502+
c.style = (cef_composition_underline_style_t)underline.Style;
502503
underlinesVector.push_back(c);
503504
}
504505
}

CefSharp/CefSharp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
<Compile Include="CdmRegistration.cs" />
105105
<Compile Include="DefaultApp.cs" />
106106
<Compile Include="DevToolsExtensions.cs" />
107+
<Compile Include="Enums\CompositionUnderlineStyle.cs" />
107108
<Compile Include="Enums\SchemeOptions.cs" />
108109
<Compile Include="Internals\CefThread.cs" />
109110
<Compile Include="Internals\IBrowserRefCounter.cs" />
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright © 2020 The CefSharp Authors. All rights reserved.
2+
//
3+
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4+
5+
namespace CefSharp.Enums
6+
{
7+
/// <summary>
8+
/// Composition underline style.
9+
/// </summary>
10+
public enum CompositionUnderlineStyle
11+
{
12+
/// <summary>
13+
/// Solid
14+
/// </summary>
15+
Solid,
16+
/// <summary>
17+
/// Dot
18+
/// </summary>
19+
Dot,
20+
/// <summary>
21+
/// Dash
22+
/// </summary>
23+
Dash,
24+
/// <summary>
25+
/// None
26+
/// </summary>
27+
None
28+
}
29+
}

CefSharp/Structs/CompositionUnderline.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//
33
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
44

5+
using CefSharp.Enums;
6+
57
namespace CefSharp.Structs
68
{
79
/// <summary>
@@ -30,6 +32,11 @@ public struct CompositionUnderline
3032
/// </summary>
3133
public bool Thick { get; private set; }
3234

35+
/// <summary>
36+
/// Style
37+
/// </summary>
38+
public CompositionUnderlineStyle Style { get; private set; }
39+
3340
/// <summary>
3441
/// Constructor.
3542
/// </summary>
@@ -47,6 +54,26 @@ public CompositionUnderline(Range range, uint color, uint backGroundColor, bool
4754
BackgroundColor = backGroundColor;
4855
Thick = thick;
4956
}
57+
58+
/// <summary>
59+
/// Constructor.
60+
/// </summary>
61+
/// <param name="range">Underline character range.</param>
62+
/// <param name="color">Text color. 32-bit ARGB color value, not premultiplied. The color components are always in a known order.
63+
/// Equivalent to the SkColor type.</param>
64+
/// <param name="backGroundColor">Background color. 32-bit ARGB color value, not premultiplied. The color components are always in
65+
/// a known order. Equivalent to the SkColor type.</param>
66+
/// <param name="thick">True for thickunderline.</param>
67+
/// <param name="style">Style</param>
68+
public CompositionUnderline(Range range, uint color, uint backGroundColor, bool thick, CompositionUnderlineStyle style)
69+
: this()
70+
{
71+
Range = range;
72+
Color = color;
73+
BackgroundColor = backGroundColor;
74+
Thick = thick;
75+
Style = style;
76+
}
5077
}
5178
}
5279

0 commit comments

Comments
 (0)