graphics editor in root i l ka antcheva*, rené brun, fons rademakers cern, geneva, switzerland...

14
Graphics Editor in ROOT Graphics Editor in ROOT Ilka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, CERN, Geneva, Switzerland Switzerland * * funded by funded by PPARK, Swindon, UK PPARK, Swindon, UK 23 May 2005 ACAT05

Upload: kellie-ferguson

Post on 19-Jan-2016

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

Graphics Editor in ROOTGraphics Editor in ROOT

Ilka Antcheva*, René Brun, Fons Rademakers

CERN, Geneva, CERN, Geneva, SwitzerlandSwitzerland

* * funded by PPARK, funded by PPARK, Swindon, UKSwindon, UK 23 May 2005ACAT0

5

Page 2: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 2

OverviewOverview

• Main Goals• Design Solution

• The “Look”• The “Feel”• Conceptual Elements

• Editor Usability• Focus on Users• Next Steps

Page 3: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 3

Main Goals (1)Main Goals (1)

Page 4: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 4

Main Goals (2)Main Goals (2)

• Object orientation of the editor design – keeps users focused on objects, not on how to carry out actions.

• Managing GUI complexity by splitting the graphics editor into discrete units of so-called object editors.

• Editor responds dynamically and presents the right GUI at the right time according to the selected object in the canvas.

• Easy-to-use.• Require minimal user’s training.• Protect users from obvious errors.

Page 5: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 5

• Modular – it loads the corresponding object editor objEditor according to the selected object obj in the canvas respecting the class inheritance.

• Algorithm:• Search for a class name objEditor (correct naming is important).• Check that this class derives TGedFrame (the editor base class).• Make an instance of the object editor using TROOT::ProcessLine

method.• Scan all base classes for corresponding object editors.

Design Solution (1)Design Solution (1)

TArrow TAttMarker TCurlyArc TH1 TPadTAttFill TAttText TCurlyLine TH2 TPaveStatsTAttLine TAxis TFrame TGraph

Page 6: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 6

Design Solution (2)Design Solution (2)

• Signals/slots communication mechanism handles GUI actions.• Canvas sends a signal which object is selected.• Corresponding object editor is activated and ready for use.

Page 7: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 7

Design Solution (3) Design Solution (3)

ROOT graphics editor can be:

• Embedded – connected only with the canvas in the application window

• Global – has own application window and can be connected to any created canvas in a ROOT session.

Page 8: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 8

The “Look”The “Look”• Color choice to point

user’s attention to selected object.

• Font choices – by default.• GUI elements: buttons,

combo boxes, number and text entries, etc.

• Overall visual impression - layout shows the visual hierarchy, consistency and balance.

• Additional redundant texts and labels are avoided by grouping elements.

• Tooltip based help.

Page 9: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 9

The “Feel”The “Feel”• GUI widget choice – its

behavior matches functionality.

• GUI element location – related to the task flow.

• Navigation and freedom of movement.• Minimize total number of clicks• No jumps between panels

• Appropriate feedback for each user action.

• GUI text – list of reserved words in use, brief messages.

Page 10: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 10

Conceptual Elements (1)Conceptual Elements (1)• Easy-to-use.• Recognition over recall

determines design choices.• Power of each GUI action –

same things work same way; full and continuous feedback on the action result.

• Flexibility for change – only information relative to the current task is presented; other GUI parts are hidden.

• Capacity for growth.

Page 11: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 11

• Can be extended easily by any user-defined object editor - this makes GUI design easier and adaptive to the users’ profiles.

• Rules to follow:• Derive in the code from the base editor class TGedFrame. • Correct naming convention: the name of the object editor should

be the object class name + 'Editor’. • Register the new object editor in the list TClass::fClassEditors in

the end of its constructor.• Use signals/slots communication mechanism for event

processing.• Implement SetModel method where to set GUI widgets according

to the object’s attributes.• Implement all necessary slots and connect them to appropriate

widget signals.

Conceptual Elements (2)Conceptual Elements (2)

Page 12: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 12

Editor UsabilityEditor Usability

• To reduce…• Visual work• Movements• Intellectual work• Memory work

• Benefits• Higher productivity• Overall validation• Users’ confidence

Page 13: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 13

Focus on UsersFocus on Users

• Novices (for a short time)• Theoretical understanding, no practical experience with ROOT• Impatient with learning concepts; patient with performing tasks

• Advanced beginners (many people remain at this level)• Focus on a few tasks and learn more on a need-to-do basis• Perform several given tasks well

• Competent performers (fewer then previous class)• Know and perform complex tasks that require coordinated

actions• Interested in solving problems and tracking down errors

• Experts (identified by others)• Ability to find solution in complex functionality• Interested in theories behind the design• Interested in interacting with other expert systems

Page 14: Graphics Editor in ROOT I l ka Antcheva*, René Brun, Fons Rademakers CERN, Geneva, Switzerland CERN, Geneva, Switzerland * funded by PPARK, Swindon, UK

I. Antcheva, R. Brun, F. Rademakers ACAT05 DESY, Zeuthen 14

Next StepsNext Steps

• To include ROOT commands in tooltips of the GUI widgets

• Hide/Show objects• New object editors• Help• HowTo design

object editors• Undo/Redo• Style Manager • Fit Panel GUI

root[9] gPad->SetLogy(1);