Bertrand Bellenot ROOT Users Workshop 26-28 Mar 2007 1 ROOT GUI Builder Status & Plans ROOT & External GUI World MFC, FOX, Qt, PVSS… Snapshot of the Future.

Slides:



Advertisements
Similar presentations
Windows Basics An Introduction to the Windows Operating System.
Advertisements

JustinMind: Dynamic Panels
Step-by-Step: Add a Graphical Hyperlink USE the Special Events Final presentation that is still open from the previous exercise. 1.Go to slide 4, and click.
The GIMP Simple features tutorial By Mary A White.
Rapid Application Design with the ROOT GUI Classes 24 April 2007 Ilka Antcheva, Bertrand Bellenot, René Brun, Fons Rademakers, Valeriy Onuchin * CERN,
Using Macros and Visual Basic for Applications (VBA) with Excel
Microsoft Word 2010 Lesson 1: Introduction to Word.
A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can make programs easier to use by providing them with a consistent.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Automating Tasks With Macros
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Customizing Word Microsoft Office Word 2007 Illustrated Complete.
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Exploring the Basics of Windows XP
Access Tutorial 10 Automating Tasks with Macros
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Thank you for your decision to try vTreePro Practice Tree Software! Your satisfaction is very important to us. Please feel free to send us an if.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
IE 411/511: Visual Programming for Industrial Applications
Introduction to Matlab & Data Analysis
Alice 2.0 Introductory Concepts and Techniques Project 1 Exploring Alice and Object-Oriented Programming.
Copyright © 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins Introduction to Windows Chapter 2.
Word 2010 Vocabulary List 1. Click and Type - A feature that allows you to double-click a blank area of a document to position the cursor in that location,
Key Applications Module Lesson 21 — Access Essentials
Selected Topics in Software Engineering - Distributed Software Development.
Basic Editing Lesson 2.
USING WORDPRESS TO CREATE A WEBSITE (RATHER THAN A BLOG) STEP-BY-STEP INSTRUCTIONS.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
LCG AA Meeting 30 June 2004 Valeriy Onuchin GUI Builder.
1 CSC 222: Object-Oriented Programming Spring 2012 netBeans & GUIBuilder  netBeans IDE create/edit/run a project  GUIBuilder JFrame, JButton, JTextField,
Chapter 2 – Introduction to the Visual Studio .NET IDE
Visual Basic CDA College Limassol Campus Lecture:Pelekanou Olga Semester C Week - 1.
CITA 342 Section 2 Visual Programming. Allows the use of visual expressions (such as graphics, drawings, or animation) in the process of programming.
Making Billboards By Deborah Nelson Duke University, Under the direction of Professor Susan Rodger, July 14, 2008.
GUI development with Matlab: GUI Front Panel Components GUI development with Matlab: Other GUI Components 1 Other GUI components In this section, we will.
Chapter Eleven The X Window System. 2 Lesson A Starting and Navigating an X Window System.
USING WORDPRESS TO CREATE A WEBSITE (RATHER THAN A BLOG) STEP-BY-STEP INSTRUCTIONS.
Page Designer Storyboard J. A. Fitzpatrick December 2004.
ROOT Users Workshop September 2005 Ilka Antcheva GUI Status and Development.
Introduction to KE EMu Unit objectives: Introduction to Windows Use the keyboard and mouse Use the desktop Open, move and resize a.
Introduction to KE EMu Unit objectives: Introduction to Windows Use the keyboard and mouse Use the desktop Open, move and resize a.
INFORMATION SYSTEM – SOFTWARE TOPIC: GRAPHICAL USER INTERFACE.
LCG AA Meeting 31 October 2007 The new dynamically and extensively customizable ROOT browser Bertrand Bellenot.
Intoduction to Andriod studio Environment With a hello world program.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
CHEP06, Mumbai, India February 2006 General Status of ROOT GUI Ilka Antcheva, Bertrand Bellenot, René Brun, Valeriy Onuchin *, Fons Rademakers CERN,
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
LCG AA Meeting 30 June 2004 Ilka Antcheva Graphics User Interface in ROOT.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
LCG AA Meeting 26 April 2006 User Interface Developments in ROOT Ilka Antcheva on behalf of ROOT GUI Work Package.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
July FLTK The Fast Light Toolkit • A C++ graphical user interface toolkit • Can be used under X, Windows, MacOS • Supports OpenGL • Provides: – Interactive.
LCG AA Internal Review 30 March 2005 ROOT Graphical User Interface Ilka Antcheva, Bertrand Bellenot, Valeri Fine, Valeriy Onuchin, Fons Rademakers.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
ROOT Event Recording system
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
Chapter 2: The Visual Studio .NET Development Environment
DRAWING LINES To draw lines click View in the Main Menu Toolbar -> Toolbars and check the Editor option. The Editor toolbar will appear amongst the toobars.
Introduction to Computer CC111
Chapter 2 – Introduction to the Visual Studio .NET IDE
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
1. Introduction to Visual Basic
Chapter 1: An Introduction to Visual Basic 2015
Chapter 2 Adding Web Pages, Links, and Images
Chapter 2 – Introduction to the Visual Studio .NET IDE
Tutorial 6 Creating Dynamic Pages
The Basic Usage and The Event Handling in Glade.
Presentation transcript:

