ManagedServices::CuiUpdater Class Reference


Detailed Description

Provides access to User Interface customization information and events to managed code.

UI forms and controls should retrieve their colors from here and configure their appearance accordingly. They should also subscribe to the CUIUpdated event to be notified when the user changes the UI look and feel configuration.

This class is a Singleton. Access the single instance through GetInstance().

List of all members.

Public Member Functions

System::Drawing::Color  GetControlColor ()
  Get the current theme color used for controls such as buttons.
System::Drawing::Color  GetTextColor ()
  Get the current theme color used for text in the application.
System::Drawing::Color  GetEditControlColor ()
  Get the current theme color used for text edit fields.
System::Drawing::Color  GetButtonPressedColor ()
  Get the current theme color used for a button while the button is held down or toggled on.
System::Drawing::Color  GetButtonDarkShadow ()
  Get the current theme color used for a button shadow when the button is up (not pressed).
System::Drawing::Color  GetButtonLightShadow ()
  Get the current theme color used for a button shadow when the button is pressed (lit).
System::Drawing::Color  GetColor (int aColorIndex)
  Get a standard windows color by its color index constant.
System::Drawing::Color  GetMaxColor (ColorId id)
  Get a current Max CUI color by its id value.
System::Drawing::Color  GetMaxTextColor ()
  Get the current text color of max(i.e., CUI dialog/Colors/Custom Colors/Text).
System::Drawing::Color  GetMaxWindowColor ()
  Get the current window color of max(i.e., CUI dialog/Colors/Custom Colors/Window).
void  RequestCUIUpdated ()
  Raise a CUIUpdated event.
void  RegisterForm (System::Windows::Forms::Form^aForm)
  Register a Form to allow the CUI system to manage its enabled / disabled state.
void  UnregisterForm (System::Windows::Forms::Form^aForm)
  Unregister a Form to no longer allow the CUI system to manage its enabled / disabled state.
void  EnableForms (bool aEnable)
  Set the enabled state for all forms in the management list.

Static Public Member Functions

static CuiUpdater  GetInstance ()
  Get the singleton instance.
static void  Destroy ()
  Destroy the singleton instance.

Public Attributes

event System::EventHandler
< System::EventArgs^> 
CUIUpdated
  Signals that the CUI configuration has changed and controls should update their look and feel.

Protected Member Functions

virtual void  OnCUIUpdated (System::EventArgs^args)
  Raise a CUIUpdated event.

Member Function Documentation

CuiUpdater ManagedServices::CuiUpdater::GetInstance ( ) [static]

Get the singleton instance.

Returns:
The singleton instance.
void ManagedServices::CuiUpdater::Destroy ( ) [static]

Destroy the singleton instance.

System::Drawing::Color ManagedServices::CuiUpdater::GetControlColor ( )

Get the current theme color used for controls such as buttons.

Returns:
The current theme color used for controls such as buttons.
System::Drawing::Color ManagedServices::CuiUpdater::GetTextColor ( )

Get the current theme color used for text in the application.

Returns:
The current theme color used for text in the application.
System::Drawing::Color ManagedServices::CuiUpdater::GetEditControlColor ( )

Get the current theme color used for text edit fields.

Returns:
The current theme color used for text edit fields.
System::Drawing::Color ManagedServices::CuiUpdater::GetButtonPressedColor ( )

Get the current theme color used for a button while the button is held down or toggled on.

Returns:
The current theme color used for a button while the button is held down or toggled on.
System::Drawing::Color ManagedServices::CuiUpdater::GetButtonDarkShadow ( )

Get the current theme color used for a button shadow when the button is up (not pressed).

Returns:
The current theme color used for a button shadow when the button is up (not pressed).
System::Drawing::Color ManagedServices::CuiUpdater::GetButtonLightShadow ( )

Get the current theme color used for a button shadow when the button is pressed (lit).

Returns:
The current theme color used for a button shadow when the button is pressed (lit).
System::Drawing::Color ManagedServices::CuiUpdater::GetColor ( int  aColorIndex )

Get a standard windows color by its color index constant.

Parameters:
aColorIndex The desired color's index as defined in winuser.h.
Returns:
The current windows theme color at the given index.
System::Drawing::Color ManagedServices::CuiUpdater::GetMaxColor ( ColorId  id )

Get a current Max CUI color by its id value.

Parameters:
id The desired color's id as defined in iColorMan.h.
Returns:
The current Max CUI color at the given id value.
System::Drawing::Color ManagedServices::CuiUpdater::GetMaxTextColor ( )

Get the current text color of max(i.e., CUI dialog/Colors/Custom Colors/Text).

Returns:
The current text color of max.
System::Drawing::Color ManagedServices::CuiUpdater::GetMaxWindowColor ( )

Get the current window color of max(i.e., CUI dialog/Colors/Custom Colors/Window).

Returns:
The current text color of max.
void ManagedServices::CuiUpdater::RequestCUIUpdated ( )

Raise a CUIUpdated event.

void ManagedServices::CuiUpdater::RegisterForm ( System::Windows::Forms::Form^  aForm )

Register a Form to allow the CUI system to manage its enabled / disabled state.

Parameters:
aForm The form to add to the management list.
void ManagedServices::CuiUpdater::UnregisterForm ( System::Windows::Forms::Form^  aForm )

Unregister a Form to no longer allow the CUI system to manage its enabled / disabled state.

Parameters:
aForm The form to remove from the management list.
void ManagedServices::CuiUpdater::EnableForms ( bool  aEnable )

Set the enabled state for all forms in the management list.

Parameters:
aEnable The new enabled state for all forms in the management list. true for enabled, false for disabled.
void ManagedServices::CuiUpdater::OnCUIUpdated ( System::EventArgs^  args ) [protected, virtual]

Raise a CUIUpdated event.

Parameters:
args The EventArgs to pass on to event listeners.

Member Data Documentation

event System::EventHandler<System::EventArgs^> ManagedServices::CuiUpdater::CUIUpdated

Signals that the CUI configuration has changed and controls should update their look and feel.


ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater
ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater ManagedServices::CuiUpdater