Class IMenuSettings
See Also: Class IMenuGlobalContext
class IMenuSettings
Description:
This class is available in release 4.0 and later only.
This abstract class represents an interface for all general menu settings. Methods that are marked as internal should not be used.
Methods:
public:
Prototype:
virtual bool IsTokenValid(const ValidityToken& token) = 0;
Remarks:
This method is used internally.
This method checks if a token is valid.
Parameters:
ValidityToken& token
A reference to a token for which to check its validity.
Return Value:
TRUE if the token is valid, otherwise FALSE.
Prototype:
virtual void UpdateValidityToken(ValidityToken& token) const = 0;
Remarks:
This method is used internally.
This method updates the validity token.
Parameters:
ValidityToken& token
A reference to a token to update.
Prototype:
virtual void ResetDefaults() = 0;
Remarks:
This method will reset the menu settings to their defaults.
Prototype:
virtual void SetBorderSz(int borderSz) = 0;
Remarks:
This method allows you to set the menu border size.
Parameters:
int borderSz
The border size in pixels.
Prototype:
virtual int GetBorderSz() const = 0;
Remarks:
This method returns the menu border size.
Prototype:
virtual void SetHorizontalMarginInPoints(int horizontalMarginInPoints) = 0;
Remarks:
This method allows you to set the menu’s horizontal margin size.
Parameters:
int horizontalMarginInPoints
The horizontal margin size in points.
Prototype:
virtual int GetHorizontalMarginInPoints() const = 0;
Remarks:
This method returns the menu’s horizontal margin size (in points).
Prototype:
virtual int GetHorizontalMargin(HDC hDC) const = 0;
Remarks:
This method returns the menu’s horizontal margin, in pixels.
Parameters:
HDC hDC
A handle to a device context.
Prototype:
virtual void SetVerticalMarginInPoints(int verticalMarginInPoints) = 0;
Remarks:
This method allows you to set the menu’s vertical margin size.
Parameters:
int verticalMarginInPoints
The vertical margin size in points.
Prototype:
virtual int GetVerticalMarginInPoints() const = 0;
Remarks:
This method returns the menu’s vertical margin size (in points).
Prototype:
virtual int GetVerticalMargin(HDC hDC) const = 0;
Remarks:
This method returns the menu’s vertical margin, in pixels.
Parameters:
HDC hDC
A handle to a device context.
Prototype:
virtual void SetItemFontFace(TCHAR* szItemFontFace) = 0;
Remarks:
This method allows you to set the menu item’s font typeface.
Parameters:
TCHAR* szItemFontFace
A string containing the typeface name.
Prototype:
virtual const TCHAR* GetItemFontFace() const = 0;
Remarks:
This method returns the name of the menu item’s font typeface.
Prototype:
virtual void SetTitleFontFace(TCHAR* szTitleFontFace) = 0;
Remarks:
This method allows you to set the menu title’s font typeface.
Parameters:
TCHAR* szTitleFontFace
A string containing the typeface name.
Prototype:
virtual const TCHAR* GetTitleFontFace() const = 0;
Remarks:
This method returns the name of the menu title’s font typeface.
Prototype:
virtual void SetItemFontSize(int itemFontSize) = 0;
Remarks:
This method allows you to set the menu item’s font size.
Parameters:
int itemFontSize
The size of the font, in points.
Prototype:
virtual int GetItemFontSize() const = 0;
Remarks:
This method returns the menu item’s font size, in points.
Prototype:
virtual void SetTitleFontSize(int titleFontSize) = 0;
Remarks:
This method allows you to set the menu title’s font size.
Parameters:
int titleFontSize
The size of the font, in points.
Prototype:
virtual int GetTitleFontSize() const = 0;
Remarks:
This method returns the menu title’s font size, in points.
Prototype:
virtual void SetUseUniformItemHeight(bool useUniformItemHeight) = 0;
Remarks:
This method allows you to set the status of a menu item’s uniform height flag.
Parameters:
bool useUniformItemHeight
TRUE to set the uniform height flag ON, FALSE to set it to OFF.
Prototype:
virtual bool GetUseUniformItemHeight() const = 0;
Remarks:
This method returns TRUE or FALSE if the menu item’s uniform height flag is set or not set, respectively.
Prototype:
virtual void SetUseUniformItemHeightBOOL(BOOL useUniformItemHeight) = 0;
Remarks:
This method allows you to set the status of a menu item’s uniform height flag. This version of SetUniformItemHeight() is provided for the function publishing system.
Parameters:
BOOL useUniformItemHeight
TRUE to set the uniform height flag ON, FALSE to set it to OFF.
Prototype:
virtual BOOL GetUseUniformItemHeightBOOL() const = 0;
Remarks:
This method returns TRUE or FALSE if the menu item’s uniform height flag is set or not set, respectively. This version of GetUniformItemHeight() is provided for the function publishing system.
Prototype:
virtual void SetOpacity(float opacity) = 0;
Remarks:
This method allows you to set the menu’s opacity value.
Parameters:
float opacity
The opacity value, ranging from 0.0 – 1.0.
Prototype:
virtual float GetOpacity() const = 0;
Remarks:
This method returns the menu’s opacity value.
Prototype:
virtual void SetDisplayMethod(DisplayMethod displayMethod) = 0;
Remarks:
This method allows you to set a menu’s display method.
Parameters:
DisplayMethod displayMethod
The display method (enum), which is either of the following; DM_NORMAL, DM_STRETCH, DM_FADE, DM_NUM_METHODS
Prototype:
virtual DisplayMethod GetDisplayMethod() const = 0;
Remarks:
This method returns the menu’s display method, which is either of the following; DM_NORMAL, DM_STRETCH, DM_FADE, DM_NUM_METHODS
Prototype:
virtual void SetAnimatedSteps(unsigned int steps) = 0;
Remarks:
This method allows you to set the menu’s number of animated steps for the ‘growing’ effect.
Parameters:
unsigned int steps
The number of steps.
Prototype:
virtual unsigned int GetAnimatedSteps() const = 0;
Remarks:
This method returns the menu’s number of animated steps used for the ‘growing’ effect.
Prototype:
virtual void SetAnimatedStepTime(unsigned int ms) = 0;
Remarks:
This method allows you to set the menu’s animated step time.
Parameters:
unsigned int ms
The animated step time, in milliseconds.
Prototype:
virtual unsigned int GetAnimatedStepTime() const = 0;
Remarks:
This method returns the menu’s animated step time, in milliseconds.
Prototype:
virtual void SetSubMenuPauseTime(unsigned int ms) = 0;
Remarks:
This method allows you to set the delay before a submenu is displayed.
Parameters:
unsigned int ms
The delay, in milliseconds.
Prototype:
virtual unsigned int GetSubMenuPauseTime() const = 0;
Remarks:
This method returns the delay before a submenu is displayed, in milliseconds.
Prototype:
virtual void SetUseLastExecutedItem(bool useLastExecutedItem) = 0;
Remarks:
This method allows you to set the "last executed item" flag which determines whether to use the menu’s last executed item when the user clicks on the menu’s titlebar.
Parameters:
bool useLastExecutedItem
TRUE to turn ON the flag, FALSE to turn the flag off.
Prototype:
virtual bool GetUseLastExecutedItem() const = 0;
Remarks:
This method returns whether the "last executed item" flag is set (TRUE) or not set (FALSE). The flag determines whether to use the menu’s last executed item when the user clicks on the menu’s titlebar.
Prototype:
virtual void SetUseLastExecutedItemBOOL(BOOL useLastExecutedItem) = 0;
Remarks:
This method allows you to set the "last executed item" flag which determines whether to use the menu’s last executed item when the user clicks on the menu’s titlebar. This version of SetUseLastExecutedItem() is provided for the function publishing system.
Parameters:
BOOL useLastExecutedItem
TRUE to turn ON the flag, FALSE to turn the flag off.
Prototype:
virtual BOOL GetUseLastExecutedItemBOOL() const = 0;
Remarks:
This method returns whether the "last executed item" flag is set (TRUE) or not set (FALSE). The flag determines whether to use the menu’s last executed item when the user clicks on the menu’s titlebar. This version of GetUseLastExecutedItem() is provided for the function publishing system.
Prototype:
virtual void SetRepositionWhenClipped(bool repositionWhenClipped) = 0;
Remarks:
This method allows you to set the flag which controls and determines whether the menu is repositioned when near the edge of the screen.
Parameters:
bool repositionWhenClipped
TRUE to turn repositioning ON, FALSE to turn it OFF.
Prototype:
virtual bool GetRepositionWhenClipped() const = 0;
Remarks:
This method returns the status of the flag which controls and determines whether the menu is repositioned when near the edge of the screen.
Return Value:
TRUE if the flag is ON, otherwise FALSE.
Prototype:
virtual void SetRepositionWhenClippedBOOL(BOOL repositionWhenClipped) = 0;
Remarks:
This method allows you to set the flag which controls and determines whether the menu is repositioned when near the edge of the screen. This version of SetRepositionWhenClipped() is provided for the function publishing system.
Parameters:
BOOL repositionWhenClipped
TRUE to turn repositioning ON, FALSE to turn it OFF.
Prototype:
virtual BOOL GetRepositionWhenClippedBOOL() const = 0;
Remarks:
This method returns the status of the flag which controls and determines whether the menu is repositioned when near the edge of the screen. This version of GetRepositionWhenClipped() is provided for the function publishing system.
Return Value:
TRUE if the flag is ON, otherwise FALSE.
Prototype:
virtual void SetRemoveRedundantSeparators(bool removeRedundantSeparators) = 0;
Remarks:
This method allows you to set the flag which controls and determines whether the menu should remove redundant separators.
Parameters:
bool removeRedundantSeparators
TRUE to turn the flag ON, FALSE to turn it OFF.
Prototype:
virtual bool GetRemoveRedundantSeparators() const = 0;
Remarks:
This method returns the status of the flag which controls and determines whether the menu should remove redundant separators.
Return Value:
TRUE if the flag is ON, otherwise FALSE.
Prototype:
virtual void SetRemoveRedundantSeparatorsBOOL(BOOL removeRedundantSeparators) = 0;
Remarks:
This method allows you to set the flag which controls and determines whether the menu should remove redundant separators. This version of SetRemoveRedundantSeparators() is provided for the function publishing system.
Parameters:
BOOL removeRedundantSeparators
TRUE to turn the flag ON, FALSE to turn it OFF.
Prototype:
virtual BOOL GetRemoveRedundantSeparatorsBOOL() const = 0;
Remarks:
This method returns the status of the flag which controls and determines whether the menu should remove redundant separators. This version of GetRemoveRedundantSeparators() is provided for the function publishing system.
Return Value:
TRUE if the flag is ON, otherwise FALSE.