Various updates.
This commit is contained in:
76
Harmonia.WinUI/Flex/IFlexView.cs
Normal file
76
Harmonia.WinUI/Flex/IFlexView.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Harmonia.WinUI.Flex;
|
||||
|
||||
public interface IFlexView
|
||||
{
|
||||
FlexLayout Layout { get; }
|
||||
int ImageWidth { get; }
|
||||
FlexOrientation ListOrientation { get; }
|
||||
int RowSpacing { get; }
|
||||
int ColumnSpacing { get; }
|
||||
int TextLineHeight { get; }
|
||||
FlexOrientation SubtitleFooterOrientation { get; }
|
||||
int SubtitleFooterMargin { get; }
|
||||
FlexOrientation ImageToTextOrientation { get; }
|
||||
int TitleFontSize { get; }
|
||||
int SubtitleFontSize { get; }
|
||||
int FooterFontSize { get; }
|
||||
}
|
||||
|
||||
public abstract class GridFlexViewBase : IFlexView
|
||||
{
|
||||
public FlexLayout Layout => FlexLayout.Grid;
|
||||
public FlexOrientation ListOrientation => FlexOrientation.Horizontal;
|
||||
public FlexOrientation SubtitleFooterOrientation => FlexOrientation.Vertical;
|
||||
public FlexOrientation ImageToTextOrientation => FlexOrientation.Vertical;
|
||||
|
||||
public abstract int ImageWidth { get; }
|
||||
public abstract int RowSpacing { get; }
|
||||
public abstract int ColumnSpacing { get; }
|
||||
public abstract int TextLineHeight { get; }
|
||||
public abstract int SubtitleFooterMargin { get; }
|
||||
public abstract int TitleFontSize { get; }
|
||||
public abstract int SubtitleFontSize { get; }
|
||||
public abstract int FooterFontSize { get; }
|
||||
}
|
||||
|
||||
public abstract class ListFlexViewBase : IFlexView
|
||||
{
|
||||
public FlexLayout Layout => FlexLayout.List;
|
||||
public FlexOrientation ListOrientation => FlexOrientation.Vertical;
|
||||
public FlexOrientation SubtitleFooterOrientation => FlexOrientation.Vertical;
|
||||
public FlexOrientation ImageToTextOrientation => FlexOrientation.Vertical;
|
||||
|
||||
public abstract int ImageWidth { get; }
|
||||
|
||||
public abstract int RowSpacing { get; }
|
||||
|
||||
public abstract int ColumnSpacing { get; }
|
||||
|
||||
public abstract int TextLineHeight { get; }
|
||||
|
||||
public abstract int SubtitleFooterMargin { get; }
|
||||
|
||||
public abstract int TitleFontSize { get; }
|
||||
|
||||
public abstract int SubtitleFontSize { get; }
|
||||
|
||||
public abstract int FooterFontSize { get; }
|
||||
}
|
||||
|
||||
public enum FlexLayout
|
||||
{
|
||||
List,
|
||||
Grid
|
||||
}
|
||||
|
||||
public enum FlexOrientation
|
||||
{
|
||||
Horizontal,
|
||||
Vertical
|
||||
}
|
||||
Reference in New Issue
Block a user