tmozIIdManager Interface Reference

Id manager. More...

List of all members.

Public Member Functions

long addId (in long category, in AString idName, in long importance)
 Add new id.
long getId (in long category, in AString idName)
 Return id for name.
boolean hasId (in long category, in AString idName)
 Check if id exists.
void removeId (in long category, in AString idName)
 Remove id.
long getIconId (in AString idName)
 Icon ID.
void duplicateIcon (in AString sourceCommandID, in AString targetCommandID)
 Add icon to the command.
void addIconFromFile (in long commandId, in AString aUrl)
 Add icon from the file.

Public Attributes

const long CAT_TOOLBAR = 1
 Category type: Toolbar.
const long CAT_DIALOGBAR = 2
 Category type: Dialogbar.
const long CAT_COMMAND_MAIN = 3
 Category type: main command.
const long CAT_COMMAND_VIEW = 4
 Category type: view command.


Detailed Description

Id manager.

Manager is responsible for command id translation.


Member Function Documentation

void addIconFromFile ( in long  commandId,
in AString  aUrl 
)

Add icon from the file.

Add new icon to the manager

Parameters:
commandId Command ID
aUrl icon URL
Returns:
Function throw exception if failed to load icon.

long addId ( in long  category,
in AString  idName,
in long  importance 
)

Add new id.

Add new id to the manager.

Parameters:
category Category of the ID
idName name of the id
importance Importance of the id
Returns:
Return id.

void duplicateIcon ( in AString  sourceCommandID,
in AString  targetCommandID 
)

Add icon to the command.

Associate existing icon with the command

Parameters:
sourceCommandID id of source command with icon
targetCommandID id of target command name
Note:
Function throw exception/return error if icon does not exists.

long getIconId ( in AString  idName  ) 

Icon ID.

Return id of the corresponding icon

Parameters:
idName Name of the command
Returns:
Return icon ID. Throw exception if icon not found.

long getId ( in long  category,
in AString  idName 
)

Return id for name.

Function return id of the command.

Parameters:
category Category of command
  • CAT_TOOLBAR for toolbar
  • CAT_DIALOGBAR for dialogbar
  • CAT_COMMAND_MAIN for main command
  • CAT_COMMAND_VIEW for view command
idName string representation of command
Returns:
Return command id. Throw exception if command does not exists (return NS_ERROR_FAILURE).

boolean hasId ( in long  category,
in AString  idName 
)

Check if id exists.

Function check if given id exists.

Parameters:
category Category to check id
idName name of the command
Returns:
Return true if id exists. Return false if id does not exist.

void removeId ( in long  category,
in AString  idName 
)

Remove id.

Remove id from the manager.

Parameters:
category Category of the ID
idName name of the id


Generated on Wed Dec 15 09:54:21 2010 for Tahiti XPCOM API