27 #ifdef DEBUG_CONT_FRAME
28 std::cout <<
"\n\tEntry Constructor GUIMainFrame" << std::endl;
34 SetCleanup ( kDeepCleanup );
43 tt->Start(1000,
false );
45 SetName(
"GUIMainFrame");
53 AddFrame(fHframe0,
new TGLayoutHints( kLHintsLeft | kLHintsExpandX | kLHintsExpandY ,2,2,2,2));
62 SetWindowName(
"GUIStock");
66 std::cout <<
"GetStatus RealTime2 " << frealtime2->GetStatus() << std::endl;
70 frealtime2->Connect(
"Timeout()",
"GUIMainFrame",
this,
"CheckUpdateRT()");
73 frealtime2->Start( 1000 );
78 #ifdef DEBUG_CONT_FRAME
79 std::cout <<
"Destructor GUIMainFrame" << std::endl;
91 #ifdef DEBUG_CONT_FRAME
92 std::cout <<
"after cleanup destructor GUIMainFrame" << std::endl;
100 fMenuFile =
new TGPopupMenu(fClient->GetDefaultRoot());
106 fMenuFile->Connect(
"Activated(Int_t)",
"GUIMainFrame",
this,
"HandleMenu(Int_t)");
107 fMenuFile->Connect(
"PoppedUp()",
"GUIMainFrame",
this,
"HandlePopup()");
108 fMenuFile->Connect(
"PoppedDown()",
"GUIMainFrame",
this,
"HandlePopdown()");
111 fMenuUpdate =
new TGPopupMenu( fClient->GetDefaultRoot());
116 fMenuUpdate->Connect(
"Activated(Int_t)",
"GUIMainFrame",
this,
"HandleMenu(Int_t)");
119 fMenuBarLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 1, 1);
123 fMenuBar =
new TGMenuBar(
this, 1, 1, kHorizontalFrame);
135 #ifdef DEBUG_CONT_FRAME
136 std::cout <<
"Entry GUIMainFrame::CloseWindow()" << std::endl;
142 gApplication->Terminate();
209 std::cout <<
"\n\t UpdateCSV not implemented" << std::endl;
219 std::cout <<
"\n\tUpdate dCSV realtime not yet really implemented " << std::endl;
227 std::cout <<
"Menu item " <<
id <<
"Selected but not implemented" << std::endl;
239 #ifdef DEBUG_CONT_FRAME
241 std::cout <<
"\n\t GUIMainFrame::UpdateRT( message ) " << std::endl;
249 #ifdef DEBUG_CONT_FRAME
250 std::cout <<
"\n\t GUIMainFrame::CheckUpdateRT " << std::endl;
253 std::vector<std::string > message;
256 if ( message.empty() ) {
257 #ifdef DEBUG_CONT_FRAME
258 std::cout <<
"CkeckUpdateRT, Message is empty return " << std::endl;
275 std::cout <<
"GUIMainFrame::PrintList " << std::endl;
276 std::cout <<
"List of fHframe0 " << std::endl;
TGPopupMenu * fMenuUpdate
TGLayoutHints * fMenuBarLayout
virtual void Updated(std::vector< std::string > &message)
Called through the timer RT2, when new data are present.
RealTime2 * frealtime2
RealTime, singleton, initialized in constructor, set to on by default keep in main frame because ROOT...
GUIMainController * fcontroller
need a pointer to the controller to send messages, validation, click...
Main controller of the application, linked to the view GUIMainFrame.
void UpdateRT(std::vector< std::string > &message)
set by thread of fstockmanger, register the message in frealtime2 and quit
void SetMessage(std::vector< std::string > &message)
deal with the list, fill and remove, protected by lock_guard
RealTime2 derives from TTimer.
TGHorizontalFrame * fHframe0
main sub-window for both IndicatorFrame and THStockFrame, owns by GUIMainFrame now will be the main f...
Garbage collector for ROOT TObjects.
static RealTime2 * getInstance()
public access
void PrintList()
for info, depreceated, only one frame0 here
static Garbage & getInstance()
TGLayoutHints * fMenuBarItemLayout
void CheckUpdateRT()
Slot for TimeOut of ReaTime2.
ClassImp(GUIMainFrame) GUIMainFrame
void HandleMenu(Int_t id)
slots
Main graphic frame for GUIStock application.
std::vector< std::string > GetMessage()
void CreateMenu()
private methods