source: trunk/MagicSoft/Cosy/gui/MGCoordinates.cc@ 770

Last change on this file since 770 was 732, checked in by tbretz, 24 years ago
*** empty log message ***
File size: 1.2 KB
Line 
1//
2// This File contains the definition of the MGCoordinates-class
3//
4// Author: Thomas Bretz
5// Version: V1.0 (1-8-2000)
6
7#include "MGCoordinates.h"
8
9#include <iostream.h> // cout
10
11#include "MGCoordinate.h"
12
13MGCoordinates::MGCoordinates(const TGWindow* p,
14 const Bool_t flag,
15 const char *txt1, const char *txt2,
16 const UInt_t deg1, const UInt_t min1, const UInt_t sec1,
17 const UInt_t deg2, const UInt_t min2, const UInt_t sec2)
18: TGFrame(p, 234, 76, kFixedSize)
19{
20 // p = pointer to MainFrame (not owner)
21 fX = new MGCoordinate(this, flag, txt1, deg1, min1, sec1);
22 fX->Move(0, 0);
23
24 fY = new MGCoordinate(this, flag, txt2, deg2, min2, sec2);
25 fY->Move(120, 0);
26
27 MapWindow();
28}
29
30MGCoordinates::~MGCoordinates()
31{
32 delete fY;
33 delete fX;
34
35 cout << "MGCoordinates destroyed." << endl;
36}
37
38XY MGCoordinates::GetCoordinates() const
39{
40 return XY(fX->GetVal(), fY->GetVal());
41}
42
43void MGCoordinates::SetCoordinates(const XY &xy)
44{
45 fX->SetVal(xy.X());
46 fY->SetVal(xy.Y());
47}
48
49void MGCoordinates::Print()
50{
51 fX->Print();
52 fY->Print();
53}
Note: See TracBrowser for help on using the repository browser.