/////////////////////////////////////////////////////////////////////////// // // // TGMrbValuesAndText // // // // This class implements a // // general purpose dialog widget to request input of a text string // // and any number of ints, floats, colors etc. arranged in a table // // // // The string input part implements a history and text completion // // facility, for this to work a file containing the history and // // a TList containing TObjStrings must be provided // // // // The meaning of the requested values are stored in the first 11 // // characters terminated by _, +, - of the row labels as follows: // // The termination char _, +, - determine if the dialog entry starts // // on new row: _: start new row, // // +: continue on same row, equalize distances // // -: continue on same row, pack as close as possible // // The remainder of the text is the label of the button // // // // StringValue : Text string (this has no history/text completion // // PlainShtVal : Short_t // // PlainIntVal : Int_t // // DoubleValue : Double_t // // Float_Value : Float_t // // Min,max values may be given after the label field separated by ; // // (semicolon) // // ArrowSelect : a arrow selection (Style_t) // // LineSSelect : Line Style (Style_t) // // CfontSelect : Character Font (Font_t) // // AlignSelect : Text alignment (Style_t) // // Fill_Select : Fill style // // Mark_Select : Marker style // // ColorSelect : Color_t // // ComboSelect : a Combo box // // RadioButton : radio button // // CheckButton : check button // // DoubleV+CbF : a double + a CheckButton label "Fix" // // DoubleV+CbU : a double + a CheckButton label "Use" // // Exec_Button : only emit signal button clicked // // FileRequest : file name (invokes file dialog) // // FileContReq : invoke file dialog and present listbox with content // // : arg: filename | classname | object name // // // // Pressing one of the above buttons emits a signal which is connected // // to a slot: CRButtonPressed(Int_t wid, Int_t bid, TObject *obj) // // which must be implemented in the "calling_class" // // // // CommandButt : Command button implemented as follows: // // assume: CommandButt_DrawArrow() // // when pressed will emit: // // ("Clicked()", Char_t * cname, // // TObject * calling_class,"DrawArrow()") // // Note: A CommandButt can be connected to any slot (method) whereas // // an Exec_Button is connected to a fixed slot // // // // // // Calling sequence: // // // // fDialog = new TMrbValuesAndText(prompt, text, retval, win_width ... // // // // required arguments: // // // // const char *prompt: the Prompt string // // TString * text: the value of the string // // Int_t * retval : 0 if ok pressed, -1 if cancel // // Int_t win_width : Width (pixels) of the dialog widget // // // // optional arguments: // // // // TGWindow *win pointer to parent window for placement purpose // // Char_t * History a file containing lines from which a selection // // may be made, a TGListBox is used in this case // // This is used to store newly type text lines not // // yet in the list // // TList * Complist: list containing TObjStrings used for // // text completion (tab) // // TList * rowlabs: List of TObjStrings of row labels // // void ** valpointers array with pointers to the requested values // // TArrayI * Flags pointer to integer array of flags, a checkbutton // // is added to each value // // Char_t * flaglabel label of the (optional)flags / checkbuttons // // column // // Char_t * helptext helptext displayed when pressing (optional) // // Help button // // The following 2 args are compulsary if a command button is used // // // // TObject * class pointer to the calling class used in the emitted // // signal triggered by a command button // // Char_t * classname name of the calling class // // // // // // Values in the widget are normally only updated if changed from the // // keyboard by the user. If a value is changed within the program and // // this change should be reflected in the widget the following calls // // are needed (assume fDialog pointing to the widget: // // // // if ( fDialog ) { // // fDialog->ReloadValues(); // // fDialog->DoNeedRedraw(); // // } // // // // // ///////////////////////////////////////////////////////////////////////////