mirror of
https://github.com/sesps/EventBuilder_Skeleton.git
synced 2025-03-03 16:08:51 -05:00
Fixed some FileView jank in the gui
This commit is contained in:
parent
0b00f0e422
commit
36bfd91e59
|
@ -11,6 +11,8 @@ EVBMainFrame::EVBMainFrame(const TGWindow* p, UInt_t w, UInt_t h) :
|
|||
SetCleanup(kDeepCleanup);
|
||||
MAIN_W = w; MAIN_H = h;
|
||||
|
||||
fInfo = new TGFileInfo();
|
||||
|
||||
//Organization hints
|
||||
TGLayoutHints *fchints = new TGLayoutHints(kLHintsExpandX|kLHintsExpandY,5,5,5,5);
|
||||
TGLayoutHints *fhints = new TGLayoutHints(kLHintsExpandX|kLHintsCenterY,5,5,5,5);
|
||||
|
@ -131,6 +133,7 @@ EVBMainFrame::EVBMainFrame(const TGWindow* p, UInt_t w, UInt_t h) :
|
|||
EVBMainFrame::~EVBMainFrame()
|
||||
{
|
||||
Cleanup();
|
||||
delete fInfo;
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
@ -142,9 +145,17 @@ void EVBMainFrame::CloseWindow()
|
|||
void EVBMainFrame::HandleMenuSelection(int id)
|
||||
{
|
||||
if(id == M_SAVE_CONFIG)
|
||||
new FileViewFrame(gClient->GetRoot(), this, MAIN_W*0.5, MAIN_H*0.25, this, M_SAVE_CONFIG);
|
||||
{
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, fInfo);
|
||||
if(fInfo->fFilename)
|
||||
SaveConfig(fInfo->fFilename);
|
||||
}
|
||||
else if(id == M_LOAD_CONFIG)
|
||||
new FileViewFrame(gClient->GetRoot(), this, MAIN_W*0.5, MAIN_H*0.25, this, M_LOAD_CONFIG);
|
||||
{
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, fInfo);
|
||||
if(fInfo->fFilename)
|
||||
LoadConfig(fInfo->fFilename);
|
||||
}
|
||||
else if(id == M_EXIT)
|
||||
CloseWindow();
|
||||
}
|
||||
|
@ -156,12 +167,16 @@ void EVBMainFrame::DoOpenWorkdir()
|
|||
|
||||
void EVBMainFrame::DoOpenSMapfile()
|
||||
{
|
||||
new FileViewFrame(gClient->GetRoot(), this, MAIN_W*0.5, MAIN_H*0.25, this, SMAP);
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, fInfo);
|
||||
if(fInfo->fFilename)
|
||||
DisplaySMap(fInfo->fFilename);
|
||||
}
|
||||
|
||||
void EVBMainFrame::DoOpenScalerfile()
|
||||
{
|
||||
new FileViewFrame(gClient->GetRoot(), this, MAIN_W*0.5, MAIN_H*0.25, this, SCALER);
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, fInfo);
|
||||
if(fInfo->fFilename)
|
||||
DisplayScaler(fInfo->fFilename);
|
||||
}
|
||||
|
||||
void EVBMainFrame::DoRun()
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <TGMenu.h>
|
||||
#include <TGTextViewStream.h>
|
||||
#include <TGProgressBar.h>
|
||||
#include <TGFileDialog.h>
|
||||
#include <TTimer.h>
|
||||
#include <TGComboBox.h>
|
||||
#include "../evb/EVBApp.h"
|
||||
|
@ -72,6 +73,8 @@ private:
|
|||
|
||||
TGPopupMenu *fFileMenu;
|
||||
|
||||
TGFileInfo *fInfo;
|
||||
|
||||
EventBuilder::EVBApp fBuilder;
|
||||
|
||||
int counter;
|
||||
|
|
|
@ -29,7 +29,7 @@ FileViewFrame::FileViewFrame(const TGWindow* p, const TGFrame* main, UInt_t w, U
|
|||
|
||||
/*Layout orgainization hints*/
|
||||
TGLayoutHints *fhints = new TGLayoutHints(kLHintsCenterX|kLHintsCenterY,5,5,5,5);
|
||||
TGLayoutHints *thints = new TGLayoutHints(kLHintsExpandX|kLHintsCenterY,5,5,5,5);
|
||||
TGLayoutHints *thints = new TGLayoutHints(kLHintsExpandX|kLHintsBottom,5,5,5,5);
|
||||
TGLayoutHints *fchints = new TGLayoutHints(kLHintsExpandX|kLHintsExpandY,5,5,5,5);
|
||||
TGLayoutHints *lhints = new TGLayoutHints(kLHintsLeft|kLHintsTop,5,5,5,5);
|
||||
TGLayoutHints *fbhints = new TGLayoutHints(kLHintsCenterX|kLHintsBottom,5,5,5,5);
|
||||
|
|
Loading…
Reference in New Issue
Block a user