C# Class ARCed.Scintilla.Utilities

Show file Open project: borisblizzard/arcreator

Public Methods

Method Description
ColorToHtml ( Color c ) : string

Returns an HTML #XXXXXX format for a color. Unlike the ColorTranslator class it never returns named colors.

ColorToRgb ( Color c ) : int
GetKeys ( char c ) : Keys
GetKeys ( string s ) : Keys
GetMarkerMask ( IEnumerable markers ) : uint
GetMarkerMask ( IEnumerable markers ) : uint
GetZeroTerminatedBytes ( string text, Encoding encoding ) : byte[]
IntPtrToString ( Encoding encoding, IntPtr ptr ) : string
IntPtrToString ( Encoding encoding, IntPtr ptr, int length ) : string

Marshals an IntPtr pointing to un unmanaged byte[] to a .NET String using the given Encoding.

I'd love to have this as en extension method but ARCed.Scintilla's probably going to be 2.0 for a long time to come. There's nothing really compelling in later versions that applies to ARCed.Scintilla that can't be done with a 2.0 construct (extension methods, linq, etc)

RgbToColor ( int color ) : Color
SignedHiWord ( IntPtr hiWord ) : int
SignedLoWord ( IntPtr loWord ) : int

Method Details

ColorToHtml() public static method

Returns an HTML #XXXXXX format for a color. Unlike the ColorTranslator class it never returns named colors.
public static ColorToHtml ( Color c ) : string
c Color
return string

ColorToRgb() public static method

public static ColorToRgb ( Color c ) : int
c Color
return int

GetKeys() public static method

public static GetKeys ( char c ) : Keys
c char
return Keys

GetKeys() public static method

public static GetKeys ( string s ) : Keys
s string
return Keys

GetMarkerMask() public static method

public static GetMarkerMask ( IEnumerable markers ) : uint
markers IEnumerable
return uint

GetMarkerMask() public static method

public static GetMarkerMask ( IEnumerable markers ) : uint
markers IEnumerable
return uint

GetZeroTerminatedBytes() public static method

public static GetZeroTerminatedBytes ( string text, Encoding encoding ) : byte[]
text string
encoding System.Text.Encoding
return byte[]

IntPtrToString() public static method

public static IntPtrToString ( Encoding encoding, IntPtr ptr ) : string
encoding System.Text.Encoding
ptr System.IntPtr
return string

IntPtrToString() public static method

Marshals an IntPtr pointing to un unmanaged byte[] to a .NET String using the given Encoding.
I'd love to have this as en extension method but ARCed.Scintilla's probably going to be 2.0 for a long time to come. There's nothing really compelling in later versions that applies to ARCed.Scintilla that can't be done with a 2.0 construct (extension methods, linq, etc)
public static IntPtrToString ( Encoding encoding, IntPtr ptr, int length ) : string
encoding System.Text.Encoding
ptr System.IntPtr
length int
return string

RgbToColor() public static method

public static RgbToColor ( int color ) : Color
color int
return Color

SignedHiWord() public static method

public static SignedHiWord ( IntPtr hiWord ) : int
hiWord System.IntPtr
return int

SignedLoWord() public static method

public static SignedLoWord ( IntPtr loWord ) : int
loWord System.IntPtr
return int