Repository navigation
GraphiteWindows: the Window Manager - #27
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Window Manager, next after
GraphiteSoundin the README's order: windows of every class, their frames, the list the program's windows make, and the regions that govern what a window draws.WindowClass(alert, movable alert, modal, movable modal, floating, document, utility, help, sheet, sheet alert, toolbar, plain, alternate plain, simple, overlay and drawer), with the layer each class floats at and its activation scope;WindowAttributes, withkWindowStandardDocumentAttributesandkWindowStandardFloatingAttributes;WindowRegion,WindowPartandWindowDefPart;WindowPositionMethod.WindowDefinition, the WDEFs as a protocol — the frame's features (kWindowMsgGetFeatures), where the content sits in the structure (kWindowMsgCalculateShape), any of the frame's regions (kWindowMsgGetRegion), hit testing (kWindowMsgHitTest) and the standard state's bounds — andStandardWindowDefinition, the Mac OS 8 and 9 frame: a title bar with the boxes the attributes give it, a four-pixel border around a document's content, a shorter bar and no border on a palette, nothing at all on a frameless window.Window: structure and content bounds (CreateNewWindow takes the content's),MoveWindowby content andMoveWindowStructureby structure as MacWindows documents,SizeWindow,SetWindowBounds; zooming between the user and standard states (GetWindowUserState, SetWindowStandardState), saving the state it leaves as ZoomWindow does; collapsing to the title bar and back; the title, kind, reference constant and parent; and the content in its own buffer (LockPortBits, a resize rebuilds it white), which the host reads to show the window as it likes.WindowManager: the program's windows, front to back by class layer and selection, held weakly so a window the program lets go of is gone from the list;FrontWindow(which skips the palettes), the active document and the active palette (ActivateWindow, the two activation scopes,kWindowNoActivatesAttribute);FindWindowwith the menu bar kept, past windows that ignore clicks; showing, hiding, selecting,SendBehind,DisposeWindow; andRepositionWindow: centered, cascaded (GetCascadeOrigin, from the corner again when the next window wouldn't fit) and the alert position, on the main screen or by a parent.kWindowNoUpdatesAttribute);BeginUpdateandEndUpdate, which hold the port's clip and visible regions to what needs drawing, in the port's local coordinates; andflush(QDFlushPortBuffer), which tells the host the part of the buffer that changed.Notes for review
ZoomWindowsaves the state it leaves, soSetWindowUserStatewhile the window sits in the state it would save is saved over — the classic's behavior, and whyZoomWindowIdealwas added; the tests assert it.GetWindowOwner), sheets positioned on their parents, proxy icons,ZoomWindowIdealand the ideal user state (the states here are the classic's), and drawers' sliding, which is the host's animation. Menus, controls and dialogs come in the modules that follow.Testing
FrontWindowskipping the palettes, the two activation scopes, no-activates,FindWindowpast ignored clicks and under the menu bar, the desktop without the menu bar, centering, cascading (the origin advancing and starting over), the alert position, disposal, and windows let go of; shown windows needing drawing, invalidating and validating, no-updates,BeginUpdate/EndUpdateholding drawing to the update region, occlusion (covered again stays drawn), uncovering by hide and by move, flushing to the host, port bits locks, and drawing through the port.FreeTypetrait. Linux and the 32-bit targets are left to CI.