InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SuppUISuppressedUI Class Reference

#include <SuppUISuppressedUI.h>

Inheritance diagram for SuppUISuppressedUI:
CPMUnknown< ISuppressedUI >ISuppressedUIIPMUnknown

Public Member Functions

 SuppUISuppressedUI (IPMUnknown *boss)
 
 ~SuppUISuppressedUI ()
 
virtual bool16 IsWidgetDisabled (const IControlView *widget) const
 
virtual bool16 IsWidgetHidden (const IControlView *widget) const
 
virtual bool16 IsDragDropDisabled (const IDragDropTarget *target, DataObjectIterator *data, const IDragDropSource *source) const
 
virtual bool16 IsActionDisabled (ActionID action) const
 
virtual bool16 IsActionHidden (ActionID action) const
 
virtual bool16 IsSubMenuDisabled (const PMString &untranslatedSubMenuName) const
 
virtual bool16 IsSubMenuHidden (const PMString &untranslatedSubMenuName) const
 
virtual bool16 IsPlatformDialogControlSuppressed (const PMString &platformDialogIdentifier) const
 
virtual void Reset ()
 
- Public Member Functions inherited from CPMUnknown< ISuppressedUI >
IPMUnknownQueryInterface (PMIID interfaceID) const
 
void AddRef () const
 
void Release () const
 
void PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
void PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
 CPMUnknown (const CPMUnknown &)=delete
 
CPMUnknownoperator= (const CPMUnknown &)=delete
 
Manage workspaces in standard locations

Static Public Attributes

static bool16 gSuppressStyleChages = kFalse
 
static bool16 gSuppressFontAndSizeMenus = kFalse
 
static bool16 gSuppressOpenFileDialogControls = kFalse
 
static bool16 gSuppressParaStyleQuickApply = kFalse
 

Additional Inherited Members

- Public Types inherited from ISuppressedUI
enum  { kDefaultIID = IID_ISUPPRESSEDUI }
 
- Protected Member Functions inherited from CPMUnknown< ISuppressedUI >
 CPMUnknown (IPMUnknown *boss)
 
- Protected Attributes inherited from CPMUnknown< ISuppressedUI >
HelperInterface fHelperInterface
 

Detailed Description

Implements ISuppressedUI

This implementation suppresses UI elements based on several static variables. These statics are set by menu items in SuppUIActionComponent.

Character and Paragraph Style changes are suppressed when the variable 'gSuppressStyleChages' is set to kTrue.

Font and Size menus are suppressed when the variable 'gSuppressFontAndSizeMenus' is set to kTrue.

All custom controls on the Open file dialog are suppressed when the variable 'gSuppressOpenFileDialogControls' is set to kTrue.

Constructor & Destructor Documentation

SuppUISuppressedUI::SuppUISuppressedUI (IPMUnknownboss)

Constructor.

Parameters
bossinterface ptr from boss object on which this interface is aggregated.
SuppUISuppressedUI::~SuppUISuppressedUI ()

Destructor.

Member Function Documentation

bool16 SuppUISuppressedUI::IsActionDisabled (ActionID action) const
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

Implements ISuppressedUI.

bool16 SuppUISuppressedUI::IsActionHidden (ActionID action) const
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

Implements ISuppressedUI.

bool16 SuppUISuppressedUI::IsDragDropDisabled (const IDragDropTargettarget,
DataObjectIteratordata,
const IDragDropSourcesource 
) const
virtual

Called by UI code to determine if the specified widget should accept a drop. The data and source objects 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

Implements ISuppressedUI.

bool16 SuppUISuppressedUI::IsPlatformDialogControlSuppressed (const PMStringplatformDialogIdentifier) const
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

Implements ISuppressedUI.

bool16 SuppUISuppressedUI::IsSubMenuDisabled (const PMStringuntranslatedSubMenuName) const
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

Implements ISuppressedUI.

bool16 SuppUISuppressedUI::IsSubMenuHidden (const PMStringuntranslatedSubMenuName) const
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

Implements ISuppressedUI.

bool16 SuppUISuppressedUI::IsWidgetDisabled (const IControlViewwidget) const
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

Implements ISuppressedUI.

bool16 SuppUISuppressedUI::IsWidgetHidden (const IControlViewwidget) const
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

Implements ISuppressedUI.

void SuppUISuppressedUI::Reset (void )
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.

Implements ISuppressedUI.

Member Data Documentation

bool16 SuppUISuppressedUI::gSuppressFontAndSizeMenus = kFalse
static

Static set to kTrue if we are suppressing font and size menus.

bool16 SuppUISuppressedUI::gSuppressOpenFileDialogControls = kFalse
static

Static set to kTrue if we are suppressing open file dialog custom controls.

bool16 SuppUISuppressedUI::gSuppressParaStyleQuickApply = kFalse
static

Static set to kTrue if we are suppressing paragraph styles in the quick apply dialog

Binds the C implementation class onto its ImplementationID making the C code callable by the application *bool16 SuppUISuppressedUI::gSuppressStyleChages = kFalse
static

Static set to kTrue if we are suppressing style changes.