Rename Handle to Model
This commit is contained in:
parent
14d24a9ac6
commit
1a54ac0d69
32 changed files with 11195 additions and 482 deletions
|
@ -23,7 +23,7 @@ impl BufferSearch {
|
|||
|
||||
pub fn view(cx: &mut AppContext) -> View<Self> {
|
||||
{
|
||||
let state = cx.entity(|cx| Self::new());
|
||||
let state = cx.build_model(|cx| Self::new());
|
||||
let render = Self::render;
|
||||
View::for_handle(state, render)
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ impl EditorPane {
|
|||
|
||||
pub fn view(cx: &mut AppContext) -> View<Self> {
|
||||
{
|
||||
let state = cx.entity(|cx| hello_world_rust_editor_with_status_example(cx));
|
||||
let state = cx.build_model(|cx| hello_world_rust_editor_with_status_example(cx));
|
||||
let render = Self::render;
|
||||
View::for_handle(state, render)
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ impl TitleBar {
|
|||
|
||||
pub fn view(cx: &mut AppContext, livestream: Option<Livestream>) -> View<Self> {
|
||||
{
|
||||
let state = cx.entity(|cx| Self::new(cx).set_livestream(livestream));
|
||||
let state = cx.build_model(|cx| Self::new(cx).set_livestream(livestream));
|
||||
let render = Self::render;
|
||||
View::for_handle(state, render)
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ mod stories {
|
|||
impl TitleBarStory {
|
||||
pub fn view(cx: &mut AppContext) -> View<Self> {
|
||||
{
|
||||
let state = cx.entity(|cx| Self {
|
||||
let state = cx.build_model(|cx| Self {
|
||||
title_bar: TitleBar::view(cx, None),
|
||||
});
|
||||
let render = Self::render;
|
||||
|
|
|
@ -3,12 +3,13 @@ use std::sync::Arc;
|
|||
use chrono::DateTime;
|
||||
use gpui2::{px, relative, rems, AppContext, Context, Size, View};
|
||||
|
||||
use crate::{static_livestream, user_settings_mut, v_stack, AssistantPanel, Button, ChatMessage,
|
||||
ChatPanel, CollabPanel, EditorPane, FakeSettings, Label, LanguageSelector, Pane, PaneGroup,
|
||||
Panel, PanelAllowedSides, PanelSide, ProjectPanel, SettingValue, SplitDirection, StatusBar,
|
||||
Terminal, TitleBar, Toast, ToastOrigin,
|
||||
};
|
||||
use crate::{prelude::*, NotificationsPanel};
|
||||
use crate::{
|
||||
static_livestream, user_settings_mut, v_stack, AssistantPanel, Button, ChatMessage, ChatPanel,
|
||||
CollabPanel, EditorPane, FakeSettings, Label, LanguageSelector, Pane, PaneGroup, Panel,
|
||||
PanelAllowedSides, PanelSide, ProjectPanel, SettingValue, SplitDirection, StatusBar, Terminal,
|
||||
TitleBar, Toast, ToastOrigin,
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Gpui2UiDebug {
|
||||
|
@ -171,7 +172,7 @@ impl Workspace {
|
|||
|
||||
pub fn view(cx: &mut AppContext) -> View<Self> {
|
||||
{
|
||||
let state = cx.entity(|cx| Self::new(cx));
|
||||
let state = cx.build_model(|cx| Self::new(cx));
|
||||
let render = Self::render;
|
||||
View::for_handle(state, render)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue