-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Popover
- A consistent way of enabling a Subview to popup outside of a View
#3691
Comments
If I remember, only occur to me that I love the |
If the list is always available it is not a "Dropdown Combobox", but just a ComboBox. The current implementation doesn't really provide a "Dropdown Combobox". |
Q: What's the difference between a
Q: Can't I use a
Q: But, can
|
This should say "if any other View than the Popover's owner gets focus". Otherwise, how would the TextViewAutoComplete popover work? |
I have a suggestion for this. If it's a "Dropdown Combobox" then |
Yes! |
(Very drafty for now... just some thoughts).
This Issue is a proposal for how to build into TG v2 a consistent way for a View to have a UI element show itself outside of the View's Viewport.
Popover - A
View
that that is displayed outside of the View that owns it's Viewport.There are at least these use-cases of Popovers:
Autocomplete Popup
TextView
would like a list of autocomplete items to be displayed below the view, at the cursor position as the user types. The user can use mouse/keyboard to select an autocomplete item and the pop over disappears.Current Implementation
_popup
(aListView
) tothis.SuperView
Visible
to show/hideFocus
works #3627 I've had to change the implementation so_popup
only gets removed/disposed when the host is removed/disposed).Drop-down Combobox
Current Implementation
ComboBox
needs to be sized to allow the drop-down to show if HideDropdownListOnClick is true._listview
(of typeComboListView
) is a subview ofCombobox
ComboListView
overridesOnMouseEvent
(which isinternal
!) with a bunch of hackery to deal with when it should be displayedMenus (from MenuBar)
Current Implementation
MenuBar
is a "special" subview ofApplication.Top
(Toplevel has knowledge of it).MenuBar
is activated (via keyboard/mouse/api) it creates instances ofMenu
and adds them toTop
MenuBar
andMenu
have convoluted logic for sensing when the menus should close (via mouse & keyboard).Menu
closes, it is removed fromTop
Context Menus
Current Implementation
MenuBar
that is created whenShow
is called._menuBar
is never actually added to any views;BeginInit
/EndInit
are called manually.Tooltip
As a user, when I hover the mouse over a
View
, I'd like a temporary popup to appear providing a "tip" regarding the View's purpose.Current Implementation
Proposal
Tenets (Unless you know better ones...)
Subviews
being changed during aforeach
iteration). In this design we will ensure there's no need to mess with another View'sSubviews
.Design
At the
Application
level we'll add a peer ofApplication.Top
namedApplication.Popover
:Top.Draw()
is called, ifPopover.Visible
we'll callPopover.Draw()
. This will ensure the Popover is always drawn over everything else.Popover.Visible && Popover.HasFocus
we'll givePopover
a chance to handle key events.Popover.VIsible
andPopover == Applicaiton.MouseGrabView
we'll let it have mouse events. If a click happens outside ofPopover.Frame
we setPopover.Visible = false
.Popover.HasFocus
, if any other View gets focus, we'll setPopover.Visible = false
.Top.LayoutSubviews
is called, we'll then callPopover.SetRelativeLayout
Applicaton.ShowPopover (View popoverView)
Application.HidePopover ()
View
will have no knowledge of the popover concept.Any
View
subclass that wants a Popover, will:_myPopover = new MyPopoverView();
_myPopover
will always havethis.SuperView is null
._myPopover.X/Y/Width/Height
to ??? (NEED TO FIGURE THIS OUT)Application.ShowPopover(_myPopover)
Application.HidePopover()
Footnotes
I've considered "As a user, when press a special key, I'd like all visible Views to show temporary popup providing a "tip" regarding the View's purpose." This could be implemented by having the container view showing a Popover who's job it was to show "tips" for each subview. ↩
The text was updated successfully, but these errors were encountered: