MaxCustomControls::ExtendedPopupColorEditForm Class Reference


Detailed Description

Override the default PopupBaseForm to serve color picker instead of default.

List of all members.

Public Member Functions

  ExtendedPopupColorEditForm (ExtendedColorEditor ownerEdit, String Formtitle, bool alpha)
  Constructor with specified owner, title and alpha properties.
override void  ShowPopupForm ()
  Override the default ShowPopupForm() to show max color picker form.
override void  HidePopupForm ()
  Override the default HidePopupForm() to hide max color picker form.
override bool  AllowMouseClick (Control control, Point mousePosition)
  Override the default AllowMouseClick() to judge whether mouse click position is valid.

Protected Member Functions

void  HandleColorConfirmed (object sender, ValueChangedEventArgs< Color > e)
  Process the event occurred when color change is confirmed by click OK.
void  HandleDialogCancelled (object sender, System.EventArgs e)
  Process the event occurred when color change is cancelled by click Cancel.
void  HandleColorRefresh (object sender, ValueChangedEventArgs< Color > e)
  Process the event occurred when color change is change in color picker form.
override Size  CalcFormSizeCore ()
  Override the default CalcFormSizeCore property.

Properties

new RepositoryItemColorEdit  Properties [get]
  Override the default RepositoryItemColorEdit property.
override object  ResultValue [get]
  Override the default ResultValue property.
new ExtendedColorEditor  OwnerEdit [get]
  Override the default OwnerEdit property.

Events

EventHandler  ColorChanged
  Event makes color editor keep color synchronously with color picker form.

Constructor & Destructor Documentation

MaxCustomControls::ExtendedPopupColorEditForm::ExtendedPopupColorEditForm ( ExtendedColorEditor  ownerEdit,
String  Formtitle,
bool  alpha 
) [inline]

Constructor with specified owner, title and alpha properties.

Parameters:
ownerEdit Provides owner color editor which owns this color picker form.
Formtitle Provides the formtitle that color picker form shows.
alpha Provides whether color has alpha channel, which determines the color picker form to be created.

Member Function Documentation

override void MaxCustomControls::ExtendedPopupColorEditForm::ShowPopupForm ( ) [inline]

Override the default ShowPopupForm() to show max color picker form.

override void MaxCustomControls::ExtendedPopupColorEditForm::HidePopupForm ( ) [inline]

Override the default HidePopupForm() to hide max color picker form.

override bool MaxCustomControls::ExtendedPopupColorEditForm::AllowMouseClick ( Control  control,
Point  mousePosition 
) [inline]

Override the default AllowMouseClick() to judge whether mouse click position is valid.

If not, hide color picker form.

Parameters:
control Provides the control item to judge whether mouse click position is in its valid region. Because of being overriden, it is not used here.
mousePosition Provides the position where mouse clicks.

Only click on color editor and color picker form is valid, except when the cursor is in color sampling mode.

void MaxCustomControls::ExtendedPopupColorEditForm::HandleColorConfirmed ( object  sender,
ValueChangedEventArgs< Color >  e 
) [inline, protected]

Process the event occurred when color change is confirmed by click OK.

Parameters:
sender The object which send ColorChanged event.
e The ConfirmColorEventArgs which contains color property.
void MaxCustomControls::ExtendedPopupColorEditForm::HandleDialogCancelled ( object  sender,
System.EventArgs  e 
) [inline, protected]

Process the event occurred when color change is cancelled by click Cancel.

Parameters:
sender The object which send ColorChanged event.
e The default event args.
void MaxCustomControls::ExtendedPopupColorEditForm::HandleColorRefresh ( object  sender,
ValueChangedEventArgs< Color >  e 
) [inline, protected]

Process the event occurred when color change is change in color picker form.

Parameters:
sender The object which send ColorChanged event.
e The ConfirmColorEventArgs which contains color property.

It will send a event to color editor to keep the same color with color picker form.

override Size MaxCustomControls::ExtendedPopupColorEditForm::CalcFormSizeCore ( ) [inline, protected]

Override the default CalcFormSizeCore property.

Returns:
Returns the size of base form.

It must be overridden because of abstract interface. Return size must be larger than zero, or the color picker will not pop up. Actually base form is not popup so the size is insignificant.


Property Documentation

new RepositoryItemColorEdit MaxCustomControls::ExtendedPopupColorEditForm::Properties [get]

Override the default RepositoryItemColorEdit property.

It must be overridden because of abstract interface.

override object MaxCustomControls::ExtendedPopupColorEditForm::ResultValue [get]

Override the default ResultValue property.

new ExtendedColorEditor MaxCustomControls::ExtendedPopupColorEditForm::OwnerEdit [get]

Override the default OwnerEdit property.


Event Documentation

EventHandler MaxCustomControls::ExtendedPopupColorEditForm::ColorChanged

Event makes color editor keep color synchronously with color picker form.


MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm
MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm MaxCustomControls::ExtendedPopupColorEditForm