InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ISuppressedUI Class Referenceabstract

#include <ISuppressedUI.h>

Inheritance diagram for ISuppressedUI:
IPMUnknownCPMUnknown< ISuppressedUI >SuppUISuppressedUI

Public Types

enum  { kDefaultIID = IID_ISUPPRESSEDUI }
 

Public Member Functions

Manage workspaces in standard locations
virtual bool16 IsWidgetDisabled (const IControlView *widget) const =0
 
virtual bool16 IsWidgetHidden (const IControlView *widget) const =0
 
virtual bool16 IsDragDropDisabled (const IDragDropTarget *target, DataObjectIterator *data, const IDragDropSource *source) const =0
 
virtual bool16 IsActionDisabled (ActionID action) const =0
 
virtual bool16 IsActionHidden (ActionID action) const =0
 
virtual bool16 IsSubMenuDisabled (const PMString &untranslatedSubMenuName) const =0
 
virtual bool16 IsSubMenuHidden (const PMString &untranslatedSubMenuName) const =0
 
virtual bool16 IsPlatformDialogControlSuppressed (const PMString &platformDialogIdentifier) const =0
 
virtual void Reset ()=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Interface for suppressing the display or enablement of interface elements to allow 3rd parties to customize/disable UI for some clients. This interface is expected to be on the Session boss and all UI elements will check for it there. The implementation on the session boss is typically a aggregator which forwards calls on to services which of type 'kSuppressedUIService' which also implement this interface. There is a service implementation that is provided, kSuppressedUIWithXMLFileImpl, which will read in lists of suppressed elements from an XML file.

Member Function Documentation

virtual bool16 ISuppressedUI::IsActionDisabled (ActionID action) const
pure virtual

Called by ActionManager to determine if the specified action should be disabled. Disabled actions will show up in menus, but will be disabled.

Parameters
actionthe action
Returns
kTrue to disable the action, kFalse if you do not wish to disable the action

Implemented in SuppUISuppressedUI.

virtual bool16 ISuppressedUI::IsActionHidden (ActionID action) const
pure virtual

Called by ActionManager to determine if the specified action should be hidden. Hidden actions will NOT show up in menus.

Parameters
actionthe action
Returns
kTrue to hide the action, kFalse if you do not wish to hide the action

Implemented in SuppUISuppressedUI.

virtual bool16 ISuppressedUI::IsDragDropDisabled (const IDragDropTargettarget,
DataObjectIteratordata,
const IDragDropSourcesource 
) const
pure virtual

Called by UI code to determine if the specified widget should accept a drop. data and source contain more information about this particular drop. You can choose to accept some drops and disable others

Parameters
targetthe widget in question
datacontains information about the dragdrop action in question
sourcecontains the source of the dragdrop operation
Returns
kTrue to disable the drop to this widget, kFalse if you do not wish to disable the drop to this widget

Implemented in SuppUISuppressedUI.

virtual bool16 ISuppressedUI::IsPlatformDialogControlSuppressed (const PMStringplatformDialogIdentifier) const
pure virtual

The different variations of Open and Save dialogs in InDesign do not contain InDesign widgets and therefore can't be handled in the same way. These are handled specifically by an identifier found in SuppressedUIXMLDefs.h. You can either Hide all the custom controls or disable individual controls. Suppressing all controls will not cause the dialog to not show the custom control area. Suppressing only individual controls will disable them. At this point, you cannot hide individual controls. This method is called by the dialog to determine if it should hide or disable it's custom controls

Parameters
platformDialogIdentifieran identifier which identifies the dialog asking whether it's custom controls should be hidden
Returns
kTrue to hide the custom controls, kFalse if you do not wish to hide the custom controls

Implemented in SuppUISuppressedUI.

virtual bool16 ISuppressedUI::IsSubMenuDisabled (const PMStringuntranslatedSubMenuName) const
pure virtual

Called by MenuManager to determine if the specified menu should be disabled. This refers to submenus which are menu items that contain a menu beneath them. They have no actionID and are specified by Menu path. e.g. File > New is a submenu.

Parameters
untranslatedSubMenuNamethe This should contain the full menu path in it's untranslated form. This is the same format used to add submenus in MenuDef resource. e.g. "Main:&Window:PW_Workspace:" is a submenu path for Palette Workspaces
Returns
kTrue to disable the submenu, kFalse if you do not wish to disable the submenu

Implemented in SuppUISuppressedUI.

virtual bool16 ISuppressedUI::IsSubMenuHidden (const PMStringuntranslatedSubMenuName) const
pure virtual

Called by MenuManager to determine if the specified menu should be hidden. This refers to submenus which are menu items that contain a menu beneath them. They have no actionID and are specified by Menu path. e.g. File > New is a submenu.

Parameters
untranslatedSubMenuNamethe This should contain the full menu path in it's untranslated form. This is the same format used to add submenus in MenuDef resource. e.g. "Main:&Window:PW_Workspace:" is a submenu path for Palette Workspaces
Returns
kTrue to hide the submenu, kFalse if you do not wish to hide the submenu

Implemented in SuppUISuppressedUI.

virtual bool16 ISuppressedUI::IsWidgetDisabled (const IControlViewwidget) const
pure virtual

Called by UI code to determine if the specified widget should be disabled

Parameters
widgetthe widget in question
Returns
kTrue to disable the widget, kFalse if you do not wish to disable the widget

Implemented in SuppUISuppressedUI.

virtual bool16 ISuppressedUI::IsWidgetHidden (const IControlViewwidget) const
pure virtual

Called by UI code to determine if the specified widget should be hidden

Parameters
widgetthe widget in question
Returns
kTrue to hide the widget, kFalse if you do not wish to hide the widget

Implemented in SuppUISuppressedUI.

virtual void ISuppressedUI::Reset ()
pure virtual

Call Reset() to force the implementations of this interface to recreate a list of items that it would like to suppress. Since the calls above occur very frequently, the implementation needs to respond very quickly and should keep a cache of suppressed items. When Reset() is called, it should recreate it's cache. For instance, the implementation that reads suppressed items from an XML file will reread the xml file when Reset() is called.

Implemented in SuppUISuppressedUI.