Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "TBox.h"
00016 #include "TEllipse.h"
00017 #include "TEveViewer.h"
00018
00019
00020 #include "Fireworks/Core/interface/FWDetailViewBase.h"
00021 #include "Fireworks/Core/interface/FWModelId.h"
00022 #include "Fireworks/Core/interface/FWEventItem.h"
00023
00024 FWDetailViewBase::FWDetailViewBase(const std::type_info& iInfo) :
00025 m_item(0),
00026 m_helper(iInfo)
00027 {
00028 }
00029
00030 FWDetailViewBase::~FWDetailViewBase()
00031 {
00032 }
00033
00034
00035 void
00036 FWDetailViewBase::build (const FWModelId &iID)
00037 {
00038 m_helper.itemChanged(iID.item());
00039 build(iID, m_helper.offsetObject(iID.item()->modelData(iID.index())));
00040 }
00041
00042 const fireworks::Context&
00043 FWDetailViewBase::context () const {
00044 return m_item->context();
00045 }
00046
00047
00048
00049 void
00050 FWDetailViewBase::drawCanvasDot(Float_t x, Float_t y, Float_t r, Color_t fillColor)
00051 {
00052
00053
00054 Float_t ratio = 0.5;
00055
00056 TEllipse *b2 = new TEllipse(x, y, r, r*ratio);
00057 b2->SetFillStyle(1001);
00058 b2->SetFillColor(fillColor);
00059 b2->Draw();
00060
00061
00062 TEllipse *b1 = new TEllipse(x, y, r, r*ratio);
00063 b1->SetFillStyle(0);
00064 b1->SetLineWidth(2);
00065 b1->Draw();
00066 }
00067
00068 void
00069 FWDetailViewBase::drawCanvasBox( Double_t *pos, Color_t fillCol, Int_t fillType, bool bg)
00070 {
00071
00072
00073
00074 if (bg)
00075 {
00076 TBox *b1 = new TBox(pos[0], pos[1], pos[2], pos[3]);
00077 b1->SetFillColor(fillCol);
00078 b1->Draw();
00079 }
00080
00081
00082 TBox *b2 = new TBox(pos[0], pos[1], pos[2], pos[3]);
00083 b2->SetFillStyle(fillType);
00084 b2->SetFillColor(kBlack);
00085 b2->Draw();
00086
00087
00088 TBox *b3 = new TBox(pos[0], pos[1], pos[2], pos[3]);
00089 b3->SetFillStyle(0);
00090 b3->SetLineWidth(2);
00091 b3->Draw();
00092 }
00093
00094