JG ROOT Tools libraries
version 5.0 - august 2014
|
#include <RGListRequester.hh>
Public Member Functions | |
RGListRequester (const TGWindow *parent, const TGWindow *main, const string items[], const u_int items_num, int &result, bool *&table, const char *title, const char *buttons=rDico.brq_ok_cancel.c_str(), const ULong_t opts=0, const int &display=0, const bool auto_start=true) | |
RGListRequester (const TGWindow *parent, const TGWindow *main, const string items[], const u_int items_num, int &result, int &selection, const char *title, const char *buttons=rDico.brq_ok_cancel.c_str(), const ULong_t opts=0, const int &display=0, const bool auto_start=true) | |
RGListRequester (const TGWindow *parent, const TGWindow *main, const string items[], const u_int items_num, int &selection, const char *title, const char *buttons=rDico.brq_ok_cancel.c_str(), const ULong_t opts=0, const int &display=0, const bool auto_start=true) | |
RGListRequester (const TGWindow *parent, const TGWindow *main, const string *items, const u_int items_num, const char *title, const char *buttons=rDico.brq_ok_cancel.c_str(), const ULong_t opts=0, const int &display=0, const bool multi=false) | |
virtual | ~RGListRequester () |
virtual void | Construct () |
virtual void | MapRequester () |
virtual void | ItemSelected (Int_t n) |
virtual void | DoubleClicked (Int_t n) |
virtual void | ProcessButton (Int_t n) |
ClassDef (RGListRequester, 0) | |
![]() | |
RGBaseRequester (const TGWindow *parent, const TGWindow *main, int &result, const char *title, const char *buttons=rDico.brq_ok_cancel.c_str(), const ULong_t opts=0, const bool auto_start=true) | |
RGBaseRequester (const TGWindow *parent, const TGWindow *main, const char *title, const char *buttons=rDico.brq_ok_cancel.c_str(), const ULong_t opts=0, const bool auto_start=false) | |
virtual | ~RGBaseRequester () |
virtual void | Request () |
virtual TGCompositeFrame * | GetFrame () const |
virtual TGHorizontalFrame * | GetHFrame () const |
virtual TGVerticalFrame * | GetVFrame () const |
virtual void | AddFrame (TGFrame *f, TGLayoutHints *l=0) |
virtual void | CloseFromButton () |
virtual void | CancelClose (const Bool_t b=kTRUE) |
virtual void | ReqButtonClicked (Int_t n) |
virtual void | ProcessedEvent (Event_t *event) |
virtual void | Button (Int_t n) |
virtual void | Quit () |
ClassDef (RGBaseRequester, 0) | |
Protected Attributes | |
int * | select_adr |
Pointer on selection result (single selection) | |
bool * | select_table |
Array of selection values (multiple selection) | |
int | selected |
Selected element (last) | |
bool | select_multi |
Multiple selection flag. | |
const string * | items_list |
Array of list elements names. | |
int | items_number |
Number of elements. | |
int | max_visible |
Display: number of visible elements. | |
UInt_t | list_width |
List width. | |
UInt_t | list_height |
List height. | |
RGItemListBox * | w_select_list |
Selection list widget. | |
![]() | |
int * | result_adr |
Request resul pointer. | |
string | req_title |
Request title. | |
const char * | req_buttons |
Buttons texts. | |
UInt_t | options |
Request options. | |
ULong_t | req_button_layout |
Buttons layout. | |
TGCompositeFrame * | w_widget_frame |
Frame for widgets. | |
TGCompositeFrame * | w_buttons_frame |
Frame for buttons. | |
TList | buttons_list |
List of created buttons. | |
Bool_t | cancel_close |
Check for close cancellation. | |
Private Member Functions | |
GObject (RGListRequester) | |
RGListRequester (const RGListRequester &req) | |
Additional Inherited Members | |
![]() | |
RGBaseRequester (const RGBaseRequester &req) | |
![]() | |
static UInt_t | max_width = 1200 |
Maximum request width. | |
static UInt_t | max_height = 800 |
Maximum request height. | |
class RGListRequester
Request for a selection in a list of elements, presented with a text name.
Depending on the constructor, the request returns (N beeing the number of entries):
According to the case, the returned value in case of cancellation may be modified.
Specific options:
RGListRequester::RGListRequester | ( | const TGWindow * | parent, |
const TGWindow * | main, | ||
const string | items[], | ||
const u_int | items_num, | ||
int & | result, | ||
bool *& | table, | ||
const char * | title, | ||
const char * | buttons = rDico.brq_ok_cancel.c_str() , |
||
const ULong_t | opts = 0 , |
||
const int & | display = 0 , |
||
const bool | auto_start = true |
||
) |
Constructor for a request with button number return and an array of logical values corresponding to selection state of the elements (multiple selection).
If array pointer table is NULL, the array is allocated and the calling program is responsible for deleting it. Else, the allocated array must be at least the number of elements.
The result argument receives the button value.
parent | parent window |
main | main application window |
items | array of element names |
items_num | number of elements |
result | return value |
table | array of selection results |
title | title |
buttons | buttons texts |
opts | options |
display | maximum numbe |
auto_start | flag for execution at construction |
References Construct(), items_list, items_number, max_visible, RGBaseRequester::Request(), select_adr, select_multi, select_table, and selected.
RGListRequester::RGListRequester | ( | const TGWindow * | parent, |
const TGWindow * | main, | ||
const string | items[], | ||
const u_int | items_num, | ||
int & | result, | ||
int & | selection, | ||
const char * | title, | ||
const char * | buttons = rDico.brq_ok_cancel.c_str() , |
||
const ULong_t | opts = 0 , |
||
const int & | display = 0 , |
||
const bool | auto_start = true |
||
) |
Constructor for a request with button number return and the selected item number (single selection) in selection argument. The selection value ranges from 0 to number of elements minus one, or -1 if no element is selected.
In case of cancellation, the initial value of result is not modified.
parent | parent window |
main | main application window |
items | array of element names |
items_num | number of elements |
result | return value |
selection | selection result |
title | title |
buttons | buttons texts |
opts | options |
display | maximum numbe |
auto_start | flag for execution at construction |
References Construct(), items_list, items_number, max_visible, RGBaseRequester::Request(), select_adr, select_multi, select_table, and selected.
RGListRequester::RGListRequester | ( | const TGWindow * | parent, |
const TGWindow * | main, | ||
const string | items[], | ||
const u_int | items_num, | ||
int & | selection, | ||
const char * | title, | ||
const char * | buttons = rDico.brq_ok_cancel.c_str() , |
||
const ULong_t | opts = 0 , |
||
const int & | display = 0 , |
||
const bool | auto_start = true |
||
) |
Constructor for a request with return of the selected item number (single selection) in selection argument. The selection value ranges from 0 to number of elements minus one, or -1 if no element is selected.
In case of cancellation, the initial value of result is not modified.
parent | parent window |
main | main application window |
items | array of element names |
items_num | number of elements |
selection | selection result |
title | title |
buttons | buttons texts |
opts | options |
display | maximum numbe |
auto_start | flag for execution at construction |
References Construct(), items_list, items_number, max_visible, RGBaseRequester::Request(), RGBaseRequester::result_adr, select_adr, select_multi, select_table, and selected.
RGListRequester::RGListRequester | ( | const TGWindow * | parent, |
const TGWindow * | main, | ||
const string * | items, | ||
const u_int | items_num, | ||
const char * | title, | ||
const char * | buttons = rDico.brq_ok_cancel.c_str() , |
||
const ULong_t | opts = 0 , |
||
const int & | display = 0 , |
||
const bool | multi = false |
||
) |
Constructor for a request without return value, for use in derived classes.
parent | parent window |
main | main application window |
items | array of element names |
items_num | number of elements |
title | title |
buttons | buttons texts |
opts | options |
display | maximum numbe |
multi | flag for allowed multiple selection |
References items_list, items_number, max_visible, RGBaseRequester::result_adr, select_adr, select_multi, select_table, and selected.
|
private |
Copy constructor, not implemented.
req | request to copy |
|
virtual |
Destructor.
|
private |
Macro from GCpp library that defines the following functions:
|
virtual |
Construction: set specific widgets.
Reimplemented from RGBaseRequester.
References RGBaseRequester::AddFrame(), RGItemListBox::AddItem(), RGItemListBox::GetItemNumber(), RGItemListBox::GetListBox(), items_list, items_number, list_height, list_width, max_visible, RGItemListBox::Select(), select_adr, select_multi, select_table, selected, RGItemListBox::UpdateListBox(), and w_select_list.
Referenced by RGListRequester().
|
virtual |
Function displaying the request.
Reimplemented from RGBaseRequester.
References RGItemListBox::GetListBox(), list_height, list_width, RGBaseRequester::max_height, RGBaseRequester::max_width, RGBaseRequester::req_title, RGBaseRequester::result_adr, and w_select_list.
|
virtual |
Slot called when an element is selected (single selection).
n | selected element number |
References RGItemListBox::GetSelection(), selected, and w_select_list.
|
virtual |
Slot called when an element is double-clicked (single selection).
n | selected element number |
References RGBaseRequester::CloseFromButton(), RGBaseRequester::options, ProcessButton(), and selected.
|
virtual |
Slot used to get the button clicked (from base requester signal), and adapt actions to the type of request.
n | requester button identifier |
References RGBaseRequester::CancelClose(), RGItemListBox::GetSelection(), items_number, RGBaseRequester::result_adr, select_adr, select_table, selected, and w_select_list.
Referenced by DoubleClicked().
RGListRequester::ClassDef | ( | RGListRequester | , |
0 | |||
) |
For ROOT dictionary.