Bertrand Bellenot ROOT Users Workshop Mar ROOT GUI Builder Status & Plans ROOT & External GUI World MFC, FOX, Qt, PVSS… Snapshot of the Future Shaped Windows Drag & Drop Ilka Antcheva, Bertrand Bellenot, Valeriy Onuchin

Bertrand Bellenot ROOT Users Workshop Mar The ROOT GUI builder provides graphical user-interface (GUI) tools for developing user interfaces based on the ROOT GUI classes. It includes over 30 advanced widgets and has as a goal to offer the complete set of features needed for developing the GUI projects. It gives developers an effective object-oriented development environment and accelerates the GUI development life cycles. The new version of the GUI builder has a new look and better appearance. GUI Builder on behalf of Valeriy Onuchin

Bertrand Bellenot ROOT Users Workshop Mar New functionality added via menus and the tool bar. Any created user interface can be saved in a macro. Any ROOT GUI application can be switched to editable mode – already exiting user interface objects, container frames can be just drag-and-drop, move, resize, copy, paste, change re-parent, etc. Drag/Drop of selected frames. Copy/Paste/Cut of selected widget. Open/Save of the designed GUI in a macro. Easy layout settings and widget alignment. Improved keyboard navigation. Widget's attributes can be changed via dynamically created context menus or activated edit dialogs. Many new widgets were added to the widgets' palette (see slide #6) Improved Functionality

Bertrand Bellenot ROOT Users Workshop Mar Steps of creating the interface: Click on Project button in the Widget's Palette (the first icon). By this, a window is created which will form the main window of your GUI. Turn the edit mode ON for that window. Add different widgets to your main frame: text entry, buttons, list box, etc. Quick Start

Bertrand Bellenot ROOT Users Workshop Mar The user interface elements can be selected, positioned, and grouped, laid out in the main application frame. According to the selected widget, a dynamically created context menu provides detailed control of widget attributes’ settings. Editing

Bertrand Bellenot ROOT Users Workshop Mar Snapshot of Available Widgets

Bertrand Bellenot ROOT Users Workshop Mar The frame layout can be changed by using Property editor on the right. Once the frame is successfully created, the designed GUI can be saved in a macro. The generated macro can be opened in the GUI builder and additional widgets can be added to the previously saved main frame. For that you do not need to edit the code using an external text editor - just create your new design and save it again in a macro. This macro can be run separately in a ROOT session. Layout

Bertrand Bellenot ROOT Users Workshop Mar Summary One major feature, allowing a rapid development, is the possibility to save the actual GUI in a macro, to execute it in a ROOT session, reopen it (or continue editing) in the GUI Builder, and so on. This allows to have an instantaneous view of the GUI and its behavior, while editing it. Another powerful feature is the possibility to edit macros generated by pressing CTRL+S in any running GUI application, thanks to SavePrimitive, a very useful method implemented in every GUI class (thanks to Ilka Antcheva).

Bertrand Bellenot ROOT Users Workshop Mar Validation tests and robustness of the GUI builder functionality Documentation – Help and HowTo Complete the GUI builder with the rest of the ROOT widgets Undo/Redo Adding ToolTips Property editors development Improvements of the GUI builder ‘look and feel’ Next Steps

Bertrand Bellenot ROOT Users Workshop Mar ROOT & External GUI World MFC, FOX, Qt, PVSS…

Bertrand Bellenot ROOT Users Workshop Mar Allows to embed a TCanvas into any external application or any toolkit, using only a few lines of code, as soon as it is possible to: Obtain a Window ID (XID on X11, HWND on Win32). Create a timer to handle Root events. Forward (i.e. mouse) events to the Canvas Features

Bertrand Bellenot ROOT Users Workshop Mar How it Works In the application constructor or in main(), create a TApplication: gMyRootApp = new TApplication("My ROOT Application", &argc, argv); gMyRootApp->SetReturnFromRun(true); Create a timer to process Root events : void MyWindow::OnRefreshTimer() { gApplication->StartIdleing(); gSystem->InnerLoop(); gApplication->StopIdleing(); } Get the id of the window where you want to embed the TCanvas: void MyWindow::Create() { int wid = gVirtualX->AddWindow((ULong_t)getid(), getWidth(), getHeight()); fCanvas = new TCanvas("fCanvas", getWidth(), getHeight(), wid); } Forward messages to the Canvas. i.e: void MyWindow::OnPaint() { if (fCanvas) fCanvas->Update(); } void MyWindow::OnLMouseDown() { if (fCanvas) fCanvas->HandleInput(kButton1Down, ev->x, ev->y); }

Bertrand Bellenot ROOT Users Workshop Mar CMFCRootApp::CMFCRootApp() { int argc = 1; char *argv[] = { "MFCRootApp.exe", NULL }; gMFCRootApp = new TApplication("MFC ROOT Application", &argc, argv); gMFCRootApp->SetReturnFromRun(true); } VOID CALLBACK MyTimerProc(HWND hwnd, UINT message, UINT idTimer, DWORD dwTime) { gApplication->StartIdleing(); gSystem->InnerLoop(); gApplication->StopIdleing(); } int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; … SetTimer(1, 20, (TIMERPROC) MyTimerProc); // timer callback return 0; } Example with MFC (1) Application and Timer Creation:

Bertrand Bellenot ROOT Users Workshop Mar void CChildView::OnPaint() { CPaintDC dc(this); // device context for painting RECT rect; if (fCanvas == 0) { GetWindowRect(&rect); int width = rect.right-rect.left; int height = rect.bottom-rect.top; int wid = gVirtualX->AddWindow((ULong_t)m_hWnd, width, height); fCanvas = new TCanvas("fCanvas", width, height, wid); } else fCanvas->Update(); } void CChildView::OnLButtonUp(UINT nFlags, CPoint point) { if (fCanvas) fCanvas->HandleInput(kButton1Up, point.x, point.y); CWnd::OnLButtonUp(nFlags, point); } Canvas creation and event forwarding: Example with MFC (2)

Bertrand Bellenot ROOT Users Workshop Mar ROOT and PVSS ROOT & PVSS Screenshot (in collaboration with Piotr Golonka) PVSS Panel ROOT TH2F Editor

Bertrand Bellenot ROOT Users Workshop Mar Snapshot of the Future Custom shapes… Drag… And Drop…

Bertrand Bellenot ROOT Users Workshop Mar The nonrectangular window shape extension adds nonrectangular windows to the system. This allows for making shaped (partially transparent) windows. Already working since ROOT version Shaped Windows fBgnd = fClient->GetPicture("pictures/Main.xpm"); gVirtualX->ShapeCombineMask(fId, 0, 0, fBgnd->GetMask()); SetBackgroundPixmap(fBgnd->GetPicture()); SetWMSizeHints(fBgnd->GetWidth(), fBgnd->GetHeight(), fBgnd->GetWidth(), fBgnd->GetHeight(), 1, 1); First, get the picture used as shape and background: Then call the magic function: Set the background picture: Finally, as the picture cannot be resized, fix the size of the window: Very simple to implement, only a few steps needed:

Bertrand Bellenot ROOT Users Workshop Mar Drag & Drop Features: Allows to drag and drop any ROOT object (i.e. from TBrowser to TCanvas) First prototype is working on Windows (within the same ROOT application) and on Linux (also between different ROOT applications)