C# Class DroidExplorer.Core.UI.SystemImageList

Summary description for SysImageList.
Inheritance: IDisposable
Show file Open project: camalot/droidexplorer Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Clears up any resources associated with the SystemImageList

Dispose ( bool disposing ) : void

Clears up any resources associated with the SystemImageList when disposing is true.

DrawImage ( IntPtr hdc, int index, int x, int y ) : void

Draws an image

DrawImage ( IntPtr hdc, int index, int x, int y, ImageListDrawItemConstants flags ) : void

Draws an image using the specified flags

DrawImage ( IntPtr hdc, int index, int x, int y, ImageListDrawItemConstants flags, int cx, int cy ) : void

Draws an image using the specified flags and specifies the size to clip to (or to stretch to if ILD_SCALE is provided).

DrawImage ( IntPtr hdc, int index, int x, int y, ImageListDrawItemConstants flags, int cx, int cy, Color foreColor, ImageListDrawStateConstants stateFlags, Color saturateColorOrAlpha, Color glowOrShadowColor ) : void

Draws an image using the specified flags and state on XP systems.

Icon ( int index ) : Icon

Returns a GDI+ copy of the icon from the ImageList at the specified index.

IconIndex ( string fileName ) : int

Return the index of the icon for the specified file, always using the cached version where possible.

IconIndex ( string fileName, bool forceLoadFromDisk ) : int

Returns the index of the icon for the specified file

IconIndex ( string fileName, bool forceLoadFromDisk, ShellIconStateConstants iconState ) : int

Returns the index of the icon for the specified file

SetImageList ( ListView listView, SystemImageList sysImageList, bool forStateImages ) : void
SetImageList ( TreeView tree, SystemImageList sysImageList, bool forStateImages ) : void
SystemImageList ( ) : System

Creates a Small Icons SystemImageList

SystemImageList ( SystemImageListSize size ) : System

Creates a SystemImageList with the specified size

Private Methods

Method Description
DestroyIcon ( IntPtr hIcon ) : int
FormatMessage ( int dwFlags, IntPtr lpSource, int dwMessageId, int dwLanguageId, string lpBuffer, uint nSize, int argumentsLong ) : int
GetLastError ( ) : int
ImageList_Draw ( IntPtr hIml, int i, IntPtr hdcDst, int x, int y, int fStyle ) : int
ImageList_DrawIndirect ( IMAGELISTDRAWPARAMS &pimldp ) : int
ImageList_GetIcon ( IntPtr himl, int i, int flags ) : IntPtr
ImageList_GetIconSize ( IntPtr himl, int &cx, int &cy ) : int
SHGetFileInfo ( string pszPath, int dwFileAttributes, SHFILEINFO &psfi, uint cbFileInfo, uint uFlags ) : IntPtr
SHGetImageList ( int iImageList, System.Guid &riid, IImageList &ppv ) : int
SHGetImageListHandle ( int iImageList, System.Guid &riid, IntPtr &handle ) : int
SendMessage ( IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam ) : IntPtr
SetImageListControl ( Control ctrl, SystemImageList sysImageList, bool forStateImages ) : void
create ( ) : void

Creates the SystemImageList

isXpOrAbove ( ) : bool

Determines if the system is running Windows XP or above

Method Details

Dispose() public method

Clears up any resources associated with the SystemImageList
public Dispose ( ) : void
return void

Dispose() public method

Clears up any resources associated with the SystemImageList when disposing is true.
public Dispose ( bool disposing ) : void
disposing bool Whether the object is being disposed
return void

DrawImage() public method

Draws an image
public DrawImage ( IntPtr hdc, int index, int x, int y ) : void
hdc System.IntPtr Device context to draw to
index int Index of image to draw
x int X Position to draw at
y int Y Position to draw at
return void

DrawImage() public method

Draws an image using the specified flags
public DrawImage ( IntPtr hdc, int index, int x, int y, ImageListDrawItemConstants flags ) : void
hdc System.IntPtr Device context to draw to
index int Index of image to draw
x int X Position to draw at
y int Y Position to draw at
flags ImageListDrawItemConstants Drawing flags
return void

DrawImage() public method

Draws an image using the specified flags and specifies the size to clip to (or to stretch to if ILD_SCALE is provided).
public DrawImage ( IntPtr hdc, int index, int x, int y, ImageListDrawItemConstants flags, int cx, int cy ) : void
hdc System.IntPtr Device context to draw to
index int Index of image to draw
x int X Position to draw at
y int Y Position to draw at
flags ImageListDrawItemConstants Drawing flags
cx int Width to draw
cy int Height to draw
return void

DrawImage() public method

Draws an image using the specified flags and state on XP systems.
public DrawImage ( IntPtr hdc, int index, int x, int y, ImageListDrawItemConstants flags, int cx, int cy, Color foreColor, ImageListDrawStateConstants stateFlags, Color saturateColorOrAlpha, Color glowOrShadowColor ) : void
hdc System.IntPtr Device context to draw to
index int Index of image to draw
x int X Position to draw at
y int Y Position to draw at
flags ImageListDrawItemConstants Drawing flags
cx int Width to draw
cy int Height to draw
foreColor Color Fore colour to blend with when using the /// ILD_SELECTED or ILD_BLEND25 flags
stateFlags ImageListDrawStateConstants State flags
saturateColorOrAlpha Color If stateFlags includes ILS_ALPHA, /// then the alpha component is applied to the icon. Otherwise if /// ILS_SATURATE is included, then the (R,G,B) components are used /// to saturate the image.
glowOrShadowColor Color If stateFlags include ILS_GLOW, then /// the colour to use for the glow effect. Otherwise if stateFlags includes /// ILS_SHADOW, then the colour to use for the shadow.
return void

Icon() public method

Returns a GDI+ copy of the icon from the ImageList at the specified index.
public Icon ( int index ) : Icon
index int The index to get the icon for
return System.Drawing.Icon

IconIndex() public method

Return the index of the icon for the specified file, always using the cached version where possible.
public IconIndex ( string fileName ) : int
fileName string Filename to get icon for
return int

IconIndex() public method

Returns the index of the icon for the specified file
public IconIndex ( string fileName, bool forceLoadFromDisk ) : int
fileName string Filename to get icon for
forceLoadFromDisk bool If True, then hit the disk to get the icon, /// otherwise only hit the disk if no cached icon is available.
return int

IconIndex() public method

Returns the index of the icon for the specified file
public IconIndex ( string fileName, bool forceLoadFromDisk, ShellIconStateConstants iconState ) : int
fileName string Filename to get icon for
forceLoadFromDisk bool If True, then hit the disk to get the icon, /// otherwise only hit the disk if no cached icon is available.
iconState ShellIconStateConstants Flags specifying the state of the icon /// returned.
return int

SetImageList() public static method

public static SetImageList ( ListView listView, SystemImageList sysImageList, bool forStateImages ) : void
listView System.Windows.Forms.ListView
sysImageList SystemImageList
forStateImages bool
return void

SetImageList() public static method

public static SetImageList ( TreeView tree, SystemImageList sysImageList, bool forStateImages ) : void
tree System.Windows.Forms.TreeView
sysImageList SystemImageList
forStateImages bool
return void

SystemImageList() public method

Creates a Small Icons SystemImageList
public SystemImageList ( ) : System
return System

SystemImageList() public method

Creates a SystemImageList with the specified size
public SystemImageList ( SystemImageListSize size ) : System
size SystemImageListSize Size of System ImageList
return System