Skip to repository content36 lines · 956 B · rust
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T04:12:55.846Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
panel.rs
1use gpui::actions;
2use ui::prelude::*;
3
4actions!(
5 panel,
6 [
7 /// Navigates to the next tab in the panel.
8 NextPanelTab,
9 /// Navigates to the previous tab in the panel.
10 PreviousPanelTab
11 ]
12);
13
14pub trait PanelHeader: workspace::Panel {}
15
16/// Implement this trait to enable a panel to have tabs.
17pub trait PanelTabs: PanelHeader {
18 /// Returns the index of the currently selected tab.
19 fn selected_tab(&self, cx: &mut App) -> usize;
20 /// Selects the tab at the given index.
21 fn select_tab(&self, cx: &mut App, index: usize);
22 /// Moves to the next tab.
23 fn next_tab(&self, _: NextPanelTab, cx: &mut App) -> Self;
24 /// Moves to the previous tab.
25 fn previous_tab(&self, _: PreviousPanelTab, cx: &mut App) -> Self;
26}
27
28#[derive(IntoElement)]
29pub struct PanelTab {}
30
31impl RenderOnce for PanelTab {
32 fn render(self, _window: &mut Window, _cx: &mut App) -> impl IntoElement {
33 div()
34 }
35}
36