@@ -15,28 +15,30 @@ pub struct FrontendDocumentDetails {
1515#[ impl_message( Message , Frontend ) ]
1616#[ derive( PartialEq , Clone , Deserialize , Serialize , Debug ) ]
1717pub enum FrontendMessage {
18- DisplayFolderTreeStructure { data_buffer : RawBuffer } ,
19- SetActiveTool { tool_name : String , tool_options : Option < ToolOptions > } ,
20- SetActiveDocument { document_id : u64 } ,
18+ // Display prefix: make the frontend show something, like a dialog
19+ // Update prefix: give the frontend a new value or state for it to use
20+ // Trigger prefix: cause a browser API to do something
21+ DisplayDocumentLayerTreeStructure { data_buffer : RawBuffer } ,
22+ UpdateActiveTool { tool_name : String , tool_options : Option < ToolOptions > } ,
23+ UpdateActiveDocument { document_id : u64 } ,
2124 UpdateOpenDocumentsList { open_documents : Vec < FrontendDocumentDetails > } ,
2225 UpdateInputHints { hint_data : HintData } ,
23- DisplayError { title : String , description : String } ,
24- DisplayPanic { panic_info : String , title : String , description : String } ,
26+ DisplayDialogError { title : String , description : String } ,
27+ DisplayDialogPanic { panic_info : String , title : String , description : String } ,
2528 DisplayConfirmationToCloseDocument { document_id : u64 } ,
2629 DisplayConfirmationToCloseAllDocuments ,
27- DisplayAboutGraphiteDialog ,
28- UpdateLayer { data : LayerPanelEntry } ,
29- UpdateArtwork { svg : String } ,
30- UpdateOverlays { svg : String } ,
31- UpdateArtboards { svg : String } ,
32- UpdateScrollbars { position : ( f64 , f64 ) , size : ( f64 , f64 ) , multiplier : ( f64 , f64 ) } ,
33- UpdateRulers { origin : ( f64 , f64 ) , spacing : f64 , interval : f64 } ,
34- ExportDocument { document : String , name : String } ,
35- SaveDocument { document : String , name : String } ,
36- AutoSaveDocument { document : String , details : FrontendDocumentDetails , version : String } ,
37- RemoveAutoSaveDocument { document_id : u64 } ,
38- OpenDocumentBrowse ,
30+ DisplayDialogAboutGraphite ,
31+ UpdateDocumentLayer { data : LayerPanelEntry } ,
32+ UpdateDocumentArtwork { svg : String } ,
33+ UpdateDocumentOverlays { svg : String } ,
34+ UpdateDocumentArtboards { svg : String } ,
35+ UpdateDocumentScrollbars { position : ( f64 , f64 ) , size : ( f64 , f64 ) , multiplier : ( f64 , f64 ) } ,
36+ UpdateDocumentRulers { origin : ( f64 , f64 ) , spacing : f64 , interval : f64 } ,
37+ TriggerFileUpload ,
38+ TriggerFileDownload { document : String , name : String } ,
39+ TriggerIndexedDbWriteDocument { document : String , details : FrontendDocumentDetails , version : String } ,
40+ TriggerIndexedDbRemoveDocument { document_id : u64 } ,
3941 UpdateWorkingColors { primary : Color , secondary : Color } ,
40- SetCanvasZoom { new_zoom : f64 } ,
41- SetCanvasRotation { new_radians : f64 } ,
42+ UpdateCanvasZoom { factor : f64 } ,
43+ UpdateCanvasRotation { angle_radians : f64 } ,
4244}
0 commit comments