76 lines
2.1 KiB
C#
76 lines
2.1 KiB
C#
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
|
|
} |