engineManager

The engineManager class simplifies the access to the search engine manager.

Method overview

engineManager(in MozMillController controller);
close(in boolean saveChanges);
editKeyword(in string name, in func_ptr handler);
ElemBase getElement(in object spec);
getMoreSearchEngines();
moveDownEngine(in string name);
moveUpEngine(in string name);
removeEngine(in string name);
restoreDefaults();

Attributes

Attribute Type Description
controller MozMillController Mozmill controller of the search engine window. (Read only)
engines array of object Properties of each engine (engine.name, engine.keyword). (Read only)
selectedEngine string Name of the currently selected search engine.
selectedIndex
number
Index of the currently selected search engine.
suggestionsEnabled
boolean
Enabled status of search engine suggestions.

Methods

engineManager()

Constructor of the engineManager class.

engineManager(
  in MozMillController controller
);
Parameters
controller
MozMillController of the search engine manager dialog to operate on.
Return value

None.

close()

Close the search engine manager dialog.

close(
  in boolean saveChanges
);
Parameters
saveChanges
(Optional) If true the OK button is clicked otherwise Cancel.
Return value

None.

editKeyword()

Edit the keyword associated to a search engine.

editKeyword(
  in string name,
  in func_ptr handler
);
Parameters
name
Name of the search engine to remove.
handler
Callback function to execute when the search engine manager has been opened.
Return value

None.

getElement()

Retrieves an UI element based on the given spec object.

ElemBase getElement(
  in object spec
);
Parameters
spec
JSON object which specifies the element to retrieve. Use its attributes to specify the exact element. This example shows the correct usage.
spec.type  (string)
spec.subtype (string) spec.value (mixed) Description
"more_engines" -
-
Get the search engine element from the engine drop down.
"button"
"accept"
-
Get the "OK" button element.
"button"
"cancel"
-
Get the "Cancel" button element.
"button"
"extra2"
-
Get the "Restore Defaults" button element.
"engine_button" "down"
-
Get the "Down" button element.
"engine_button" "edit"
-
Get the "Edit" button element.
"engine_button" "remove"
-
Get the "Remove" button element.
"engine_button" "up"
-
Get the "Up" button element.
"engine_list" -
-
Get the engine tree element.
"suggest"
-
-
Get the search suggestions checkbox element.
Return value

ElemBase instance of the requested element which matches the specifications.

getMoreSearchEngines()

Automates the clicks on the "Get more search engines..." link.

getMoreSearchEngines();
Return value

None.

moveDownEngine()

Move down the engine with the given name.

moveDownEngine(
  in string name
);
Parameters
name
Name of the search engine to move down.
Return value

None.

moveUpEngine()

Move up the engine with the given name.

moveUpEngine(
  in string name
);
Parameters
name
Name of the search engine to move up.
Return value

None.

removeEngine()

Remove the engine with the given name.

removeEngine(
  in string name
);
Parameters
name
Name of the search engine to remove.
Return value

None.

restoreDefaults()

Restores the defaults for search engines. That means all default search engines will be reset and reordered. User installed engines aren't affected.

restoreDefaults();
Return value

None.

Document Tags and Contributors

Contributors to this page: Whimboo
Last updated by: Whimboo,