Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:01:18

0001 // -*- C++ -*-
0002 //
0003 // Package:     Core
0004 // Class  :     FWBoxIconBase
0005 //
0006 // Implementation:
0007 //     <Notes on implementation>
0008 //
0009 // Original Author:  Chris Jones
0010 //         Created:  Thu Feb 19 15:09:45 CST 2009
0011 //
0012 
0013 // system include files
0014 #include "TVirtualX.h"
0015 
0016 // user include files
0017 #include "Fireworks/Core/src/FWBoxIconBase.h"
0018 
0019 //
0020 // constants, enums and typedefs
0021 //
0022 
0023 //
0024 // static data member definitions
0025 //
0026 
0027 //
0028 // constructors and destructor
0029 //
0030 FWBoxIconBase::FWBoxIconBase(unsigned int iEdgeLength) : m_edgeLength(iEdgeLength) {}
0031 
0032 // FWBoxIconBase::FWBoxIconBase(const FWBoxIconBase& rhs)
0033 // {
0034 //    // do actual copying here;
0035 // }
0036 
0037 FWBoxIconBase::~FWBoxIconBase() {}
0038 
0039 //
0040 // assignment operators
0041 //
0042 // const FWBoxIconBase& FWBoxIconBase::operator=(const FWBoxIconBase& rhs)
0043 // {
0044 //   //An exception safe implementation is
0045 //   FWBoxIconBase temp(rhs);
0046 //   swap(rhs);
0047 //
0048 //   return *this;
0049 // }
0050 
0051 //
0052 // member functions
0053 //
0054 
0055 //
0056 // const member functions
0057 //
0058 void FWBoxIconBase::draw(Drawable_t iID, GContext_t iContext, int iX, int iY) const {
0059   //draw in background color
0060   gVirtualX->ClearArea(iID, iX, iY, m_edgeLength - 1, m_edgeLength - 1);
0061   //now draw foreground
0062   gVirtualX->DrawLine(iID, iContext, iX, iY, iX + m_edgeLength - 1, iY);
0063   gVirtualX->DrawLine(iID, iContext, iX + m_edgeLength - 1, iY, iX + m_edgeLength - 1, iY + m_edgeLength - 1);
0064   gVirtualX->DrawLine(iID, iContext, iX, iY + m_edgeLength - 1, iX + m_edgeLength - 1, iY + m_edgeLength - 1);
0065   gVirtualX->DrawLine(iID, iContext, iX, iY, iX, iY + m_edgeLength - 1);
0066 
0067   drawInsideBox(iID, iContext, iX + 1, iY + 1, m_edgeLength - 2);
0068 }
0069 
0070 //
0071 // static member functions
0072 //