CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/Fireworks/Core/src/FWBoxIconBase.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     Core
00004 // Class  :     FWBoxIconBase
00005 // 
00006 // Implementation:
00007 //     <Notes on implementation>
00008 //
00009 // Original Author:  Chris Jones
00010 //         Created:  Thu Feb 19 15:09:45 CST 2009
00011 // $Id: FWBoxIconBase.cc,v 1.1 2009/03/04 16:40:50 chrjones Exp $
00012 //
00013 
00014 // system include files
00015 #include "TVirtualX.h"
00016 
00017 // user include files
00018 #include "Fireworks/Core/src/FWBoxIconBase.h"
00019 
00020 
00021 //
00022 // constants, enums and typedefs
00023 //
00024 
00025 //
00026 // static data member definitions
00027 //
00028 
00029 //
00030 // constructors and destructor
00031 //
00032 FWBoxIconBase::FWBoxIconBase(unsigned int iEdgeLength):
00033 m_edgeLength(iEdgeLength)
00034 {
00035 }
00036 
00037 // FWBoxIconBase::FWBoxIconBase(const FWBoxIconBase& rhs)
00038 // {
00039 //    // do actual copying here;
00040 // }
00041 
00042 FWBoxIconBase::~FWBoxIconBase()
00043 {
00044 }
00045 
00046 //
00047 // assignment operators
00048 //
00049 // const FWBoxIconBase& FWBoxIconBase::operator=(const FWBoxIconBase& rhs)
00050 // {
00051 //   //An exception safe implementation is
00052 //   FWBoxIconBase temp(rhs);
00053 //   swap(rhs);
00054 //
00055 //   return *this;
00056 // }
00057 
00058 //
00059 // member functions
00060 //
00061 
00062 //
00063 // const member functions
00064 //
00065 void 
00066 FWBoxIconBase::draw(Drawable_t iID, GContext_t iContext, int iX, int iY) const
00067 {
00068    //draw in background color
00069    gVirtualX->ClearArea(iID,iX,iY,m_edgeLength-1,m_edgeLength-1);
00070    //now draw foreground
00071    gVirtualX->DrawLine(iID, iContext, iX, iY, iX+m_edgeLength-1,iY);
00072    gVirtualX->DrawLine(iID, iContext, iX+m_edgeLength-1, iY, iX+m_edgeLength-1,iY+m_edgeLength-1);
00073    gVirtualX->DrawLine(iID, iContext, iX, iY+m_edgeLength-1, iX+m_edgeLength-1,iY+m_edgeLength-1);
00074    gVirtualX->DrawLine(iID, iContext, iX, iY, iX,iY+m_edgeLength-1);
00075    
00076    drawInsideBox(iID,iContext, iX+1, iY+1, m_edgeLength-2);
00077 }
00078 
00079 //
00080 // static member functions
00081 //