GUIUtils.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \namespace genie::utils::gui
5 
6 \brief Simple utilities for GENIE Graphical User Interface widgets
7 
8 \author Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
9  University of Liverpool & STFC Rutherford Appleton Laboratory
10 
11 \created January 12, 2004
12 
13 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15 */
16 //____________________________________________________________________________
17 
18 #ifndef _GUI_UTILS_H_
19 #define _GUI_UTILS_H_
20 
21 #include <vector>
22 #include <string>
23 
24 #include <TGListBox.h>
25 #include <TGComboBox.h>
26 
27 using std::vector;
28 using std::string;
29 
30 namespace genie {
31 namespace utils {
32 namespace gui
33 {
34  //-- ListBox methods
35 
36  void FillListBox (TGListBox * lb, const char * lbitems[]);
37  void FillListBox (TGListBox * lb, const vector<string> * lbitems);
38  void SelectAllListBoxEntries (TGListBox * lb);
39  void ResetAllListBoxSelections (TGListBox * lb);
40  string ListBoxSelectionAsString (TGListBox * lb, const char * lbitems[]);
41  int ListBoxSelectionId (const char * lbitems[], const char * sel);
42 
43  //-- ComboBox methods
44 
45  void FillComboBox (TGComboBox * cb, const char * cbitems[]);
46  void FillComboBox (TGComboBox * cb, const vector<string> * cbitems);
47  string ComboBoxSelectionAsString (TGComboBox * cb, const char * cbitems[]);
48  int ComboBoxSelectionId (const char * cbitems[], const char * sel);
49 
50 } // gui namespace
51 } // utils namespace
52 } // genie namespace
53 
54 #endif // _GUI_UTILS_H_
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
void FillComboBox(TGComboBox *cb, const char *cbitems[])
Definition: GUIUtils.cxx:117
std::string string
Definition: nybbler.cc:12
void SelectAllListBoxEntries(TGListBox *lb)
Definition: GUIUtils.cxx:48
struct vector vector
void ResetAllListBoxSelections(TGListBox *lb)
Definition: GUIUtils.cxx:58
string ListBoxSelectionAsString(TGListBox *lb, const char *lbitems[])
Definition: GUIUtils.cxx:78
string ComboBoxSelectionAsString(TGComboBox *cb, const char *cbitems[])
Definition: GUIUtils.cxx:142
int ComboBoxSelectionId(const char *cbitems[], const char *sel)
Definition: GUIUtils.cxx:151
Definition: utils.py:1
void FillListBox(TGListBox *lb, const char *lbitems[])
Definition: GUIUtils.cxx:22
int ListBoxSelectionId(const char *lbitems[], const char *sel)
Definition: GUIUtils.cxx:105