Traits User Interface Class David C. Morrill Enthought, Inc.

Slides:



Advertisements
Similar presentations
User interface Adobe video and audio applications provide a consistent, customizable workspace. Although each application has its own set of panels (such.
Advertisements

Microsoft Windows Vista Chapter 5 Personalize Your Work Environment.
COMPREHENSIVE Windows Tutorial 3 Personalizing Your Windows Environment.
FIRST COURSE Word Tutorial 2 Editing and Formatting a Document.
PowerPoint. Getting Started with PowerPoint Objectives Start PowerPoint and open presentations Explore toolbars and menus Use the Office Assistant Work.
Ch. 6 Web Page Design – Absolute Positioning, Image Maps, and Navigation Bars Mr. Ursone.
© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Key Applications Module Lesson 12 — Word Essentials
Creating Web Page Forms
Creating charts in excel
Objectives © Paradigm Publishing, Inc. 1 Objectives.
Get started with PivotTable reports Make your data work for you Imagine an Excel worksheet of sales figures. It lays out thousands of rows of data about.
FIRST COURSE Word Tutorial 2 Editing and Formatting a Document.
Tutorial 6 Using Form Tools and Creating Custom Forms
Power Point EDU 271 Microsoft PowerPoint is a powerful tool to create professional looking presentations and slide shows. PowerPoint allows you to construct.
1 CA201 Word Application Increasing Efficiency Week # 13 By Tariq Ibn Aziz Dammam Community college.
1 Pertemuan 03 Using Layers and Symbols Matakuliah: U0344 / DESKTOP 1 Tahun: 2006.
Inspire students to develop ideas & organize thinking
Some activities may not be enabled as part of the Kent School District network system.
Teach Yourself Windows 98 Module 2: Working with Files, Folders, and the Desktop.
Using Form Tools and Creating Custom Forms Microsoft Access 2010.
CIS—100 Chapter 15—Windows Vista 1. Parts of a Window 2.
IE 411/511: Visual Programming for Industrial Applications
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
This tutorial teaches Microsoft Word basics. Although knowledge of how to navigate in a Windows environment is helpful, this tutorial was created for.
1. Chapter 4 Customizing Paragraphs 3 More Paragraph Changes Highlight a paragraph in Word by applying borders and shading. Sort paragraphs to control.
FILES AND ASSETS PANELS
Week 11 Creating Framed Layouts Objectives Understand the benefits and drawbacks of frames Understand and use frame syntax Customize frame characteristics.
ACTIVINSPIRE TRAINING Tips and tools for creating Flipcharts on ActivInspire.
Lesson 2 Basic editing Word 2013.
Chapter 8 HTML Frames. 2 Principles of Web Design Chapter 8 Objectives Understand the benefits and drawbacks of frames Understand and use frames syntax.
Chapter 5 Quick Links Slide 2 Performance Objectives Understanding Framesets and Frames Creating Framesets and Frames Selecting Framesets and Frames Using.
LINKS TO OBJECTIVES Multiple Worksheets Multiple Worksheets Move, Copy and Paste Cells Move, Copy and Paste Cells Split into Windows Freeze Panes Range.
1. Chapter 10 Managing and Printing Documents 3 Working with Files and Printing You can open multiple documents in Word. When multiple documents are.
Basic Editing Lesson 2.
1 Chapter 12: Form Builder Objects and Flexible Code.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. M I C R O S O F T ® Revising Presentation Text Lesson 3.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Introduction to Microsoft publisher
1 HTML Forms
Layers, Image Maps, and Navigation Bars
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
1. Chapter 3 Aligning and Indenting Paragraphs 3 Paragraphs in Word A paragraph in Word is any amount of text followed by the press of the Enter key.
By Felixberto Dominic B. Eruela.  Using a computer to create, edit, and print documents. Of all computer applications, word processing is the most common.
Chapter 5 Working with Multiple Worksheets and Workbooks
Web Design-Lecture3-QN-2003 Web Design Enhancing a Website.
Microsoft ® Excel 2010 Core Skills Lesson 5 Viewing and Printing Workbooks Courseware #: 3243 Microsoft ® Office Excel 2010.
Introducing Dreamweaver. Dreamweaver The web development application used to create web pages Part of the Adobe creative suite.
Web Site Development - Process of planning and creating a website.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Change margins. 1 Preview a document. 2 Change paper size and orientation. 3 Print envelopes and labels. 4 Choose print options. 5 2.
UNIT 1: Introduction To The AutoCAD Interface Objectives: Be able to identify, describe and/or apply… The key components of AutoCAD interface The AutoCAD.
Key Applications Module Lesson 12 — Word Essentials Computer Literacy BASICS.
Building Dashboards with JMP 13 Dan Schikore SAS, JMP
Adobe Premiere interface overview
Dive Into® Visual Basic 2010 Express
Windows Tutorial 3 Personalizing Your Windows Environment
Computer Fundamentals
Lesson 5: Viewing and Printing Workbooks
Layers in Adobe After Effect
Short presentation title up to 2 lines
Short presentation title up to 2 lines
Building a User Interface with Forms
MODULE 7 Microsoft Access 2010
Benchmark Series Microsoft Word 2016 Level 1
DREAMWEAVER MX 2004 Chapter 3 Working with Tables
Using Templates and Library Items
European Computer Driving Licence
Presentation transcript:

Traits User Interface Class David C. Morrill Enthought, Inc.

What We’re Going To Cover… The DockWindow component Using DockWindows in a Traits UI DockWindow usage

The DockWindow Component A DockWindow is a enthought.pyface component that organizes and manages sets of controls into: –Notebooks –Splitter groups –Dockable groups It gives users the ability to organize a user interface in a way that makes sense to, or is comfortable for, them.

The DockWindow Component The DockWindow component is in enthought.pyface.dock This package defines the following classes: –DockWindow: The window –DockSizer: The layout manager –DockSection: A splitter group –DockRegion: A notebook –DockControl: An “atomic” control (might be a panel)

The DockWindow Component DockWindow DockSizer DockSection DockRegion DockControl DockSection DockRegion DockControl wx.Control

The DockWindow Component DockWindow wx.Controlwx.Panelwx.Controlwx.Panelwx.Control parent

The DockWindow Component The developer defines the initial DockSection/DockRegion/DockControl object hierarchy. After that the DockSizer manages the interface and reorganizes the object hierarchy as the user interacts with the DockWindow. Custom layouts can be saved and restored using the GetStructure/SetStructure methods on the DockSizer. –GetStructure returns a data structure specifically designed to be pickled.

The DockWindow Component SetStructure uses an intelligent algorithm that correctly deals with: –Developers adding new elements to a UI –Developers removing existing elements from a UI –Imbedding “foreign” objects within a UI

Using DockWindows in a Traits UI The good news is that as a Traits UI developer, creating and using DockWindows is completely transparent to you. DockWindows are automatically created whenever you use a Group with layout set to either ‘tabbed’ or ‘split’. As long as nested Groups use the tabbed/split styles, they will all be part of the same DockWindow. A break in the nesting chain results in multiple DockWindows being created. Each DockWindow is isolated from other DockWindows.

Using DockWindows in a Traits UI To make creating DockWindows easier, new Group subclasses have been defined: –Tabbed: Tabbed DockWindow notebook –HSplit: Horizontally split DockWindow –VSplit: Vertically split DockWindow –HGroup: Horizontally arranged non- DockWindow –VGroup: Vertically arranged non- DockWindow

Using DockWindows in a Traits UI There are four DockWindow styles: –Fixed: Elements cannot be docked –Horizontal: Horizontal drag bar –Vertical: Vertical drag bar –Tab: Notebook tab drag bar The DockWindow style is specified using the new dock trait, which is defined on the Item, Group and View classes. The dock trait is inherited, so setting it on a View means all items in the View will use the View’s dock style by default. The default dock style is fixed (i.e. the user cannot rearrange elements within the View).

Using DockWindows in a Traits UI The user’s layout preferences for a View can be automatically saved and restored using the standard Traits UI preference mechanism: –Define a non-empty View id (e.g. “enthought.foo.bar.baz”). It should be globally unique. –Define a non-empty id for the top-level Tabbed, HSplit or VSplit group. This id only has to be unique within the View. The inner groups do not have to have an id defined.

Using DockWindows in a Traits UI The case of Instance traits needs a little more explanation. To save the user’s layout preferences you must: –Make sure the Instance trait’s Item has a non-empty id. –Make sure the View referenced by the Instance trait has a non-empty id. –Make sure the top-level DockWindow enabled Group within the View has a non-empty id. Only the layout data for the most recently displayed Instance View is preserved.

Using DockWindows in a Traits UI The new image trait allows you to define an icon to display on a notebook page next to the element’s name (e.g. image = ImageResource( ‘folder’ ) ).

DockWindow usage These are user level notes on how to interact with a DockWindow enabled view. You can rearrange tabs within a notebook by dragging a tab until you see the docking insertion marker highlight the gap between the two pages you want to insert into. You can drag a tab out of a notebook by dragging its tab into another notebook, or onto the drag bar of another element.

DockWindow usage You can add a stand-alone element to a notebook by dragging its drag bar onto the notebook. You can add an element or tab to another tab or element by holding down the Ctrl key while dragging. Wait until you see the horizontal docking bar appear along the bottom edge of the tab or drag bar, then release. The item will be added to the target. You can then rearrange items within the target after the drop as usual.

DockWindow usage You can drag the splitter bars between elements to control how much of each element is visible. You can click the icons on the splitter bars to snap the splitter to either edge, or back to its last position before being snapped to an edge.

DockWindow usage You can move an entire notebook or splitter group by dragging a tab or drag bar within the group while holding down the Alt key. You can restore the original layout designed by the developer by clicking any DockWindow element while holding down the Ctrl and Shift keys. Performing the same action again will restore the previous layout (i.e. it’s a toggle).

DockWindow usage You can lock the current layout by clicking any DockWindow element while holding down the Alt and Shift keys. Locking the layout removes all drag bars, and does not allow tabs to be moved or rearranged. However, splitter bars still behave normally. You can unlock the layout by performing the same action again (i.e. it’s a toggle also).