Constructor and destructor
// Copyright (C) 1995 Taligent, Inc. All rights reserved.
//========================================
// Constructors and Destructor
//========================================
TStandardCanvasFillColorSelectionState::TStandardCanvasFillColorSelectionState () :
TCommandControlStateOn<MCanvasSelection> ()
{
SetUpdateCurrentSelection (false); // command does not change selection
}
TStandardCanvasFillColorSelectionState::TStandardCanvasFillColorSelectionState (
const TStandardCanvasFillColorSelectionState& source) :
TCommandControlStateOn<MCanvasSelection> (source)
{
}
TStandardCanvasFillColorSelectionState::TStandardCanvasFillColorSelectionState (
const TColor& color, TGUIBundleConnection* theBundleConnectionToAlias) :
TCommandControlStateOn<MCanvasSelection> (theBundleConnectionToAlias,
TStandardText("Change Fill Color"),
new TSetCanvasGraphicFillColorCmd (color))
{
}
TStandardCanvasFillColorSelectionState::~TStandardCanvasFillColorSelectionState ()
{
}
MCollectible overrides
// Copyright (C) 1995 Taligent, Inc. All rights reserved.
//========================================
// MCollectible Overrides
//========================================
MCollectibleDefinitionsMacro (TStandardCanvasFillColorSelectionState, kOriginalVersion);
TStandardCanvasFillColorSelectionState&
TStandardCanvasFillColorSelectionState::operator= (const TStandardCanvasFillColorSelectionState& source)
{
if ( this != &source ) {
TCommandControlStateOn<MCanvasSelection>::operator= (source);
}
return *this;
}
TStream&
TStandardCanvasFillColorSelectionState::operator>>= (TStream& toWhere) const
{
WriteVersion (toWhere);
MMomentaryControlState::operator>>= (toWhere);
return toWhere;
}
TStream&
TStandardCanvasFillColorSelectionState::operator<<= (TStream& fromWhere)
{
VersionInfo version = ReadVersion (fromWhere);
if ( version != kOriginalVersion )
throw TInvalidVersionException(kStreamBadVersion, 0);
MMomentaryControlState::operator<<= (fromWhere);
return fromWhere;
}
void
TStandardCanvasFillColorSelectionState::HandleAddInterests( TSetOf<TInterest> &theInterests ) const
{
TGUIBundleInterest theCurrentSelectionInterest =
GetGUIBundle()->GetCurrentSelectionChangeInterest();
theInterests.Add( ::Copy(theCurrentSelectionInterest) );
}
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.