mirror of
https://github.com/AtomUI/AtomUI.git
synced 2026-10-26 11:10:34 +08:00
Cleanup API
Change some public interfaces to Internal
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ using AtomUI.Theme.Language;
|
||||
|
||||
namespace AtomUI.Controls.ColorPickerLang
|
||||
{
|
||||
public static class ColorPickerLangResourceKey
|
||||
internal static class ColorPickerLangResourceKey
|
||||
{
|
||||
public static readonly LanguageResourceKey EmptyColorText = new LanguageResourceKey("ColorPicker.EmptyColorText", "AtomUI.Lang");
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using AtomUI.Theme.Language;
|
||||
namespace AtomUI.Controls.ColorPickerLang;
|
||||
|
||||
[LanguageProvider(LanguageCode.en_US, ColorPickerToken.ID)]
|
||||
public class en_US : LanguageProvider
|
||||
internal class en_US : LanguageProvider
|
||||
{
|
||||
public const string EmptyColorText = "Transparent";
|
||||
}
|
||||
@@ -3,7 +3,7 @@ using AtomUI.Theme.Language;
|
||||
namespace AtomUI.Controls.ColorPickerLang;
|
||||
|
||||
[LanguageProvider(LanguageCode.zh_CN, ColorPickerToken.ID)]
|
||||
public class zh_CN : LanguageProvider
|
||||
internal class zh_CN : LanguageProvider
|
||||
{
|
||||
public const string EmptyColorText = "无色";
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@ using AtomUI.Theme.Language;
|
||||
|
||||
namespace AtomUI.Controls.DataGridLocalization
|
||||
{
|
||||
public static class DataGridLangResourceKey
|
||||
internal static class DataGridLangResourceKey
|
||||
{
|
||||
public static readonly LanguageResourceKey AscendTooltip = new LanguageResourceKey("DataGrid.AscendTooltip", "AtomUI.Lang");
|
||||
public static readonly LanguageResourceKey CancelConfirmText = new LanguageResourceKey("DataGrid.CancelConfirmText", "AtomUI.Lang");
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Avalonia.Data.Converters;
|
||||
|
||||
namespace AtomUI.Controls.Converters;
|
||||
|
||||
public class DataGridPaginationVisibilityConvertor : IValueConverter
|
||||
internal class DataGridPaginationVisibilityConvertor : IValueConverter
|
||||
{
|
||||
public bool IsTop { get; set; }
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace AtomUI.Controls.Themes;
|
||||
|
||||
public static class AddOnDecoratedBoxThemeConstants
|
||||
internal static class AddOnDecoratedBoxThemeConstants
|
||||
{
|
||||
public const string MainLayoutPart = "PART_MainLayout";
|
||||
public const string LeftAddOnPart = "PART_LeftAddOn";
|
||||
@@ -9,4 +9,16 @@ public static class AddOnDecoratedBoxThemeConstants
|
||||
|
||||
public const int NormalZIndex = 1000;
|
||||
public const int ActivatedZIndex = 2000;
|
||||
}
|
||||
|
||||
internal static class AddOnDecoratedInnerBoxThemeConstants
|
||||
{
|
||||
public const string MainLayoutPart = "PART_MainLayout";
|
||||
public const string ContentPresenterPart = "PART_ContentPresenter";
|
||||
public const string LeftAddOnPart = "PART_LeftAddOn";
|
||||
public const string RightAddOnPart = "PART_RightAddOn";
|
||||
public const string LeftAddOnLayoutPart = "PART_LeftAddOnLayout";
|
||||
public const string RightAddOnLayoutPart = "PART_RightAddOnLayout";
|
||||
public const string ClearButtonPart = "PART_ClearButton";
|
||||
public const string InnerBoxDecoratorPart = "PART_InnerBoxDecorator";
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace AtomUI.Controls.Themes;
|
||||
|
||||
public static class AddOnDecoratedInnerBoxThemeConstants
|
||||
{
|
||||
public const string MainLayoutPart = "PART_MainLayout";
|
||||
public const string ContentPresenterPart = "PART_ContentPresenter";
|
||||
public const string LeftAddOnPart = "PART_LeftAddOn";
|
||||
public const string RightAddOnPart = "PART_RightAddOn";
|
||||
public const string LeftAddOnLayoutPart = "PART_LeftAddOnLayout";
|
||||
public const string RightAddOnLayoutPart = "PART_RightAddOnLayout";
|
||||
public const string ClearButtonPart = "PART_ClearButton";
|
||||
public const string InnerBoxDecoratorPart = "PART_InnerBoxDecorator";
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace AtomUI.Controls.Themes;
|
||||
|
||||
public static class AlertThemeConstants
|
||||
internal static class AlertThemeConstants
|
||||
{
|
||||
public const string CloseBtnPart = "PART_CloseBtn";
|
||||
public const string InfoIconPart = "PART_InfoIcon";
|
||||
|
||||
@@ -2,6 +2,6 @@ using Avalonia.Styling;
|
||||
|
||||
namespace AtomUI.Controls.Themes;
|
||||
|
||||
public class ArrowDecoratedBoxTheme : ControlTheme
|
||||
internal class ArrowDecoratedBoxTheme : ControlTheme
|
||||
{
|
||||
}
|
||||
@@ -2,6 +2,6 @@ using AtomUI.Theme;
|
||||
|
||||
namespace AtomUI.Controls;
|
||||
|
||||
public class AtomUIOSSControlThemesProvider : ControlThemesProvider
|
||||
internal class AtomUIOSSControlThemesProvider : ControlThemesProvider
|
||||
{
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using Avalonia.Data.Converters;
|
||||
|
||||
namespace AtomUI.Controls.Utils;
|
||||
|
||||
public class ButtonIconVisibleConverter : IMultiValueConverter
|
||||
internal class ButtonIconVisibleConverter : IMultiValueConverter
|
||||
{
|
||||
public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,6 @@ using Avalonia.Styling;
|
||||
|
||||
namespace AtomUI.Controls.Themes;
|
||||
|
||||
public class CalendarButtonTheme : ControlTheme
|
||||
internal class CalendarButtonTheme : ControlTheme
|
||||
{
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public record CustomDialogPlacement
|
||||
|
||||
public Size DialogSize { get; }
|
||||
public Visual Target { get; }
|
||||
public DialogPositionerConstraintAdjustment ConstraintAdjustment { get; set; }
|
||||
internal DialogPositionerConstraintAdjustment ConstraintAdjustment { get; set; }
|
||||
public Rect AnchorRectangle { get; set; }
|
||||
|
||||
internal CustomDialogPlacement(Size size, Visual target)
|
||||
|
||||
@@ -2,7 +2,7 @@ using Avalonia;
|
||||
|
||||
namespace AtomUI.Controls.DialogPositioning;
|
||||
|
||||
public record struct DialogPositionerParameters
|
||||
internal record struct DialogPositionerParameters
|
||||
{
|
||||
public Rect AnchorRectangle { get; set; }
|
||||
public double HorizontalOffset { get; set; }
|
||||
@@ -11,7 +11,7 @@ public record struct DialogPositionerParameters
|
||||
public DialogPositionerConstraintAdjustment ConstraintAdjustment { get; set; }
|
||||
}
|
||||
|
||||
public interface IDialogPositioner
|
||||
internal interface IDialogPositioner
|
||||
{
|
||||
void Update(DialogPositionerParameters parameters);
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@ using Avalonia;
|
||||
|
||||
namespace AtomUI.Controls.DialogPositioning;
|
||||
|
||||
public interface IManagedDialogPositionerDialog
|
||||
internal interface IManagedDialogPositionerDialog
|
||||
{
|
||||
IReadOnlyList<ManagedDialogPositionerScreenInfo> ScreenInfos { get; }
|
||||
Rect ParentClientAreaScreenGeometry { get; }
|
||||
void Move(Point devicePoint);
|
||||
}
|
||||
|
||||
public class ManagedDialogPositionerScreenInfo
|
||||
internal class ManagedDialogPositionerScreenInfo
|
||||
{
|
||||
public Rect Bounds { get; }
|
||||
public Rect WorkingArea { get; }
|
||||
@@ -22,7 +22,7 @@ public class ManagedDialogPositionerScreenInfo
|
||||
}
|
||||
}
|
||||
|
||||
public class ManagedDialogPositioner : IDialogPositioner
|
||||
internal class ManagedDialogPositioner : IDialogPositioner
|
||||
{
|
||||
private readonly IManagedDialogPositionerDialog _dialog;
|
||||
|
||||
|
||||
+6
-6
@@ -3,7 +3,7 @@ using AtomUI.Theme.Language;
|
||||
|
||||
namespace AtomUI.Controls.DatePickerLang
|
||||
{
|
||||
public static class DatePickerLangResourceKey
|
||||
internal static class DatePickerLangResourceKey
|
||||
{
|
||||
public static readonly LanguageResourceKey Now = new LanguageResourceKey("DatePicker.Now", "AtomUI.Lang");
|
||||
public static readonly LanguageResourceKey Today = new LanguageResourceKey("DatePicker.Today", "AtomUI.Lang");
|
||||
@@ -12,7 +12,7 @@ namespace AtomUI.Controls.DatePickerLang
|
||||
|
||||
namespace AtomUI.Controls.DialogLang
|
||||
{
|
||||
public static class DialogLangResourceKey
|
||||
internal static class DialogLangResourceKey
|
||||
{
|
||||
public static readonly LanguageResourceKey Abort = new LanguageResourceKey("Dialog.Abort", "AtomUI.Lang");
|
||||
public static readonly LanguageResourceKey Apply = new LanguageResourceKey("Dialog.Apply", "AtomUI.Lang");
|
||||
@@ -38,7 +38,7 @@ namespace AtomUI.Controls.DialogLang
|
||||
|
||||
namespace AtomUI.Controls.Localization
|
||||
{
|
||||
public static class CommonLangResourceKey
|
||||
internal static class CommonLangResourceKey
|
||||
{
|
||||
public static readonly LanguageResourceKey Cancel = new LanguageResourceKey("Common.Cancel", "AtomUI.Lang");
|
||||
public static readonly LanguageResourceKey Delete = new LanguageResourceKey("Common.Delete", "AtomUI.Lang");
|
||||
@@ -51,7 +51,7 @@ namespace AtomUI.Controls.Localization
|
||||
|
||||
namespace AtomUI.Controls.PaginationLang
|
||||
{
|
||||
public static class PaginationLangResourceKey
|
||||
internal static class PaginationLangResourceKey
|
||||
{
|
||||
public static readonly LanguageResourceKey JumpToText = new LanguageResourceKey("Pagination.JumpToText", "AtomUI.Lang");
|
||||
public static readonly LanguageResourceKey PageText = new LanguageResourceKey("Pagination.PageText", "AtomUI.Lang");
|
||||
@@ -61,7 +61,7 @@ namespace AtomUI.Controls.PaginationLang
|
||||
|
||||
namespace AtomUI.Controls.PopupConfirmLang
|
||||
{
|
||||
public static class PopupConfirmLangResourceKey
|
||||
internal static class PopupConfirmLangResourceKey
|
||||
{
|
||||
public static readonly LanguageResourceKey Cancel = new LanguageResourceKey("PopupConfirm.Cancel", "AtomUI.Lang");
|
||||
public static readonly LanguageResourceKey Ok = new LanguageResourceKey("PopupConfirm.Ok", "AtomUI.Lang");
|
||||
@@ -70,7 +70,7 @@ namespace AtomUI.Controls.PopupConfirmLang
|
||||
|
||||
namespace AtomUI.Controls.TimePickerLang
|
||||
{
|
||||
public static class TimePickerLangResourceKey
|
||||
internal static class TimePickerLangResourceKey
|
||||
{
|
||||
public static readonly LanguageResourceKey AMText = new LanguageResourceKey("TimePicker.AMText", "AtomUI.Lang");
|
||||
public static readonly LanguageResourceKey Now = new LanguageResourceKey("TimePicker.Now", "AtomUI.Lang");
|
||||
|
||||
@@ -4,7 +4,7 @@ using Avalonia.Data.Converters;
|
||||
|
||||
namespace AtomUI.Controls.Utils;
|
||||
|
||||
public class ToggleItemsLayoutVisibleConverter : IMultiValueConverter
|
||||
internal class ToggleItemsLayoutVisibleConverter : IMultiValueConverter
|
||||
{
|
||||
public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ using Avalonia.Data.Converters;
|
||||
|
||||
namespace AtomUI.Controls.Utils;
|
||||
|
||||
public class MarginMultiplierConverter : IMultiValueConverter
|
||||
internal class MarginMultiplierConverter : IMultiValueConverter
|
||||
{
|
||||
public bool Left { get; set; } = false;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace AtomUI.Controls.Themes;
|
||||
|
||||
public static class PaginationThemeConstants
|
||||
internal static class PaginationThemeConstants
|
||||
{
|
||||
public const string RootLayoutPart = "PART_RootLayout";
|
||||
public const string NavPart = "PART_Nav";
|
||||
@@ -9,20 +9,20 @@ public static class PaginationThemeConstants
|
||||
public const string TotalInfoPresenterPart = "PART_TotalInfoPresenter";
|
||||
}
|
||||
|
||||
public static class PaginationNavItemThemeConstants
|
||||
internal static class PaginationNavItemThemeConstants
|
||||
{
|
||||
public const string RootLayoutPart = "PART_RootLayoutPart";
|
||||
public const string MainFramePart = "PART_MainFrame";
|
||||
public const string ContentPart = "PART_Content";
|
||||
}
|
||||
|
||||
public static class PaginationNavThemeConstants
|
||||
internal static class PaginationNavThemeConstants
|
||||
{
|
||||
public const string FramePart = "PART_Frame";
|
||||
public const string ItemsPresenterPart = "PART_ItemsPresenter";
|
||||
}
|
||||
|
||||
public static class PaginationQuickJumperBarThemeConstants
|
||||
internal static class PaginationQuickJumperBarThemeConstants
|
||||
{
|
||||
public const string RootLayoutPart = "PART_RootLayout";
|
||||
public const string JumpToContentPresenterPart = "PART_JumpToContentPresenter";
|
||||
@@ -30,7 +30,7 @@ public static class PaginationQuickJumperBarThemeConstants
|
||||
public const string PageLineEditPart = "PART_PageLineEdit";
|
||||
}
|
||||
|
||||
public static class SimplePaginationThemeConstants
|
||||
internal static class SimplePaginationThemeConstants
|
||||
{
|
||||
public const string RootLayoutPart = "PART_RootLayoutPart";
|
||||
public const string PreviousNavItemPart = "PART_PreviousNavItem";
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
namespace AtomUI.Controls.Primitives.Themes;
|
||||
|
||||
public static class InfoPickerInputThemeConstants
|
||||
internal static class InfoPickerInputThemeConstants
|
||||
{
|
||||
public const string DecoratedBoxPart = "PART_DecoratedBox";
|
||||
public const string PickerInnerPart = "PART_PickerInner";
|
||||
@@ -8,13 +8,13 @@ public static class InfoPickerInputThemeConstants
|
||||
public const string ClearUpButtonPart = "PART_ClearUpButton";
|
||||
}
|
||||
|
||||
public static class PickerClearUpButtonThemeConstants
|
||||
internal static class PickerClearUpButtonThemeConstants
|
||||
{
|
||||
public const string ClearButtonPart = "PART_ClearButton";
|
||||
public const string InfoIconPresenterPart = "PART_InfoIconPresenter";
|
||||
}
|
||||
|
||||
public static class RangeInfoPickerInputThemeConstants
|
||||
internal static class RangeInfoPickerInputThemeConstants
|
||||
{
|
||||
public const string SecondaryInfoInputBoxPart = "PART_SecondaryInfoInputBox";
|
||||
public const string RangePickerArrowPart = "PART_RangePickerArrow";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace AtomUI.Controls.Themes;
|
||||
|
||||
public static class TagThemeConstants
|
||||
internal static class TagThemeConstants
|
||||
{
|
||||
public const string ElementsLayoutPart = "PART_ElementsLayout";
|
||||
public const string FramePart = "PART_Frame";
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
namespace AtomUI.Controls.Themes;
|
||||
|
||||
public static class TransitioningContentControlThemeConstants
|
||||
internal static class TransitioningContentControlThemeConstants
|
||||
{
|
||||
public const string ContentPresenterPart = "PART_ContentPresenter";
|
||||
public const string ContentPresenter2Part = "PART_ContentPresenter2";
|
||||
|
||||
@@ -4,14 +4,14 @@ using Avalonia.LogicalTree;
|
||||
|
||||
namespace AtomUI.Controls.Utils;
|
||||
|
||||
public static class TemplatedControlUtils
|
||||
internal static class TemplatedControlUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets the TemplatedParent property for the created template children.
|
||||
/// </summary>
|
||||
/// <param name="control">The control.</param>
|
||||
/// <param name="templatedParent">The templated parent to apply.</param>
|
||||
internal static void ApplyTemplatedParent(StyledElement control, AvaloniaObject? templatedParent)
|
||||
/// <summary>
|
||||
/// Sets the TemplatedParent property for the created template children.
|
||||
/// </summary>
|
||||
/// <param name="control">The control.</param>
|
||||
/// <param name="templatedParent">The templated parent to apply.</param>
|
||||
public static void ApplyTemplatedParent(StyledElement control, AvaloniaObject? templatedParent)
|
||||
{
|
||||
control.SetTemplatedParent(templatedParent);
|
||||
var logicalChildren = control.GetLogicalChildren();
|
||||
|
||||
@@ -56,7 +56,7 @@ public class LangResourceKeyClassSourceWriter
|
||||
{
|
||||
var modifiers = new List<SyntaxToken>
|
||||
{
|
||||
SyntaxFactory.Token(SyntaxKind.PublicKeyword),
|
||||
SyntaxFactory.Token(SyntaxKind.InternalKeyword),
|
||||
SyntaxFactory.Token(SyntaxKind.StaticKeyword)
|
||||
};
|
||||
var classSyntax = SyntaxFactory.ClassDeclaration(className)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
public interface IControlThemeProvider
|
||||
{
|
||||
public object Key { get; }
|
||||
public Type TargetType { get; }
|
||||
object Key { get; }
|
||||
Type TargetType { get; }
|
||||
|
||||
public BaseControlTheme BuildControlTheme();
|
||||
BaseControlTheme BuildControlTheme();
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace AtomUI.Theme.TokenSystem;
|
||||
|
||||
public class ControlTokenConfigInfo
|
||||
internal class ControlTokenConfigInfo
|
||||
{
|
||||
public bool EnableAlgorithm { get; set; } = false;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using Avalonia;
|
||||
|
||||
namespace AtomUI.Theme.Utils;
|
||||
|
||||
public static class BorderUtils
|
||||
internal static class BorderUtils
|
||||
{
|
||||
public static Thickness BuildRenderScaleAwareThickness(in Thickness borderThickness, double renderScaling)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user