67 lines
2.4 KiB
Plaintext
67 lines
2.4 KiB
Plaintext
import { TextComboBox,TextInputComboBox } from "../CustomController/ComboBox";
|
|
import { TitleButton } from "../LayoutInterface/Interface/ButtonInterface";
|
|
import { ViewDialog } from "../CustomController/Dialog"
|
|
import { SwitchView } from "../LayoutInterface/Layout/SwitchView";
|
|
import {SelectionFilter} from "../LayoutInterface/Layout/SelectionFilter"
|
|
import {DisplayMode} from "../LayoutInterface/Layout/DisplayMode"
|
|
import { LayoutSwitch } from "../LayoutInterface/Layout/LayoutSwitch";
|
|
import { FileMenuData } from "../LayoutInterface/Layout/FileMenuData";
|
|
import { mwInfo } from '../DispWinInfo/DispWinInfo'
|
|
import { SubColumnMenu} from "../CustomController/Button";
|
|
import { fileIo } from "@kit.CoreFileKit";
|
|
|
|
|
|
@ComponentV2
|
|
export struct TitleColumnSub {
|
|
@Local layerArray: Array<TitleButton> = [];
|
|
@Local dX:number=0;
|
|
@Local dY:number=0;
|
|
@Local viewDialog:CustomDialogController|undefined=undefined;
|
|
//文件操作目录数据初始化
|
|
|
|
private ViewDialog(): CustomDialogController {
|
|
return new CustomDialogController({
|
|
builder: ViewDialog(), // 确保 ViewDialog 组件已正确定义
|
|
width: mwInfo.width*0.06,
|
|
height: mwInfo.width*0.052,
|
|
borderWidth: 1,
|
|
cornerRadius: 5,
|
|
isModal: true,
|
|
alignment: DialogAlignment.TopStart,
|
|
offset: { dx: this.dX, dy: this.dY },
|
|
});
|
|
}
|
|
|
|
build(){
|
|
Row({space:5}){
|
|
SubColumnMenu({
|
|
menus:FileMenuData.aMenus as Array<TitleButton>, icon:'base_shortcut_menu',name:'菜单'})
|
|
.margin({ top:0, left: 5, bottom: 0, right: 0 })
|
|
Text('|')
|
|
.fontSize(16)
|
|
TextComboBox({name:'拾取类型:',menu:SelectionFilter})
|
|
Text('图层:')
|
|
.fontSize(16)
|
|
TextInputComboBox({menu:this.layerArray}).width('10%')
|
|
SubColumnMenu({menus:LayoutSwitch})
|
|
//视角弹窗
|
|
Button().onClick((event) => {
|
|
this.dX=event.windowX
|
|
this.dY=event.windowY
|
|
if(this.viewDialog==undefined){
|
|
this.viewDialog=this.ViewDialog();
|
|
}
|
|
this.viewDialog.open();
|
|
}).width(mwInfo.width*0.013)
|
|
.height(mwInfo.width*0.013)
|
|
.backgroundColor(Color.Transparent)
|
|
.backgroundImage($r('app.media.' + SwitchView[0].eIcon))
|
|
.backgroundImageSize({
|
|
width: '100%', // 图片宽度占满按钮
|
|
height: '100%' // 图片高度占满按钮
|
|
})
|
|
SubColumnMenu({menus:DisplayMode})
|
|
}.width('100%')
|
|
.height('100%')
|
|
}
|
|
} |