4 #include "KVNameValueListGUI.h"
21 text->Resize(
text->GetDefaultWidth(),
text->GetDefaultHeight());
84 else if (par->
IsInt()) {
112 void KVNameValueListGUI::DisplayDialog()
121 kMWMDecorMinimize | kMWMDecorMenu,
122 kMWMFuncAll | kMWMFuncResize | kMWMFuncMaximize |
123 kMWMFuncMinimize, kMWMInputModeless);
139 : fData(params->GetNpar()), fWaitForMain(wait_for_main)
144 fMain->
Connect(
"CloseWindow()",
"KVNameValueListGUI",
this,
"DoClose()");
194 fOKBut->
Connect(
"Clicked()",
"KVNameValueListGUI",
this,
"ReadData()");
195 fOKBut->
Connect(
"Clicked()",
"KVNameValueListGUI",
this,
"DoClose()");
262 Warning(
"EnableDependingOnBool",
"No boolean parameter with name \"%s\" in list", bool_parameter.
Data());
269 Warning(
"EnableDependingOnBool",
"No parameter with name \"%s\" in list", value_to_enable.
Data());
275 bool_widget->Connect(
"Toggled(Bool_t)", value_widget->IsA()->GetName(), value_widget,
"SetState(Bool_t)");
277 bool_widget->Connect(
"Toggled(Bool_t)", value_widget->IsA()->GetName(), value_widget,
"SetEnabled(Bool_t)");
Option_t Option_t TPoint TPoint const char text
GUI for setting KVNameValueList parameters.
TObject * GetDataWidget(int i) const
virtual TObject * AddABool(Int_t i, TGHorizontalFrame *hf)
virtual TObject * AddAString(Int_t i, TGHorizontalFrame *hf)
virtual TObject * AddAInt(Int_t i, TGHorizontalFrame *hf)
KVNameValueListGUI(const TGWindow *main, KVNameValueList *params, Bool_t *cancel_pressed, Bool_t wait_for_main=kTRUE)
Constructor.
bool EnableDependingOnBool(const TString &value_to_enable, const TString &bool_parameter)
virtual TObject * AddADouble(Int_t i, TGHorizontalFrame *hf)
virtual ~KVNameValueListGUI()
Destructor.
TGTextButton * fCancelBut
Cancel button.
void RestoreData()
return all values to original state
TGTextButton * fOKBut
OK button.
KVNameValueList * theList
KVNameValueList fOriginal
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
KVNamedParameter * GetParameter(Int_t idx) const
return the parameter object with index idx
Double_t GetDoubleValue(const Char_t *name) const
const Char_t * GetNameAt(Int_t idx) const
Int_t GetNpar() const
return the number of stored parameters
Bool_t HasBoolParameter(const Char_t *name) const
Bool_t GetBoolValue(const Char_t *name) const
Bool_t HasParameter(const Char_t *name) const
void Copy(TObject &nvl) const
A generic named parameter storing values of different types.
void Set(const char *, const char *)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
UInt_t GetDefaultWidth() const override
void MapSubwindows() override
UInt_t GetDefaultHeight() const override
void SetCleanup(Int_t mode=kLocalCleanup) override
virtual UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
virtual void Resize(TGDimension size)
void MapWindow() override
void SetWMSize(UInt_t w, UInt_t h)
void SetWindowName(const char *name=nullptr) override
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
virtual void SetState(Bool_t enable=kTRUE)
UInt_t GetDefaultHeight() const override
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
const char * GetTitle() const override
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
const char * Data() const
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
int main(int argc, char **argv)
Double_t Max(Double_t a, Double_t b)