JG ROOT Tools libraries
version 5.0 - august 2014
|
#include <RGTreeRequester.hh>
Public Member Functions | |
RGTreeRequester (const TGWindow *parent, const TGWindow *main, GItemTreeBranch *tree_root, int &result, GItemList &sel_list, const char *title, const char *buttons=rDico.brq_ok_cancel.c_str(), ULong_t opts=0, bool auto_start=true) | |
RGTreeRequester (const TGWindow *parent, const TGWindow *main, GItemTreeBranch *tree_root, int &result, GItemTreeNode *&sel_item, const char *title, const char *buttons=rDico.brq_ok_cancel.c_str(), ULong_t opts=0, bool auto_start=true) | |
RGTreeRequester (const TGWindow *parent, const TGWindow *main, GItemTreeBranch *tree_root, GItemTreeNode *&sel_item, const char *title, const char *buttons=rDico.brq_ok_cancel.c_str(), ULong_t opts=0, bool auto_start=true) | |
RGTreeRequester (const TGWindow *parent, const TGWindow *main, GItemTreeBranch *tree_root, const char *title, const char *buttons=rDico.brq_ok_cancel.c_str(), ULong_t opts=0, bool multi=false, bool auto_start=false) | |
virtual | ~RGTreeRequester () |
virtual void | Construct () |
virtual void | MapRequester () |
RGItemTreeSelector * | GetItemTreeSelector () |
virtual void | SingleSelected (ULong64_t leaf_ptr) |
virtual void | ProcessButton (Int_t n) |
ClassDef (RGTreeRequester, 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 | |
bool | select_multi |
Multiple selection flag. | |
GItemTreeBranch * | items_tree |
Tree structure of GItems (or RGItems) | |
GItemList * | selected_list |
Pointer to the list of selected items (multiple selection) | |
GItemTreeNode ** | selected_item |
Pointer to the selected item node (single selection) | |
RGItemTreeSelector * | w_select_tree |
Selection tree 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. | |
Static Protected Attributes | |
static UInt_t | tree_min_width = 160 |
Minimum tree width. | |
static UInt_t | tree_min_height = 240 |
Minimum tree height. | |
![]() | |
static UInt_t | max_width = 1200 |
Maximum request width. | |
static UInt_t | max_height = 800 |
Maximum request height. | |
Private Member Functions | |
GObject (RGTreeRequester) | |
RGTreeRequester (const RGTreeRequester &req) | |
Additional Inherited Members | |
![]() | |
RGBaseRequester (const RGBaseRequester &req) | |
class RGTreeRequester
Request for a selection (single or multiple) in a tree of elements, given by a tree structure of GItems.
Note that the tree structure is not modified by the requester. Only the selection flag of tree items may be changed.
Depending on the constructor, the request returns a single or a multiple selection, and the button result.
The tree structure is described in the RGItemTreeSelector widget documentation.
For the multiple selection, only items (leaves= can be selected. The folders do not belong to the selection.
The single selection allows to select either an item (leaf) or a folder (branch), except if the rgReqNoFolder option is defined (at requester creation).
RGTreeRequester::RGTreeRequester | ( | const TGWindow * | parent, |
const TGWindow * | main, | ||
GItemTreeBranch * | tree_root, | ||
int & | result, | ||
GItemList & | sel_list, | ||
const char * | title, | ||
const char * | buttons = rDico.brq_ok_cancel.c_str() , |
||
ULong_t | opts = 0 , |
||
bool | auto_start = true |
||
) |
Constructor for a request with button return value and a list of selected items (multiple selection).
The result argument receives the button value. The sel_list argument receives a list of the selected items (copies). The selection flags of items in the tree structure (given by tree_root argument) are modified by the user selections.
parent | parent window |
main | main application window |
tree_root | items (GItem or RGItem objects) tree structure |
result | return value |
sel_list | resulting list of selected items |
title | title |
buttons | buttons texts |
opts | options |
auto_start | flag for execution at construction |
References Construct(), items_tree, RGBaseRequester::Request(), select_multi, selected_item, selected_list, and w_select_tree.
RGTreeRequester::RGTreeRequester | ( | const TGWindow * | parent, |
const TGWindow * | main, | ||
GItemTreeBranch * | tree_root, | ||
int & | result, | ||
GItemTreeNode *& | sel_item, | ||
const char * | title, | ||
const char * | buttons = rDico.brq_ok_cancel.c_str() , |
||
ULong_t | opts = 0 , |
||
bool | auto_start = true |
||
) |
Constructor for a request with button return value and a single selected item (single selection).
The result argument receives the button value. The sel_item argument receives a pointer to the selected item (the pointer refers to an item existing in the tree, or NULL).
parent | parent window |
main | main application window |
tree_root | items (GItem or RGItem objects) tree structure |
result | return value |
sel_item | pointer to resulting selected (single) item node |
title | title |
buttons | buttons texts |
opts | options |
auto_start | flag for execution at construction |
References Construct(), items_tree, RGBaseRequester::Request(), select_multi, selected_item, selected_list, and w_select_tree.
RGTreeRequester::RGTreeRequester | ( | const TGWindow * | parent, |
const TGWindow * | main, | ||
GItemTreeBranch * | tree_root, | ||
GItemTreeNode *& | sel_item, | ||
const char * | title, | ||
const char * | buttons = rDico.brq_ok_cancel.c_str() , |
||
ULong_t | opts = 0 , |
||
bool | auto_start = true |
||
) |
Constructor for a request with return of a single selected item (single selection). There is no button return value: in case of cancellation (button value 0), a NULL pointer is returned for the selected item. For all other buttons value, the item pointer is returned if an item is selected.
parent | parent window |
main | main application window |
tree_root | items (GItem or RGItem objects) tree structure |
sel_item | pointer to resulting selected (single) item node |
title | title |
buttons | buttons texts |
opts | options |
auto_start | flag for execution at construction |
References Construct(), items_tree, RGBaseRequester::Request(), select_multi, selected_item, selected_list, and w_select_tree.
RGTreeRequester::RGTreeRequester | ( | const TGWindow * | parent, |
const TGWindow * | main, | ||
GItemTreeBranch * | tree_root, | ||
const char * | title, | ||
const char * | buttons = rDico.brq_ok_cancel.c_str() , |
||
ULong_t | opts = 0 , |
||
bool | multi = false , |
||
bool | auto_start = false |
||
) |
Constructor for a request without return value. This constructor may be used in derived classes. It may also be used to define a multiple selection requester since the selected items can be found using selection flag of the items (this is not the case for single selection, that does not change the selection flag of tree items).
parent | parent window |
main | main application window |
tree_root | items (GItem or RGItem objects) tree structure |
title | title |
buttons | buttons texts |
opts | options |
multi | flag for allowed multiple selection |
auto_start | flag for execution at construction |
References Construct(), items_tree, RGBaseRequester::Request(), select_multi, selected_item, selected_list, and w_select_tree.
|
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(), items_tree, RGItemTreeSelector::RecreateTreeDisplay(), select_multi, RGItemTreeSelector::SetRootNode(), tree_min_height, tree_min_width, and w_select_tree.
Referenced by RGTreeRequester().
|
virtual |
Function displaying the request.
Reimplemented from RGBaseRequester.
References RGBaseRequester::req_title.
|
inline |
Return the pointer to the RGItemTreeSelector widget.
References w_select_tree.
Referenced by RGItemTreeSelector::MoveSelectedToFolder().
|
virtual |
Slot used in single selection mode for validation from return key or double-click.
leaf_ptr | pointer of selected leaf in the tree (converted to ULong64_t) |
References RGBaseRequester::cancel_close, RGBaseRequester::CloseFromButton(), ProcessButton(), and w_select_tree.
|
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(), RGItemTreeSelector::GetSelected(), RGItemTreeSelector::GetSelectedLeaf(), items_tree, RGBaseRequester::options, RGBaseRequester::result_adr, select_multi, selected_item, selected_list, and w_select_tree.
Referenced by SingleSelected().
RGTreeRequester::ClassDef | ( | RGTreeRequester | , |
0 | |||
) |
For ROOT dictionary.