|
JG ROOT Tools libraries
version 5.0 - august 2014
|
#include <RGContourEdit.hh>
Public Member Functions | |
| 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 | Construct () |
| virtual void | InfoWidgetMap () |
| virtual void | Request () |
| virtual void | SetOptions (const string &opts="") |
| virtual void | ContourTypeSelection (Int_t id) |
| virtual void | DoneButton () |
| 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) | |
| RGFrameEvent & | operator= (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 | 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) |
| RPointMark * | ClosestPoint (const Double_t x, const Double_t y) |
| virtual void | SelectPoint (RPointMark *p) |
| virtual void | SetModified (const bool status=true) |
| virtual void | RedrawPoints () |
| virtual void | DeleteAssociatedObject () |
Protected Attributes | |
| RContour * | contour_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) | |
| RPointMark * | select_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. | |
Private Types | |
| enum | RGFlags { noGate = 0x00010000, no1D = 0x000F0000, noPolygon = 0x00100000, noEllipse = 0x00200000, noCircle = 0x00400000, no2D = 0x00F00000, onlyGate = 0x00FE0000, onlyPolygon = 0x00EF0000, onlyEllipse = 0x00DF0000, onlyCircle = 0x00BF0000, noGateFlip = 0x01000000 } |
| ! Definition of specific request options More... | |
| enum | ContourUserBits { contourNothing = 0x00000000, contourDisplay = 0x00000001, contourEdited = 0x00000002 } |
| ! Definition of user bits for RContour objects More... | |
| typedef GListIterT< RPointMark > | iterator |
| ! Points list iterator local definition (from RGGetPoints class) | |
Private Member Functions | |
| GObject (RGContourEdit) | |
| RGContourEdit (const RGContourEdit &obj) | |
class RGContourEdit
Class to define a contour from a points in a pad.
Additional options with respect to RGGetPoints:
|
private |
|
private |
| RGContourEdit::RGContourEdit | ( | const TGWindow * | main, |
| TVirtualPad * | pad, | ||
| const char * | title, | ||
| RContour & | ctr, | ||
| const string & | opts = "", |
||
| const u_int | flags = 0, |
||
| const bool | auto_start = true |
||
| ) |
Constructor of a contour editor, with returned data (contour).
| main | main application window |
| pad | pad pointer |
| title | window title |
| ctr | edited contour (modified in output) |
| opts | graphical options (see class description) |
| flags | request options |
| auto_start | flag for execution at construction |
References contour, contour_ptr, RContour::ContourBase(), Request(), and SetContourPoints().
| RGContourEdit::RGContourEdit | ( | const TGWindow * | main, |
| TVirtualPad * | pad, | ||
| const char * | title, | ||
| const string & | opts = "", |
||
| const u_int | flags = 0, |
||
| const bool | auto_start = false |
||
| ) |
Constructor of a contour editor, without returned data (for use in derived classes).
| main | main application window |
| pad | pad pointer |
| title | window title |
| opts | graphical options (see class description) |
| flags | request options |
| auto_start | flag for execution at construction |
References contour, contour_ptr, and Request().
|
private |
Copy constructor, not implemented.
| obj | object to copy |
|
virtual |
Destructor.
Referenced by Request().
|
private |
Macro from GCpp library that defines the following functions:
|
virtual |
Graphical intergface construction.
Reimplemented from RGGetPoints.
Reimplemented in RGContourListEdit.
References c_att, RGGetPoints::Construct(), contour, RDico::ct_ed_angle, RDico::ct_ed_center, RDico::ct_ed_contour, RDico::ct_ed_gate_center, RDico::ct_ed_gate_center_tip, RDico::ct_ed_gate_flip, RDico::ct_ed_gate_flip_tip, RDico::ct_ed_help_text, RDico::ct_ed_name, RDico::ct_ed_name_tip, RDico::ct_ed_radii, RDico::ct_ed_radius, RDico::ct_ed_type, RDico::ct_ed_type_circle, RDico::ct_ed_type_ellipse, RDico::ct_ed_type_gate, RDico::ct_ed_type_poly, RGGetPoints::help_message, no1D, no2D, noCircle, noEllipse, noGate, noGateFlip, noPolygon, rDico, RGGetPoints::request_flags, w_gc_circle_center_x, w_gc_circle_center_y, w_gc_circle_hframe, w_gc_circle_radius, w_gc_contour_group, w_gc_data_vframe, w_gc_ellipse_angle, w_gc_ellipse_center_x, w_gc_ellipse_center_y, w_gc_ellipse_hframe, w_gc_ellipse_radius_a, w_gc_ellipse_radius_b, w_gc_gate_center, w_gc_gate_flip_hv, w_gc_gate_hframe, w_gc_name_hframe, w_gc_name_text, w_gc_type_hframe, w_gc_type_select, and RGGetPoints::w_gp_main.
Referenced by RGContourListEdit::Construct(), and Request().
|
virtual |
Display widgets according to contour type.
References contour, RContour::ContourBase(), RGGetPoints::SetDimMode(), RContour::Type(), w_gc_circle_hframe, w_gc_data_vframe, w_gc_ellipse_hframe, and w_gc_gate_hframe.
Referenced by RGContourListEdit::Request(), Request(), SetContourType(), and RGContourListEdit::UpdateContourWidgets().
|
virtual |
Start editor request: this function must be overloaded by derived classes, so that the derived class can be fully constructed.
Reimplemented from RGGetPoints.
Reimplemented in RGContourListEdit.
References RDico::brq_continue, RDico::brq_warning, Construct(), contour_ptr, RDico::ct_ed_type_error, RGGetPoints::EventLoop(), RGGetPoints::exit_flag, InfoWidgetMap(), noCircle, noEllipse, noGate, noPolygon, RGFrameEvent::pad_ptr, rDico, RGGetPoints::RedrawPoints(), RGGetPoints::request_flags, SetContourType(), SetOptions(), RGGetPoints::SetWindow(), RContour::Type(), UpdateContourType(), w_gc_type_select, and ~RGContourEdit().
Referenced by RGContourEdit().
|
virtual |
Graphical options definition.
Reimplemented from RGGetPoints.
Reimplemented in RGContourListEdit.
References c_att, RGGetPoints::line_on, RGGetPoints::marker_on, RGGetPoints::min_on, RGGetPoints::options, and RGGetPoints::SetOptions().
Referenced by Request(), and RGContourListEdit::SetOptions().
|
protectedvirtual |
Set list of points from the contour data.
References RGGetPoints::AddPoint(), contour, RContour::ContourBase(), RGFrameEvent::pad_ptr, RGGetPoints::select_point, RContourBase::Type(), and RVector2D::zero.
Referenced by GateCenterButton(), RGContourEdit(), and RGContourListEdit::UpdateContourWidgets().
|
protectedvirtual |
Set the type of contour.
| type | contour type (see RContour::CTypes) |
References contour, InfoWidgetMap(), RGGetPoints::SetModified(), RContour::Type(), and UpdateContourType().
Referenced by ContourTypeSelection(), and Request().
|
protectedvirtual |
Update type of contour.
References contour, RGGetPoints::max_on, RGGetPoints::min_on, RGGetPoints::n_points_max, RGGetPoints::n_points_min, RGGetPoints::RedrawPoints(), RContour::Type(), RGGetPoints::UpdatePointsNumber(), w_gc_type_select, RGGetPoints::w_gp_max_number, and RGGetPoints::w_gp_min_number.
Referenced by RGContourListEdit::Request(), Request(), SetContourType(), and RGContourListEdit::UpdateContourWidgets().
|
protectedvirtual |
Update contour data from defined points.
References RGGetPoints::constructed, contour, RContour::ContourBase(), RContourBaseEllipse::GetAngle(), RContourBaseCircle::GetRadius(), RContourBaseEllipse::GetRadiusA(), RContourBaseEllipse::GetRadiusB(), RContour::Type(), w_gc_circle_center_x, w_gc_circle_center_y, w_gc_circle_radius, w_gc_ellipse_angle, w_gc_ellipse_center_x, w_gc_ellipse_center_y, w_gc_ellipse_radius_a, and w_gc_ellipse_radius_b.
Referenced by DrawAssociatedObject(), and RGContourListEdit::UpdateContourWidgets().
|
protectedvirtual |
Update graphical attributes of a point (depending on selection distance).
| p | pointer to point |
Reimplemented from RGGetPoints.
References c_att, contour, RGGetPoints::m_att, RGGetPoints::s_att, RGGetPoints::select_point, and RContour::Type().
|
protectedvirtual |
Move a point.
| p | pointer to point |
| x | new X position |
| y | new Y position |
Reimplemented from RGGetPoints.
References contour, RGGetPoints::MovePoint(), RGGetPoints::RedrawPoints(), RGGetPoints::SetModified(), and RContour::Type().
|
protectedvirtual |
Draw contour: for gates, nothing else id drawn (no points in 1D, see RGGetPoints class).
Reimplemented from RGGetPoints.
References contour, RContour::ContourBase(), RContour::CreateObjectList(), RGGetPoints::DeleteAssociatedObject(), RGGetPoints::dim_mode, RGGetPoints::draw_list, RContourBase::GetFlipAxis(), RContour::GetObject(), RGGetPoints::l_att, RVector2D::Length(), RGGetPoints::ml_att, RGFrameEvent::pad_ptr, RGGetPoints::select_point, RContourBaseGate::SetGate(), RContourBaseGate::SetYFromPad(), RGGetPoints::sl_att, RContour::Type(), and UpdateContourInfo().
|
protectedvirtual |
Check if edited contour is valid (enough points,...). If this is not the case, display an information requester.
References RDico::brq_continue, RDico::brq_warning, RDico::ct_ed_num_error, RGGetPoints::min_on, RGGetPoints::n_points_min, and rDico.
Referenced by DoneButton(), and RGContourListEdit::UpdateContourButton().
|
protectedvirtual |
Update output contour from edited data.
References contour, contour_ptr, RContour::ContourBase(), RContour::CreateObjectList(), RContour::GetLineAtt(), RContour::GetStatusFlag(), RContour::SetLineAtt(), RGGetPoints::SetModified(), RContourBasePolygon::SetPoint(), RContour::SetStatusBits(), and RContour::Type().
Referenced by DoneButton(), and RGContourListEdit::UpdateContourButton().
|
virtual |
|
virtual |
Slot of "Done" (OK) button.
Reimplemented from RGGetPoints.
Reimplemented in RGContourListEdit.
References ContourEditCheck(), RGGetPoints::exit_flag, and UpdateContour().
|
virtual |
Slot of contour name.
| str | contour name string |
References contour, RContour::Rename(), and RGGetPoints::SetModified().
|
virtual |
Slot of button to recenter gate contour.
References contour, RContour::ContourBase(), RGFrameEvent::pad_ptr, RGGetPoints::RedrawPoints(), SetContourPoints(), and RContourBaseGate::SetYFromPad().
|
virtual |
Slot of X/Y flip for gate contour.
References contour, RContour::ContourBase(), RContourBase::GetFlipAxis(), RGFrameEvent::pad_ptr, RGGetPoints::RedrawPoints(), RGGetPoints::SetDimMode(), RContourBase::SetFlipAxis(), and RContourBaseGate::SetYFromPad().
| RGContourEdit::ClassDef | ( | RGContourEdit | , |
| 0 | |||
| ) |
For ROOT dictionary.