Replies: 2 comments
-
Using "Bars" for the generic term for the control zones on different sides of the window -- TopAppBar, NavBar, ToolBar etc -- covers most of the connotation. Type will be |
Beta Was this translation helpful? Give feedback.
-
Three control flow scenarios according to Kai
The only challenge is figuring out when to use 2 vs. 3. Relevant factors:
Value self-triggered OpenDialog vs. FuncButton use of Dialogs
|
Beta Was this translation helpful? Give feedback.
-
Dialog vs. Window
Decision 1: Logical flow
Dialog = Context + Modal:
Window = no Context + non-Modal
Decision 2: Size and capacity
Dialog
PopupWindow
: Small, minimal content: usegi.NewDialog
method.FullWindow
: large, could have other dialogs: usegi.NewFullDialog
method.Window
Always at least
FullWindow
NewWindow
: separate content, default for NewWindow() Stage methodFullWindow
: option for e.g., web browser pages -- lots of similar content, don't want separate windows.Header, Footer etc "Control Zones" (CZ)
Header
is typically at least (but not exclusively)TopAppBar
TopAppBar
has specific support inScene
--var DefaultTopAppBar
adds global default "main menu" functionality, Preferences, Inspector etc -- can set this to app-specific one to get additional / different defaults for every app bar (should mostly put things directly into overflow menu).giv
uses TopAppBar when present.Footer
,Left
can have app-specific nav-bar functionality, etc.Each has a stack of functions -- functions can be inherited, shared, added to.
Windows don't automatically inherit CZs: specify their own (could all be same function)
Dialogs sometimes inherit CZ from context, sometimes don't. Sometimes add additional funcs to top app bar.
Body, Scene, Stage
Need for inheritance + functional basis of CZ requires that "main content" be specified in a separate element from the CZ elements, which are dynamic, compositional etc, whereas the main content is "bespoke" -- particular to a specific window etc.
Body
is this main content container -- always make the specific content in a Body, which then gets attached to the Scene.Scene
remains the full encapsulated "rendering unit" -- a chunk of widgets that are all arranged (Layout) and rendered together onto a specific set of dedicatedPixels
.NewEmptyScene
and bypass the Body and CZ logic. This is always an option for anyone who also wants to skip this stuff (e.g., for tests)Stage
manages the presentation of the Scene, in relation to other Scenes, RenderWin windows, etc. Popup vs. FullWindow, etc.Body
: duplicates all the functionality ofScene
so that you can operate directly on it without needing to juggle two variables, for the Scene and Body.giv Dialogs
Inheritance
Inherit bool
for each CZ. If true, FullDialogs inherit CZ from context. By default, only Header is true.Beta Was this translation helpful? Give feedback.
All reactions