5 #include "TEveManager.h"
21 std::vector<std::pair<std::string, std::string> >
names = {{
"GUI",
"Windows"},
22 {
"CommonPreferences",
"Colors"},
23 {
"EventNavigator",
"EventFilters"},
24 {
"EventItems",
"Collections"}};
28 if (
i->second == btnName)
36 if (
i->first == rlName)
47 : TGTransientFrame(gClient->GetRoot(),
FWGUIManager::getGUIManager()->getMainFrame(), 200, 140), m_cfgMng(iCfg) {
49 std::ifstream
g(
path);
59 TGVerticalFrame* vf =
new TGVerticalFrame(
this);
60 AddFrame(vf,
new TGLayoutHints(kLHintsNormal, 2, 2, 4, 4));
66 [](
const std::pair<std::string, FWConfiguration>& lhs,
const std::pair<std::string, FWConfiguration>& rhs)
67 ->
bool {
return nmm.btnName(lhs.first) < nmm.btnName(rhs.first); });
72 if (it->second.keyValues()) {
74 TGCheckButton* cb =
new TGCheckButton(vf, nb.c_str());
96 TGHorizontalFrame*
hf =
new TGHorizontalFrame(
this);
97 AddFrame(
hf,
new TGLayoutHints(kLHintsRight | kLHintsBottom, 1, 1, 2, 4));
98 TGTextButton*
load =
new TGTextButton(
hf,
" Load ");
99 load->Connect(
"Clicked()",
"FWPartialConfigLoadGUI",
this,
"Load()");
100 hf->AddFrame(
load,
new TGLayoutHints(kLHintsExpandX, 2, 2, 0, 0));
101 TGTextButton* cancel =
new TGTextButton(
hf,
" Cancel ");
102 cancel->Connect(
"Clicked()",
"FWPartialConfigGUI",
this,
"Cancel()");
103 hf->AddFrame(cancel,
new TGLayoutHints(kLHintsExpandX, 2, 2, 0, 0));
105 SetWindowName(
"Load Config");
114 bool resetViews =
true;
120 if (!((*i)->IsOn())) {
122 if (
key ==
"EventItems")
127 for (FWConfiguration::KeyValues::iterator it = kv->begin(); it != kv->end(); ++it) {
128 if (
key == it->first) {
142 gEve->DisableRedraw();
144 gEve->EnableRedraw();
155 :
FWPartialConfigGUI(nullptr, iCfg), m_outFileName(path_out), m_currFileName(path_in) {
156 TGHorizontalFrame*
hf =
new TGHorizontalFrame(
this);
157 AddFrame(
hf,
new TGLayoutHints(kLHintsRight | kLHintsBottom, 1, 1, 2, 4));
159 TGTextButton*
write =
new TGTextButton(
hf,
" Write ");
160 write->Connect(
"Clicked()",
"FWPartialConfigSaveGUI",
this,
"WriteConfig()");
161 hf->AddFrame(
write,
new TGLayoutHints(kLHintsExpandX, 2, 2, 0, 0));
163 TGTextButton* cancel =
new TGTextButton(
hf,
" Cancel ");
164 cancel->Connect(
"Clicked()",
"FWPartialConfigGUI",
this,
"Cancel()");
165 hf->AddFrame(cancel,
new TGLayoutHints(kLHintsExpandX, 2, 2, 0, 0));
167 AddFrame(
new TGLabel(
this, Form(
"Output file: %s", gSystem->BaseName(path_out))),
168 new TGLayoutHints(kLHintsLeft, 8, 2, 3, 3));
170 SetWindowName(
"Save Config");
183 if (
g.peek() == (
int)
'<') {
201 for (FWConfiguration::KeyValues::iterator it = cur_kv->begin(); it != cur_kv->end(); ++it) {
202 if (
key == it->first) {
205 for (FWConfiguration::KeyValues::iterator oldit = old_kv->begin(); oldit != old_kv->end(); ++oldit) {
206 if (
key == oldit->first) {
208 oldit->second.swap(it->second);