Restructure action macro to assign a namespace to every action
Also, allow arbitrary types to be used as Actions via the impl_actions macro Co-authored-by: Nathan Sobo <nathan@zed.dev> Co-authored-by: Keith Simmons <keith@zed.dev>
This commit is contained in:
parent
206b0f0f8c
commit
5242a3a6dc
33 changed files with 432 additions and 306 deletions
|
@ -6,7 +6,7 @@ use crate::{
|
|||
json::{self, ToJson},
|
||||
platform::Event,
|
||||
text_layout::TextLayoutCache,
|
||||
Action, AnyAction, AnyModelHandle, AnyViewHandle, AnyWeakModelHandle, AssetCache, ElementBox,
|
||||
Action, AnyModelHandle, AnyViewHandle, AnyWeakModelHandle, AssetCache, ElementBox,
|
||||
ElementStateContext, Entity, FontSystem, ModelHandle, ReadModel, ReadView, Scene,
|
||||
UpgradeModelHandle, UpgradeViewHandle, View, ViewHandle, WeakModelHandle, WeakViewHandle,
|
||||
};
|
||||
|
@ -223,7 +223,7 @@ impl Presenter {
|
|||
|
||||
pub struct DispatchDirective {
|
||||
pub path: Vec<usize>,
|
||||
pub action: Box<dyn AnyAction>,
|
||||
pub action: Box<dyn Action>,
|
||||
}
|
||||
|
||||
pub struct LayoutContext<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue