Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes
Silverstone.Manticore.Toolkit.ManticoreTreeView Class Reference
Inheritance diagram for Silverstone.Manticore.Toolkit.ManticoreTreeView:
Inheritance graph
[legend]
Collaboration diagram for Silverstone.Manticore.Toolkit.ManticoreTreeView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual bool ShouldBuild (CommandTarget aTarget)
int GetIconIndex (String aIconURL)
virtual int GetIconIndex (CommandTarget aCommandTarget)
 Client overrides to provide special Icons for the particular treeview.

Protected Attributes

Hashtable mImages = null
 Holds imageURL->imageIndex mapping of images.
int mImageCount = 0
 Number of images currently hashed (current image index)
Color mIconTransparentColor
 Transparent colour used in icons. We could be pedantic and allow this to come from the datastore, but this'll do for now.

Detailed Description

Definition at line 223 of file toolkit.menus.cs.


Member Function Documentation

Definition at line 246 of file toolkit.menus.cs.

    {
      if (aIconURL == "")
        return -1;

      if (mImages == null)
        mImages = new Hashtable();

      int key = aIconURL.GetHashCode();
      if (!mImages.ContainsKey(key)) 
      {
        if (ImageList == null) 
          ImageList = new ImageList();
        Console.WriteLine(mIconTransparentColor);
        try 
        {
          ImageList.Images.Add(Image.FromFile(aIconURL), mIconTransparentColor);
          mImages.Add(key, mImageCount);
        }
        catch (FileNotFoundException)
        {
          // If the file can't be found, don't add it to the list.
          return -1;
        }
        return mImageCount++;
      }
      else
        return (int) mImages[key];
    }

Client overrides to provide special Icons for the particular treeview.

Parameters:
aCommandTarget
Returns:

Definition at line 281 of file toolkit.menus.cs.

    {
      return -1;
    }

Definition at line 241 of file toolkit.menus.cs.

    {
      return true;
    }

Member Data Documentation

Transparent colour used in icons. We could be pedantic and allow this to come from the datastore, but this'll do for now.

Definition at line 239 of file toolkit.menus.cs.

Number of images currently hashed (current image index)

Definition at line 233 of file toolkit.menus.cs.

Holds imageURL->imageIndex mapping of images.

Definition at line 228 of file toolkit.menus.cs.


The documentation for this class was generated from the following file: