JG ROOT Tools libraries  version 5.0 - august 2014
RGContourListEdit Class Reference

#include <RGContourListEdit.hh>

Inheritance diagram for RGContourListEdit:
RGContourEdit RGGetPoints RGFrameEvent

Public Member Functions

 RGContourListEdit (const TGWindow *parent, TVirtualPad *pad, const char *title, RContourList &liste, const string &options="", const u_int flags=0, const bool auto_start=true)
 
virtual ~RGContourListEdit ()
 
virtual void Construct ()
 
virtual void Request ()
 
virtual void SetOptions (const string &opts="")
 
virtual void SetContourEditTitle ()
 
virtual void DoneButton ()
 
virtual void SelectContourButton ()
 
virtual void NewContourButton ()
 
virtual void DeleteContourButton ()
 
virtual void UpdateContourButton ()
 
virtual void ResetContourButton ()
 
virtual void ShowListButton ()
 
virtual void DeleteListButton ()
 
virtual void LoadListButton ()
 
virtual void AppendListButton ()
 
virtual void SaveListButton ()
 
 ClassDef (RGContourListEdit, 0)
 
- Public Member Functions inherited from RGContourEdit
 RGContourEdit (const TGWindow *main, TVirtualPad *pad, const char *title, RContour &ctr, const string &options="", const u_int flags=0, const bool auto_start=true)
 
 RGContourEdit (const TGWindow *main, TVirtualPad *pad, const char *title, const string &options="", const u_int flags=0, const bool auto_start=false)
 
virtual ~RGContourEdit ()
 
virtual void InfoWidgetMap ()
 
virtual void ContourTypeSelection (Int_t id)
 
virtual void ContourNameChanged (const char *str)
 
virtual void GateCenterButton ()
 
virtual void GateFlipHVButton ()
 
 ClassDef (RGContourEdit, 0)
 
- Public Member Functions inherited from RGGetPoints
 RGGetPoints (const TGWindow *main, TVirtualPad *pad, const char *title, UInt_t &nb, RPoint2D *&result, const string &options="", const u_int flags=0, const bool auto_start=true)
 
 RGGetPoints (const TGWindow *main, TVirtualPad *pad, const char *title, const string &options="", const u_int flags=0, const bool auto_start=false)
 
virtual ~RGGetPoints ()
 
virtual void EventLoop ()
 
virtual void Quit ()
 
virtual void SetContextHelpText (const string &text)
 
virtual void SetDimMode (Int_t m)
 
virtual void PadClosed ()
 
virtual void MouseSelect (const Double_t x, const Double_t y)
 
virtual void MouseMove (const Double_t x, const Double_t y)
 
virtual void MouseDelete (const Double_t x, const Double_t y)
 
virtual void MouseButton1Down (const Double_t x, const Double_t y)
 
virtual void MouseButton1Double (const Double_t x, const Double_t y)
 
virtual void MouseButton1Up (const Double_t x, const Double_t y)
 
virtual void MouseButton2Down (const Double_t x, const Double_t y)
 
virtual void MouseButton2Double (const Double_t x, const Double_t y)
 
virtual void MouseButton2Up (const Double_t x, const Double_t y)
 
virtual void MouseButton3Down (const Double_t x, const Double_t y)
 
virtual void MouseButton3Double (const Double_t x, const Double_t y)
 
virtual void MouseButton3Up (const Double_t x, const Double_t y)
 
virtual void Locate (const Double_t x, const Double_t y)
 
virtual void AnyEvent (const Double_t x, const Double_t y)
 
virtual void PointDeleted (RPointMark *p)
 
virtual void AddPoint (const Double_t x, const Double_t y, const bool select=true)
 
virtual void RemovePoint (RPointMark *p)
 
virtual void UpdatePointsNumber ()
 
virtual void UpdatePosition (const Double_t x, const Double_t y)
 
virtual void UpdatePointPosition (const UInt_t n)
 
virtual void PointNumberValueSet (Long_t val)
 
virtual void PointNumberTextChanged (const char *str)
 
virtual void PointSetButton ()
 
virtual void HelpButton ()
 
virtual void CancelButton ()
 
 ClassDef (RGGetPoints, 0)
 
- Public Member Functions inherited from RGFrameEvent
 RGFrameEvent (TVirtualPad *pad=gPad)
 
 RGFrameEvent (const RGFrameEvent &original)
 
RGFrameEventoperator= (const RGFrameEvent &original)
 
virtual ~RGFrameEvent ()
 
virtual void PadEvent (Int_t event, Int_t x, Int_t y, TObject *selected)
 
virtual void KeyPressed (const Int_t x, const Int_t y)
 
virtual void AltKeyPressed ()
 
virtual void CtrlKeyPressed ()
 
virtual void ShiftKeyPressed ()
 
virtual void ReturnKeyPressed ()
 
virtual void MouseButton1Locate (const Double_t x, const Double_t y)
 
virtual void MouseButton1Motion (const Double_t x, const Double_t y)
 
virtual void MouseButton2Locate (const Double_t x, const Double_t y)
 
virtual void MouseButton2Motion (const Double_t x, const Double_t y)
 
virtual void MouseButton3Locate (const Double_t x, const Double_t y)
 
virtual void MouseButton3Motion (const Double_t x, const Double_t y)
 
 ClassDef (RGFrameEvent, 0)
 

Protected Member Functions

virtual void UpdateWidgetsState ()
 
virtual void SetModified (const bool status=true)
 
virtual void SetModifiedList (const bool status=true)
 
virtual bool ModifiedListCheck ()
 
virtual void UpdateContourWidgets ()
 
virtual bool ContourNameCheck (const string &name, RContour *current=NULL)
 
virtual void ClearDisplayTable ()
 
virtual void CreateDisplayTable ()
 
virtual void RedrawContours (const bool recreate=true)
 
virtual void SetEditedContour (RContour *ctr)
 
virtual void DeleteContour (RContour *ctr, const bool update=true)
 
- Protected Member Functions inherited from RGContourEdit
virtual void SetContourPoints ()
 
virtual void SetContourType (const Int_t type)
 
virtual void UpdateContourType ()
 
virtual void UpdateContourInfo ()
 
virtual void UpdatePointAttr (RPointMark *p)
 
virtual void MovePoint (RPointMark *p, const Double_t x, const Double_t y)
 
virtual void DrawAssociatedObject ()
 
virtual bool ContourEditCheck ()
 
virtual void UpdateContour ()
 
- Protected Member Functions inherited from RGGetPoints
virtual void SetWindow ()
 
virtual void SetMouseFlags (const u_int flags)
 
virtual void SetDimFlags (const u_int flags)
 
Double_t ClosestPointDistance (const Double_t x, const Double_t y, RPointMark *&ptr)
 
RPointMarkClosestPoint (const Double_t x, const Double_t y)
 
virtual void SelectPoint (RPointMark *p)
 
virtual void RedrawPoints ()
 
virtual void DeleteAssociatedObject ()
 

Protected Attributes

RContourListcontour_list
 Pointeur sur la liste de contours à éditer.
 
TList display_list
 Liste des objets à tracer pour la liste de contours.
 
bool check_saved
 Test si on vérifie les modifications de liste avant de quitter.
 
bool modified_list
 Test si la liste a été modifiée
 
bool append_load
 Test si la liste est complétée ou remplacé par le chargement d'un fichier.
 
string file_name
 Nom du dernier fichier.
 
string file_base
 Nom de base du fichier.
 
string file_dir
 Nom du répertoire.
 
TAttLine lc_att
 Attributs graphiques des lignes des contours affichés
 
TAttLine ls_att
 Attributs graphiques des lignes du contour édité
 
TGHorizontalFrame * w_gcl_ct_button_hframe
 Ligne des boutons du contour.
 
TGTextButton * w_gcl_ct_button_select
 Bouton de selection du contour.
 
TGTextButton * w_gcl_ct_button_new
 Bouton de création d'un nouveau contour.
 
TGTextButton * w_gcl_ct_button_delete
 Bouton de suppression du contour édité
 
TGTextButton * w_gcl_ct_button_ok
 Bouton de validation du contour.
 
TGTextButton * w_gcl_ct_button_cancel
 Bouton d'annulation du contour.
 
TGGroupFrame * w_gcl_ct_list_group
 Cadre de la liste.
 
TGTextButton * w_gcl_ls_button_show
 Bouton de sélection des contoours visibles.
 
TGTextButton * w_gcl_ls_button_delete
 Bouton de suppression de contours.
 
TGTextButton * w_gcl_ls_button_load
 Bouton de lecture d'un fichier.
 
TGCheckButton * w_gcl_ls_button_append
 Bouton qui indique si les contours lus sont ajoutés à la liste.
 
TGTextButton * w_gcl_ls_button_save
 Bouton d'écriture d'un fichier.
 
- Protected Attributes inherited from RGContourEdit
RContourcontour_ptr
 Pointer to defined contour (output)
 
RContour contour
 Contour object being edited.
 
TAttMarker c_att
 Specific markers attributes (center,...)
 
TGGroupFrame * w_gc_contour_group
 Cadre des information sur le contour.
 
TGHorizontalFrame * w_gc_name_hframe
 Ligne widgets de nom.
 
TGTextEntry * w_gc_name_text
 Nom du contour contour.
 
TGHorizontalFrame * w_gc_type_hframe
 Ligne widgets de type.
 
TGComboBox * w_gc_type_select
 Choix du type de contour.
 
TGVerticalFrame * w_gc_data_vframe
 Cadre des données
 
TGHorizontalFrame * w_gc_ellipse_hframe
 Ligne des données: cas d'une ellipse.
 
TGNumberEntryField * w_gc_ellipse_center_x
 Position X du centre.
 
TGNumberEntryField * w_gc_ellipse_center_y
 Position Y du centre.
 
TGNumberEntryField * w_gc_ellipse_radius_a
 Rayon principal.
 
TGNumberEntryField * w_gc_ellipse_radius_b
 Rayon principal.
 
TGNumberEntryField * w_gc_ellipse_angle
 Angle.
 
TGHorizontalFrame * w_gc_circle_hframe
 Ligne des données: cas d'un cercle.
 
TGNumberEntryField * w_gc_circle_center_x
 Position X du centre.
 
TGNumberEntryField * w_gc_circle_center_y
 Position Y du centre.
 
TGNumberEntryField * w_gc_circle_radius
 Rayon.
 
TGHorizontalFrame * w_gc_gate_hframe
 Ligne des données: cas d'une gate.
 
TGTextButton * w_gc_gate_center
 Recentre le contour.
 
TGTextButton * w_gc_gate_flip_hv
 Modifie la position horizontal-verticale.
 
- Protected Attributes inherited from RGGetPoints
bool exit_flag
 End of request check.
 
bool constructed
 Flag if request is constructed.
 
bool modified
 Flag if points have been modified.
 
u_int request_flags
 Request options: buttons choice.
 
u_int mouse_flags
 Use of mouse buttons.
 
Int_t dim_mode
 Display in 1D/2D mode.
 
UInt_t req_w
 Default window size (for adjustments if size is changed)
 
bool move_lock
 Flag for point move phase.
 
ROptionString options
 Options.
 
UInt_t n_points_min
 Minimum number of points to get.
 
UInt_t n_points_max
 Maximum number of points to get.
 
bool min_on
 Flag indicated that there is a minimum number of requested points.
 
bool max_on
 Flag indicated that there is a maximum number of requested points.
 
bool marker_on
 Flag indicating a marker plotting.
 
bool line_on
 Flag indicating a line plotting.
 
bool line_close
 Flag indicating that a line is closed.
 
TAttMarker m_att
 Standard points marker attributes (2D mode)
 
TAttMarker s_att
 Selected point marker attributes (2D mode)
 
TAttLine l_att
 Line attributes (2D mode)
 
TAttLine ml_att
 Standard line attributes (1D mode)
 
TAttLine sl_att
 Selected line attributes (1D mode)
 
Double_t select_distance
 Selection distance (pixels)
 
RPointMarkselect_point
 Pointer to point at selection distance.
 
UInt_t * out_number
 Pointer to points number (output)
 
RPoint2D ** out_points
 Pointer to points array (output)
 
string window_title
 Request title.
 
string help_message
 Help text message.
 
TList draw_list
 List of ROOT objects to draw.
 
TGCompositeFrame * w_gp_main
 Main frame for points widgets.
 
TGGroupFrame * w_gp_point_frame
 Frame for point information.
 
TGHorizontalFrame * w_gp_point_num_h_frame
 Points number line.
 
TGNumberEntry * w_gp_point_number
 Current point number.
 
TGNumberEntryField * w_gp_total_number
 Number of points defined.
 
TGNumberEntryField * w_gp_min_number
 Minimum requested number of points.
 
TGNumberEntryField * w_gp_max_number
 Maximum requested number of points.
 
TGHorizontalFrame * w_gp_point_coord_h_frame
 Coordinates line.
 
TGTextButton * w_gp_set_button
 Point update button.
 
TGHorizontalFrame * w_gp_point_x_frame
 X coordinate frame.
 
TGNumberEntry * w_gp_point_x_number
 X point value.
 
TGHorizontalFrame * w_gp_point_y_frame
 X coordinate frame.
 
TGNumberEntry * w_gp_point_y_number
 Y point value.
 
TGCompositeFrame * w_gp_button_frame
 Buttons frame.
 
TGTextButton * w_gp_help_button
 Help button.
 
TGTextButton * w_gp_cancel_button
 Cancel button.
 
TGTextButton * w_gp_done_button
 Validation button.
 
- Protected Attributes inherited from RGFrameEvent
TVirtualPad * pad_ptr
 Pointer to pad where events are processed.
 

Static Protected Attributes

static string no_name = ""
 Default contour name.
 

Private Member Functions

 GObject (RGContourListEdit)
 
 RGContourListEdit (const RGContourListEdit &obj)
 

Detailed Description

class RGContourListEdit

Class defining an editor of a list of contours in a pad.

Additional options with respect to RGContourEdit:

  • LC_COL: line color for displayed contours
  • LC_STY: line style for displayed contours
  • LC_WID: line width for displayed contours
  • LS_COL: line color for edited contour
  • LS_STY: line style for edited contour
  • LS_WID: line width for edited contour

Constructor & Destructor Documentation

RGContourListEdit::RGContourListEdit ( const TGWindow *  parent,
TVirtualPad *  pad,
const char *  title,
RContourList list,
const string &  opts = "",
const u_int  flags = 0,
const bool  auto_start = true 
)

Constructeur pour édition d'un contour.

Parameters
parentpointeur de la fenêtre qui appelle la requête
padpointeur sur le pad de saisie
titletitre de la fenêtre
listliste de contours à éditer
optsoptions (voir les options de RGContourEdit)
flagsoptions pour la requête
auto_startdémarrage par le constructeur

References append_load, Construct(), contour_list, file_base, file_dir, file_name, modified_list, Request(), and SetOptions().

RGContourListEdit::RGContourListEdit ( const RGContourListEdit obj)
private

Copy constructor, not implemented.

Parameters
objobject to copy
RGContourListEdit::~RGContourListEdit ( )
virtual

Destructor.

References ClearDisplayTable(), and RGFrameEvent::pad_ptr.

Member Function Documentation

RGContourListEdit::GObject ( RGContourListEdit  )
private

Macro from GCpp library that defines the following functions:

  • ClassName(): return the real class name of the object
  • StaticClassName(): return the used class name of the object (that may be a base class of the real object).
  • IsInstanceOf<T>(): return true if the current object is an instance of the template class name argument
  • Clone(): return an allocated copy of the object.
void RGContourListEdit::SetOptions ( const string &  opts = "")
virtual

Graphical options definition.

Reimplemented from RGContourEdit.

References lc_att, ls_att, RGGetPoints::options, and RGContourEdit::SetOptions().

Referenced by RGContourListEdit().

void RGContourListEdit::SetContourEditTitle ( )
virtual

Update title bar.

References file_base, modified_list, and RGGetPoints::window_title.

Referenced by LoadListButton(), SaveListButton(), and SetModifiedList().

void RGContourListEdit::SetModified ( const bool  status = true)
inlineprotectedvirtual

Update edited contour modification flag.

Parameters
statusmodification status

Reimplemented from RGGetPoints.

References RGGetPoints::modified, RGGetPoints::SetModified(), and UpdateWidgetsState().

Referenced by Construct(), ResetContourButton(), UpdateContourButton(), and UpdateContourWidgets().

void RGContourListEdit::SetModifiedList ( const bool  status = true)
inlineprotectedvirtual

Update list modification flag (since last save).

Parameters
statusmodification status

References modified_list, and SetContourEditTitle().

Referenced by Construct(), DeleteContour(), LoadListButton(), SaveListButton(), and UpdateContourButton().

bool RGContourListEdit::ModifiedListCheck ( )
protectedvirtual

Send a confirmation request if list is modified.

References modified_list.

Referenced by DoneButton(), and LoadListButton().

bool RGContourListEdit::ContourNameCheck ( const string &  name,
RContour current = NULL 
)
protectedvirtual

Check if a contour name is already defined. In such case, a information requester is sent. The function returns true if the name is not used.

Parameters
nametested name
currentpointer to currently edited contour (excluded from the test)

References contour_list, and no_name.

Referenced by UpdateContourButton().

void RGContourListEdit::ClearDisplayTable ( )
protectedvirtual

Empty the list of ROOT objects associated to the contour list.

References display_list.

Referenced by CreateDisplayTable(), and ~RGContourListEdit().

void RGContourListEdit::CreateDisplayTable ( )
protectedvirtual
void RGContourListEdit::RedrawContours ( const bool  recreate = true)
protectedvirtual

Function drawing the list of ROOT objects. This list is recreated if argument recreate is true.

Parameters
recreateindicates if ROOT objects must be recreated

References CreateDisplayTable(), display_list, and RGFrameEvent::pad_ptr.

Referenced by LoadListButton(), SetEditedContour(), and ShowListButton().

void RGContourListEdit::DeleteContour ( RContour ptr,
const bool  update = true 
)
protectedvirtual

Suppression of a contour in the list.

Parameters
ptrpointer to contour to remove
updateindicate if interface must be updated

References contour_list, CreateDisplayTable(), SetEditedContour(), and SetModifiedList().

Referenced by DeleteContourButton(), and DeleteListButton().

void RGContourListEdit::DoneButton ( )
virtual

Slot of "Done" (OK) button.

Reimplemented from RGContourEdit.

References RGGetPoints::exit_flag, and ModifiedListCheck().

void RGContourListEdit::SelectContourButton ( )
virtual

Slot of "Select" (contour) button.

References contour_list, RGContourEdit::contour_ptr, and SetEditedContour().

void RGContourListEdit::NewContourButton ( )
virtual

Slot of "New" (contour) button.

References SetEditedContour().

void RGContourListEdit::DeleteContourButton ( )
virtual

Slot of "Delete" (contour) button.

References RGContourEdit::contour_ptr, and DeleteContour().

void RGContourListEdit::ResetContourButton ( )
virtual

Slot of "Reset" (contour) button. It has no effect on the list itself.

References RGContourEdit::contour, RGContourEdit::contour_ptr, SetModified(), and UpdateContourWidgets().

void RGContourListEdit::ShowListButton ( )
virtual

Slot of Show button (list).

References contour_list, RGContourEdit::contourDisplay, and RedrawContours().

void RGContourListEdit::DeleteListButton ( )
virtual
void RGContourListEdit::AppendListButton ( )
virtual

Slot of Append button (list).

References append_load, and w_gcl_ls_button_append.

void RGContourListEdit::SaveListButton ( )
virtual
RGContourListEdit::ClassDef ( RGContourListEdit  ,
 
)

For ROOT dictionary.


The documentation for this class was generated from the following files: