ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUIMainFrame.h
Go to the documentation of this file.
1 
9 #ifndef GUIMAINFRAME_H_
10 #define GUIMAINFRAME_H_
11 
12 #include <iostream>
13 
14 // gROOT not known, gApplication
15 #include <TROOT.h>
16 #include <TApplication.h>
17 //these only needed for CINT
18 #include <TGClient.h>
19 #include <TGMenu.h>
20 
21 // forward declaration
22 class GUIMainController;
23 class RealTime2;
24 
31 class GUIMainFrame : public TGMainFrame
32 {
33  //to get signal/slots, not needed if derive from TGMainFrame
34  //RQ_OBJECT("GUIMainFrame");
35  private:
36 
39  //for menu bar 0 1
41 
43  // could use signal, yes certainly, or use a base class, certainly the best
44  // attach to only one controller ?? why not, again could be a base controller
46 
47  // to do write a real time with c++,boost, need to enter root main loop !
48  // included in frame because ROOT dependencies
52 
57 
60  //for menubar
61  TGMenuBar *fMenuBar;
62  TGPopupMenu* fMenuFile;
63  TGPopupMenu* fMenuUpdate;
64  //layout
65  TGLayoutHints *fMenuBarLayout;
66  TGLayoutHints *fMenuBarItemLayout;
67 
69  void CreateMenu();
70 
71  public:
72  GUIMainFrame(const TGWindow *p, UInt_t w,UInt_t h,
73  GUIMainController * control);
74  //const GUIMainController * control);
75  virtual ~GUIMainFrame();
76 
77  // added for GUIMainController sending fhframe of GUIMainFrame, but could be an other ( not GUIMain )
78  TGCompositeFrame * GetFrame() {return fHframe0;}
79 
80  void CloseWindow();
81 
83  void HandleMenu(Int_t id);
84  void HandlePopup() { printf("menu popped up\n"); }
85  void HandlePopdown() { printf("menu popped down\n"); }
86 
87  // maybe to move in main controller ?? more logic than the frame !
89  void UpdateRT ( std::vector<std::string> & message );
91  void CheckUpdateRT();
92 
94  void PrintList();
95 
97 };
98 
99 #endif /* GUIMAINFRAME_H_ */
void HandlePopup()
Definition: GUIMainFrame.h:84
TGPopupMenu * fMenuUpdate
Definition: GUIMainFrame.h:63
TGLayoutHints * fMenuBarLayout
Definition: GUIMainFrame.h:65
RealTime2 * frealtime2
RealTime, singleton, initialized in constructor, set to on by default keep in main frame because ROOT...
Definition: GUIMainFrame.h:51
GUIMainController * fcontroller
need a pointer to the controller to send messages, validation, click...
Definition: GUIMainFrame.h:45
Main controller of the application, linked to the view GUIMainFrame.
TGCompositeFrame * GetFrame()
Definition: GUIMainFrame.h:78
void UpdateRT(std::vector< std::string > &message)
set by thread of fstockmanger, register the message in frealtime2 and quit
TGPopupMenu * fMenuFile
Definition: GUIMainFrame.h:62
virtual ~GUIMainFrame()
void CloseWindow()
TGHorizontalFrame * fHframe0
main sub-window for both IndicatorFrame and THStockFrame, owns by GUIMainFrame now will be the main f...
Definition: GUIMainFrame.h:56
void PrintList()
for info, depreceated, only one frame0 here
TGLayoutHints * fMenuBarItemLayout
Definition: GUIMainFrame.h:66
GUIMainframe definition.
Definition: GUIMainFrame.h:31
void CheckUpdateRT()
Slot for TimeOut of ReaTime2.
void HandlePopdown()
Definition: GUIMainFrame.h:85
ClassDef(GUIMainFrame, 0)
void HandleMenu(Int_t id)
slots
TGMenuBar * fMenuBar
Definition: GUIMainFrame.h:61
GUIMainFrame(const TGWindow *p, UInt_t w, UInt_t h, GUIMainController *control)
EMainFrameIdentifier
try to use as private
Definition: GUIMainFrame.h:38
void CreateMenu()
private methods