forked from 1b-agent/opencadstudio-upstream
first commit
This commit is contained in:
1 parent
d52c6440ff
commit
d2fdac7f1e
274 files changed
+89330
No files matched your search
@@ -0,0 +1,71 @@
|
||||
// View module — navigation, visual styles, and viewport presets.
|
||||
|
||||
mod hidden;
|
||||
mod orbit;
|
||||
mod ortho;
|
||||
mod pan;
|
||||
mod persp;
|
||||
mod solid;
|
||||
mod view_front;
|
||||
mod view_iso;
|
||||
mod view_right;
|
||||
mod view_top;
|
||||
mod wireframe;
|
||||
mod xray;
|
||||
mod zoom_ext;
|
||||
mod zoom_in;
|
||||
mod zoom_out;
|
||||
|
||||
use crate::modules::{CadModule, RibbonGroup};
|
||||
|
||||
pub struct ViewModule;
|
||||
|
||||
impl CadModule for ViewModule {
|
||||
fn id(&self) -> &'static str {
|
||||
"view"
|
||||
}
|
||||
fn title(&self) -> &'static str {
|
||||
"View"
|
||||
}
|
||||
|
||||
fn ribbon_groups(&self) -> Vec<RibbonGroup> {
|
||||
vec![
|
||||
RibbonGroup {
|
||||
title: "Navigate",
|
||||
tools: vec![
|
||||
zoom_ext::tool().into(),
|
||||
zoom_in::tool().into(),
|
||||
zoom_out::tool().into(),
|
||||
pan::tool().into(),
|
||||
orbit::tool().into(),
|
||||
],
|
||||
},
|
||||
RibbonGroup {
|
||||
// WIREFRAME and SOLID ids are special-cased in ribbon.rs
|
||||
// for toggle-state highlighting based on Ribbon::wireframe.
|
||||
title: "Visual Style",
|
||||
tools: vec![
|
||||
wireframe::tool().into(),
|
||||
solid::tool().into(),
|
||||
hidden::tool().into(),
|
||||
xray::tool().into(),
|
||||
],
|
||||
},
|
||||
RibbonGroup {
|
||||
// ORTHO and PERSP ids are special-cased in ribbon.rs
|
||||
// for toggle-state highlighting based on Camera::projection.
|
||||
title: "Projection",
|
||||
tools: vec![ortho::tool().into(), persp::tool().into()],
|
||||
},
|
||||
RibbonGroup {
|
||||
title: "Preset",
|
||||
tools: vec![
|
||||
view_top::tool().into(),
|
||||
view_front::tool().into(),
|
||||
view_right::tool().into(),
|
||||
view_iso::tool().into(),
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user