TopDownQueryBottomLayout creates a Layout with list top-to-bottom and the query prompt at the bottom.
(state *Peco)
| 845 | // TopDownQueryBottomLayout creates a Layout with list top-to-bottom |
| 846 | // and the query prompt at the bottom. |
| 847 | func TopDownQueryBottomLayout(state *Peco) (*BasicLayout, error) { |
| 848 | sb, err := newStatusBar(state) |
| 849 | if err != nil { |
| 850 | return nil, err |
| 851 | } |
| 852 | prompt, err := NewUserPrompt(state.Screen(), AnchorBottom, 1+extraOffset, state.Prompt(), state.Styles()) |
| 853 | if err != nil { |
| 854 | return nil, err |
| 855 | } |
| 856 | list, err := NewListArea(state.Screen(), AnchorTop, 0, true, state.Styles()) |
| 857 | if err != nil { |
| 858 | return nil, err |
| 859 | } |
| 860 | return &BasicLayout{ |
| 861 | statusBar: sb, |
| 862 | screen: state.Screen(), |
| 863 | prompt: prompt, |
| 864 | list: list, |
| 865 | }, nil |
| 866 | } |
| 867 | |
| 868 | // SortTopDown returns whether this layout sorts lines from top to bottom. |
| 869 | func (l *BasicLayout) SortTopDown() bool { |
searching dependent graphs…