mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 14:28:11 +08:00
Polish a few things (#81)
* Implement/suppress various compiler/clippy lints * Change `tool_init` to take `ToolType` by value * Factor out error conversion into a function * Consume parameters with `todo` * Make `workspace` stuff public Making them public also removes the warnings without having to suppress them. Also, this commit removes the unused import of `EditorError` * Remove allow(unused_variables), use vars in `todo` Also implements `Debug` on `DocumentToolData`
This commit is contained in:
committed by
Keavon Chambers
parent
87ed3a1bbd
commit
b556dd6bfd
@@ -5,32 +5,32 @@ type DocumentId = u32;
|
||||
/// Modify the active Document in the editor state store
|
||||
#[wasm_bindgen]
|
||||
pub fn set_active_document(document_id: DocumentId) {
|
||||
todo!()
|
||||
todo!("set_active_document {}", document_id)
|
||||
}
|
||||
|
||||
/// Query the name of a specific document
|
||||
#[wasm_bindgen]
|
||||
pub fn get_document_name(document_id: DocumentId) -> String {
|
||||
todo!()
|
||||
todo!("get_document_name {}", document_id)
|
||||
}
|
||||
|
||||
/// Query the id of the most recently interacted with document
|
||||
#[wasm_bindgen]
|
||||
pub fn get_active_document() -> DocumentId {
|
||||
todo!()
|
||||
todo!("get_active_document")
|
||||
}
|
||||
|
||||
use editor_core::workspace::PanelId;
|
||||
/// Notify the editor that the mouse hovers above a panel
|
||||
#[wasm_bindgen]
|
||||
pub fn panel_hover_enter(panel_id: PanelId) {
|
||||
todo!()
|
||||
todo!("panel_hover_enter {}", panel_id)
|
||||
}
|
||||
|
||||
/// Query a list of currently available operations
|
||||
#[wasm_bindgen]
|
||||
pub fn get_available_operations() -> Vec<JsValue> {
|
||||
todo!();
|
||||
todo!("get_available_operations")
|
||||
// vec!["example1", "example2"].into_iter().map(JsValue::from).collect()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user