create an interface for GDIRenderer
This commit is contained in:
parent
c0e2529b20
commit
74450ee0a6
|
@ -566,6 +566,7 @@
|
||||||
<Compile Include="CoreFeatureAnalysis.Designer.cs">
|
<Compile Include="CoreFeatureAnalysis.Designer.cs">
|
||||||
<DependentUpon>CoreFeatureAnalysis.cs</DependentUpon>
|
<DependentUpon>CoreFeatureAnalysis.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="CustomControls\ControlRenderer\IControlRenderer.cs" />
|
||||||
<Compile Include="CustomControls\ExceptionBox.cs">
|
<Compile Include="CustomControls\ExceptionBox.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -575,7 +576,7 @@
|
||||||
<Compile Include="CustomControls\FolderBrowserDialogEx.cs">
|
<Compile Include="CustomControls\FolderBrowserDialogEx.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="CustomControls\GDIRenderer.cs" />
|
<Compile Include="CustomControls\ControlRenderer\GDIRenderer.cs" />
|
||||||
<Compile Include="CustomControls\HexTextBox.cs">
|
<Compile Include="CustomControls\HexTextBox.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,28 @@
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
|
||||||
|
namespace BizHawk.Client.EmuHawk.CustomControls
|
||||||
|
{
|
||||||
|
public interface IControlRenderer : IDisposable
|
||||||
|
{
|
||||||
|
IDisposable LockGraphics(Graphics g);
|
||||||
|
|
||||||
|
void StartOffScreenBitmap(int width, int height);
|
||||||
|
void EndOffScreenBitmap();
|
||||||
|
void CopyToScreen();
|
||||||
|
|
||||||
|
Size MeasureString(string str, Font font);
|
||||||
|
|
||||||
|
void SetBrush(Color color);
|
||||||
|
void SetSolidPen(Color color);
|
||||||
|
|
||||||
|
// TODO: use the Font version
|
||||||
|
void PrepDrawString(IntPtr hFont, Color color);
|
||||||
|
void DrawString(string str, Point point);
|
||||||
|
|
||||||
|
void DrawRectangle(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
|
||||||
|
void FillRectangle(int x, int y, int w, int h);
|
||||||
|
void DrawBitmap(Bitmap bitmap, Point point, bool blend = false);
|
||||||
|
void Line(int x1, int y1, int x2, int y2);
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,7 +15,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
// Row width is specified for horizontal orientation
|
// Row width is specified for horizontal orientation
|
||||||
public partial class InputRoll : Control
|
public partial class InputRoll : Control
|
||||||
{
|
{
|
||||||
private readonly GDIRenderer _gdi;
|
private readonly IControlRenderer _gdi;
|
||||||
private readonly SortedSet<Cell> _selectedItems = new SortedSet<Cell>(new SortCell());
|
private readonly SortedSet<Cell> _selectedItems = new SortedSet<Cell>(new SortCell());
|
||||||
|
|
||||||
private readonly VScrollBar _vBar;
|
private readonly VScrollBar _vBar;
|
||||||
|
|
Loading…
Reference in New Issue