// $Revision: 1.2 $ // BoundsFeedbackStyle.C // Copyright (C) 1994, 1995 Taligent, Inc. All rights reserved. #include "BoundsFeedbackStyle.h" #ifndef Taligent_BASEGEOMETRY #include #endif #ifndef Taligent_RGBCOLOR #include #endif #ifndef Taligent_BUNDLES #include #endif #ifndef Taligent_DELETERFOR #include #endif #ifndef Taligent_GRAPHICS #include #endif //-------------------------- Class TBoundsFeedbackStyle ------------------- MGraphic* TBoundsFeedbackStyle::DoCreateFeedback(const TGArea& area) const { static const TRGBColor kWhite(1,1,1); static const TRGBColor kBlack(0,0,0); static const GCoordinate width = 1; const TGRect bounds(area.GetBounds()); TDeleterFor group = new TGraphicGroup(); TDeleterFor bundle = new TGrafBundle(new TColorPaint(kWhite), TAttributeState::kFrame); bundle->AdoptFramePen(new TSolidPen(width, TPen::kOutsetFrame)); group->AdoptLast(new TArea(bounds, bundle.OrphanObject())); bundle = new TGrafBundle(new TColorPaint(kBlack), TAttributeState::kFrame); bundle->AdoptFramePen(new TSolidPen(width, TPen::kInsetFrame)); group->AdoptLast(new TArea(bounds, bundle.OrphanObject())); return group.OrphanObject(); }