The plugin object contains properties and methods that apply to the entire gadget.
Note: Except where noted, the API described in this page has been available since version 4. To see more reference documentation for the gadget API, go to the Gadget API Reference.
| Name | Description | Type | Read/Write |
|---|---|---|---|
plugin_flags |
Any combination of plug-in flags. | integer | Write |
window_height |
Deprecated. Use the height property of
view or
contentarea
instead.
The height of the gadget's content area in pixels. |
integer | Read |
window_width |
Deprecated. Use the width property of
view or
contentarea
instead.
The width of the gadget's content area in pixels. |
integer | Read |
| Name and Arguments | Description | Returns |
|---|---|---|
RemoveMe(save_data) |
Requests that the gadget be removed from the Sidebar. If save_data is true, the gadget's state is saved before the gadget is removed. | void |
ShowDetailsView(details_control, title, flags, handlerToProcessFeedback)
(added 5.0) |
Displays a details view containing the specified details control and with the specified title. Flag values can be any combination of details view flags. You can specify a function to be called when the details view is closed. This handler function has one argument, which specifies details view flags. | void |
CloseDetailsView()
(added 5.0) |
Hides and destroys the details view
that is being shown for this gadget.
You don't need to call this method
before issuing a ShowDetailsView() call.
|
void |
ShowOptionsDialog()
(added 5.0) |
Shows the options dialog.
Note: For more information, see the article Using the Options Dialog. |
void |
| Name | Description | Handler Notes |
|---|---|---|
onShowOptionsDlg |
Fires just before the gadget's options dialog is displayed. Handle this event to initialize the options dialog. | The handler has a single argument, a display window specified as an IGoogleDesktopDisplayWindow. If the handler returns false, the options dialog won't appear; if it returns true or nothing, the options dialog will appear. |
onAddCustomMenuItems |
Fires just before the gadget's menu is displayed. Handle this event to customize the menu. | The handler has a single argument: the menu. |
onCommand |
Fires when the user issues a command. Handle this event to add gadget-specific processing to framework-defined commands such as when the user chooses the gadget's About menu item or clicks the gadget's back or forward button | The handler has a single argument: the command. |
onDisplayStateChange |
Fires after a gadget's display state changes — for example, when it's resized or minimized. | The handler has a single argument: the new display state. |
onDisplayTargetChange |
Fires just before the gadget's display location changes, such as from the Sidebar to a floating desktop window. | The handler has a single argument: the new target. |