Opened 11 years ago

Closed 9 years ago

#19 closed defect (duplicate)

User Interface Master Ticket

Reported by: Scooter Morris Owned by: Eric Pettersen
Priority: blocker Milestone: Core API Complete
Component: Core Version:
Keywords: Cc: chimera-programmers@…
Blocked By: Blocking:
Notify when closed: Platform: all
Project: chimera

Description


Change History (12)

comment:1 by Eric Pettersen, 11 years ago

Cc: chimera-programmers@… added

comment:2 by Eric Pettersen, 11 years ago

Mocked up proposed interface. No progress since then.

comment:3 by Eric Pettersen, 11 years ago

Implemented a UI framework that needs tons more work but is just barely enough to hand off to Tom G. so that it can use it when he has time.

Still need to resolve issues with how tools make themselves known to the core, how preferences work, what the main menus look like, and many more...

comment:4 by Eric Pettersen, 11 years ago

"it" can use it? Obv: "he" can use it!

I need to proofread!

comment:5 by Tom Goddard, 11 years ago

The current Qt window toolkit code in hydra is all in the hydra/ui module (about 1400) lines. The files in hydra/ui are

filedialog.py - Open and Save file dialogs.
graphicswindow.py - Window where graphics is rendered.
gui.py - Application window including toolbar, command-line, menus, graphics window...
modelpanel.py - Panel window for model thumbnail images allows hide/show models by clicking on them.
mousemodes.py - Handles mouse and trackpad events.
qt.py - Wrapper code for Qt, all code that uses Qt imports it from this file.
scenegui.py - Panel window that shows scene thumbnails, click on scene shows that scene.

This 1400 lines of GUI code hooks up to code in other hydra modules (36000 lines of Python, 13000 lines of C++) that do not depend on the Qt toolkit.

I propose that Eric hook up his prototype wxWidgets user interface up to Hydra, porting the hydra/ui code maybe to hydra/ui2. This will involve figuring out the wx equivalents of qt for open/save dialogs, mouse event handling, trackpad events, toolbars, menus, command text entry, display of html (manual, reply log).... There is a lot to figure out about wx. The connection to non-window hydra code should be evident from the qt hydra ui. Since almost all the work of melding the wx toolkit code and hydra back-end code will involve figuring out wx problems, I think it makes sense that Eric do that.

comment:6 by Eric Pettersen, 11 years ago

At what point in this process would you envision that you would hook up the GL window so that the whole thing has some minimal usefulness?

--Eric

comment:7 by goddard@…, 11 years ago

I think now that hydra/ui/graphicswindow.py now has all the graphics window Qt dependencies such as creating and using the opengl context, registering for mouse and trackpad events, handling window resize, and setting redraw timer, 145 lines of Python, most of which (mouse/trackpad/resize) could be omitted in the first step of a wxWidgets port.

comment:8 by goddard@…, 11 years ago

I suggest hooking up the opengl graphics and the command-line as the first step.  Then you can type “open 1xyz” and see a result.  Hooking up the opengl window should not be difficult.  The current graphicswindow.py code uses Qt to create an OpenGL context, and creates a timer which invokes the redraw callback.  This is just ~10 lines, most just Qt bolier plate to create a standard OpenGL context.

I separated graphicswindow.py from code that actually does the OpenGL drawing (graphics/view.py) and see now that there are still a few dependencies that snuck into the OpenGL drawing code that are window toolkit dependent.  For instance the OpenGL code uses methods of the OpenGL context makeCurrent() and swapBuffers().  Those are methods of a Qt OpenGL context.  I’ll work on this more today to try to rid the OpenGL code of Qt dependencies so all the window toolkit dependencies will be in graphicswindow.py.




comment:9 by Eric Pettersen, 11 years ago

Implemented as much of the wx version of hydra as I intend to. Implemented:

graphics window with basic mouse manipulations
command line
initial thumbnail depiction of recent sessions
scenes
reply log
keyboard forwarding from graphics window to command line
[all only tested on Mac of course, since Hydra is a Mac app]

Barring further requests, will next work on some kind of interface for Chimera 2 proper.

comment:10 by Eric Pettersen, 11 years ago

Got splash screen to work. Only required one horrible hack.

comment:11 by Eric Pettersen, 10 years ago

Component: User InterfaceCore
Status: newaccepted

comment:12 by Tom Goddard, 9 years ago

Resolution: duplicate
Status: acceptedclosed

No longer using "master" tickets. Instead use individual tickets for specific features.

Note: See TracTickets for help on using tickets.