-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
181 additions
and
6 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
aardio/codes/范例程序/C) 文件操作/3) asar打包解包/.build/WinAsar.init.aardio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
//发布前触发 | ||
import ide; |
172 changes: 172 additions & 0 deletions
172
aardio/codes/范例程序/C) 文件操作/3) asar打包解包/dist/release.win.ui.ctrl.aardio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
import com.picture; | ||
import win.ui.ctrl.metaProperty; | ||
import win.ui.ctrl.static; | ||
import win.ui.ctrl.button; | ||
import win.ui.ctrl.custom; | ||
namespace win.ui.ctrl; | ||
|
||
//发布时将从下面排除未使用的控件库 | ||
import win.ui.ctrl.custom | ||
import win.ui.ctrl.bkplus | ||
import win.ui.ctrl.edit | ||
import win.ui.ctrl.plus | ||
import win.ui.ctrl.static | ||
import win.ui.ctrl.richedit | ||
import win.ui.ctrl.treeview | ||
|
||
namespace factory{ | ||
|
||
create = function(tParam){ | ||
tParam.exstyle := 0; | ||
tParam.style := 0; | ||
tParam.style |= 0x40000000/*_WS_CHILD*/ ; | ||
|
||
if( tParam.group ) tParam.style |= 0x20000/*_WS_GROUP*/ | ||
if( tParam.tabstop )tParam.style |= 0x10000/*_WS_TABSTOP*/ | ||
if( !tParam.hide )tParam.style |= 0x10000000/*_WS_VISIBLE*/ ; | ||
if( tParam.disabled )tParam.style |= 0x8000000/*_WS_DISABLED*/ | ||
if( tParam.hscroll )tParam.style |= 0x100000/*_WS_HSCROLL*/ | ||
if( tParam.vscroll )tParam.style |= 0x200000/*_WS_VSCROLL*/ | ||
if( tParam.border )tParam.style |= 0x800000/*_WS_BORDER*/ | ||
if( tParam.frame )tParam.exstyle |= 0x1/*_WS_EX_DLGMODALFRAME*/ | ||
if( tParam.acceptfiles )tParam.exstyle |= 0x10/*_WS_EX_ACCEPTFILES*/ | ||
if( tParam.cp )tParam.exstyle |= 0x10000/*_WS_EX_CONTROLPARENT*/ | ||
if( tParam.clip )tParam.style |= 0x4000000/*_WS_CLIPSIBLINGS*/ | ||
if( tParam.clipch ) tParam.style |= 0x2000000/*_WS_CLIPCHILDREN*/; | ||
if( tParam.transparent ) tParam.exstyle |= 0x20/*_WS_EX_TRANSPARENT*/; | ||
|
||
if(!tParam.cls) return; | ||
tParam.$friendClassName = tParam.cls;//记录原始类名 | ||
|
||
var cls = ..win.ui.ctrl[tParam.cls]; | ||
if(!cls) cls = ..table.getByNamespace(tParam.cls,..win.ui.ctrl); | ||
|
||
if(cls){ | ||
var parent = tParam.parent; | ||
tParam.parent = null; | ||
|
||
//创建控件,并在每个构造函数中对tParam进行一些预处理 | ||
var obj = cls(parent,tParam); | ||
obj.tParam = tParam; | ||
obj[["initializing"]] = true; | ||
return obj; | ||
} | ||
elseif( ..string.endWith(tParam.cls,".aardio",true) ){ | ||
var parent = tParam.parent; | ||
tParam.parent = null; | ||
|
||
var frmCreate; | ||
var frm = ..win.loadForm(tParam.cls,function(tParam2){ | ||
tParam2.parent = parent ; | ||
tParam2.mode="child"; | ||
tParam2.exmode="none"; | ||
tParam2.border="none" | ||
tParam2.title=false; | ||
tParam2.text=tParam.text; | ||
tParam2.bgcolor=tParam.bgcolor; | ||
if(tParam.bkImage){ | ||
tParam2.image=tParam.bkImage; | ||
tParam2.bkBottom = tParam.bkBottom : 0; | ||
tParam2.bkRight = tParam.bkRight : 0; | ||
tParam2.bkTop = tParam.bkTop : 0; | ||
tParam2.bkLeft = tParam.bkLeft : 0; | ||
} | ||
tParam.cls="custom"; | ||
tParam2.tParam=tParam; | ||
|
||
frmCreate = ..win.form(tParam2); | ||
return frmCreate; | ||
},parent); | ||
|
||
if(!frm) frm = frmCreate; | ||
if(!frm) return; | ||
|
||
frm.tParam = tParam; | ||
frm[["initializing"]] = true; | ||
return frm; | ||
} | ||
} | ||
|
||
onCreateComplete = function(obj,dpiScaleX,dpiScaleY){ | ||
var tParam = obj.tParam; | ||
obj.tParam = null; | ||
|
||
obj[["className"]] = tParam.cls; | ||
|
||
if(tParam.$friendClassName){ | ||
obj[["cls"]] = tParam.$friendClassName; | ||
tParam.cls = tParam.$friendClassName; | ||
tParam.$friendClassName = null; | ||
} | ||
|
||
//记录控件窗口原始大小(以计算自动调整的比例) | ||
obj._defRect = ::RECT( tParam.left,tParam.top,tParam.right,tParam.bottom); | ||
obj._defClientRect := ::RECT( 0, 0, tParam.right - tParam.left, tParam.bottom - tParam.top); | ||
|
||
obj.setFont( tParam.font || ::LOGFONT() ); | ||
//去掉CreateWindowEx创建窗口时已经用到的属性 | ||
tParam[["font"]]= null; | ||
tParam[["style"]] = null; | ||
tParam[["left"]] = null; | ||
tParam[["right"]] = null; | ||
tParam[["top"]] = null; | ||
tParam[["bottom"]] = null; | ||
tParam[["hide"]] = null; | ||
tParam[["disabled"]] = null; | ||
tParam[["exstyle"]] = null; | ||
tParam[["autoResize"]] = null; | ||
tParam[["hwnd"]] = null; | ||
tParam[["text"]] = null; | ||
|
||
//必须在设置其他属性以前调用初始化函数 | ||
var onCreate = obj[["onCreate"]]; | ||
if( onCreate ){ obj.onCreate() } | ||
|
||
//初始化窗口的其他属性 | ||
..table.assign(obj,tParam); | ||
if(dpiScaleX && dpiScaleY && obj.enableDpiScaling){ | ||
obj.enableDpiScaling(dpiScaleX,dpiScaleY); | ||
} | ||
obj[["initializing"]] = false; | ||
|
||
//窗口所有属性已初始化 | ||
var onCreated = obj[["onCreated"]]; | ||
if( onCreated ){ obj.onCreated() } | ||
} | ||
} | ||
|
||
::Comctl32 := ..raw.loadDll("Comctl32.dll"); | ||
::Comctl32.InitCommonControlsEx({INT size = 8;INT ic = 0x897F;}) | ||
|
||
/**intellisense(::) | ||
::Comctl32 = 在标准库 win.ui.ctrl 加载的系统DLL组件 comctl32.dll,\n导入 win.ui,win.ui.ctrl 可自动在所有窗口控件创建以前加载,\n!dllModule. | ||
end intellisense**/ | ||
|
||
/**intellisense() | ||
_NM_FIRST=@0x0/*_NM_FIRST*/ | ||
_NM_LAST=@0xFFFFFF9D/*_NM_LAST*/ | ||
_NM_OUTOFMEMORY=@0xFFFFFFFF/*_NM_OUTOFMEMORY*/ | ||
_NM_CLICK=@0xFFFFFFFE/*_NM_CLICK*/ | ||
_NM_DBLCLK=@0xFFFFFFFD/*_NM_DBLCLK*/ | ||
_NM_RETURN=@0xFFFFFFFC/*_NM_RETURN*/ | ||
_NM_RCLICK=@0xFFFFFFFB/*_NM_RCLICK*/ | ||
_NM_RDBLCLK=@0xFFFFFFFA/*_NM_RDBLCLK*/ | ||
_NM_SETFOCUS=@0xFFFFFFF9/*_NM_SETFOCUS*/ | ||
_NM_KILLFOCUS=@0xFFFFFFF8/*_NM_KILLFOCUS*/ | ||
_NM_CUSTOMDRAW=@0xFFFFFFF4/*_NM_CUSTOMDRAW*/ | ||
_NM_HOVER=@0xFFFFFFF3/*_NM_HOVER*/ | ||
_NM_NCHITTEST=@0xFFFFFFF2/*_NM_NCHITTEST*/ | ||
_NM_KEYDOWN=@0xFFFFFFF1/*_NM_KEYDOWN*/ | ||
_NM_RELEASEDCAPTURE=@0xFFFFFFF0/*_NM_RELEASEDCAPTURE*/ | ||
_NM_SETCURSOR=@0xFFFFFFEF/*_NM_SETCURSOR*/ | ||
_NM_CHAR=@0xFFFFFFEE/*_NM_CHAR*/ | ||
_NM_TOOLTIPSCREATED=@0xFFFFFFED/*_NM_TOOLTIPSCREATED*/ | ||
_NM_LDOWN=@0xFFFFFFEC/*_NM_LDOWN*/ | ||
_NM_RDOWN=@0xFFFFFFEB/*_NM_RDOWN*/ | ||
_NM_THEMECHANGED=@0xFFFFFFEA/*_NM_THEMECHANGED*/ | ||
_NM_FONTCHANGED=@0xFFFFFFE9/*_NM_FONTCHANGED*/ | ||
_NM_CUSTOMTEXT=@0xFFFFFFE8/*_NM_CUSTOMTEXT*/ | ||
_NM_TVSTATEIMAGECHANGING=@0xFFFFFFE8/*_NM_TVSTATEIMAGECHANGING*/ | ||
_CCM_SETBKCOLOR=@0x2001/*_CCM_SETBKCOLOR*/ | ||
_CCM_DPISCALE=@0x200C/*_CCM_DPISCALE*/ | ||
end intellisense**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
[5]="D:\huangyx\编程\开发工具\aardio\example\wubi-lex-master\default.aproj"; | ||
[1]="D:\huangyx\projects\aardio\sun\default.aproj"; | ||
[2]="D:\huangyx\projects\aardio\UIDemo1\default.aproj"; | ||
[3]="D:\huangyx\编程\开发工具\aardio\example\plus.新年快乐\新年快乐.aproj"; | ||
[4]="D:\huangyx\projects\aardio\S1DH\default.aproj" | ||
[5]="D:\huangyx\projects\aardio\S1DH\default.aproj"; | ||
[1]="D:\huangyx\编程\开发工具\aardio\aardio_github\aardio\codes\范例程序\C) 文件操作\3) asar打包解包\WinAsar.aproj"; | ||
[2]="D:\huangyx\projects\aardio\sun\default.aproj"; | ||
[3]="D:\huangyx\projects\aardio\UIDemo1\default.aproj"; | ||
[4]="D:\huangyx\编程\开发工具\aardio\example\plus.新年快乐\新年快乐.aproj"; | ||
[6]="D:\huangyx\编程\开发工具\aardio\example\wubi-lex-master\default.aproj" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters