GuiAxis Class Reference

#include <GuiAxis.h>

Inheritance diagram for GuiAxis:
GuiCanvas GuiBase

List of all members.

Public Member Functions

 GuiAxis (TGWindow &parent, unsigned int options=kVerticalFrame)
virtual ~GuiAxis ()
void UseRange (RangeDouble *r)

Private Member Functions

void ApplyRange ()

Private Attributes

TGaxis * fAxis
SigC::Ptr< RangeDoublefRange
SigC::Connection fCon

Detailed Description

Definition at line 24 of file GuiAxis.h.


Constructor & Destructor Documentation

GuiAxis::GuiAxis ( TGWindow &  parent,
unsigned int  options = kVerticalFrame 
)

Definition at line 8 of file GuiAxis.cxx.

References fAxis, GetCanvas(), and UseRange().

00009     : GuiCanvas(parent), fRange(0)
00010 {
00011     this->UseRange(manage(new RangeDouble));
00012 
00013     if (kHorizontalFrame)
00014         fAxis = new TGaxis(0.0,0.2, 1.0,0.2, 0,1,510,"-");
00015     else
00016         fAxis = new TGaxis(0.8,0.0, 0.8,1.0, 0,1,510,"");
00017     fAxis->SetLabelSize(0.3);
00018     fAxis->SetWmin(0.0);
00019     fAxis->SetWmax(1.0);
00020 
00021     this->GetCanvas()->cd(); 
00022     fAxis->Draw(); 
00023 
00024     this->GetCanvas()->SetEditable(kFALSE);
00025 
00026 }

GuiAxis::~GuiAxis (  )  [virtual]

Definition at line 28 of file GuiAxis.cxx.

References fAxis.

00029 {
00030     delete fAxis; fAxis = 0;
00031 }


Member Function Documentation

void GuiAxis::ApplyRange ( void   )  [private]

Definition at line 40 of file GuiAxis.cxx.

References fAxis, fRange, and GetCanvas().

Referenced by UseRange().

00041 {
00042     fAxis->SetWmin(fRange->Min());
00043     fAxis->SetWmax(fRange->Max());
00044     this->GetCanvas()->Modified();
00045     this->GetCanvas()->Update();
00046 }

void GuiAxis::UseRange ( RangeDouble r  ) 

Definition at line 33 of file GuiAxis.cxx.

References ApplyRange(), fCon, and fRange.

Referenced by GuiAxis().

00034 {
00035     if (fRange == rptr) return;
00036     if (fRange && rptr) fCon.disconnect();
00037     fRange = rptr;
00038     fCon = fRange->modified.connect(SigC::slot(*this,&GuiAxis::ApplyRange));
00039 }


Member Data Documentation

TGaxis* GuiAxis::fAxis [private]

Definition at line 38 of file GuiAxis.h.

Referenced by ApplyRange(), GuiAxis(), and ~GuiAxis().

SigC::Connection GuiAxis::fCon [private]

Definition at line 40 of file GuiAxis.h.

Referenced by UseRange().

SigC::Ptr<RangeDouble> GuiAxis::fRange [private]

Definition at line 39 of file GuiAxis.h.

Referenced by ApplyRange(), and UseRange().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1