1、name = "A" .. GetPluginID ()
the name we are calling it, simply prepend "A", "B", etc.
2、long WindowCreate(BSTR Name, long Left, long Top, long Width, long Height, short Position, long Flags, long BackgroundColour)
Left, Top -设定左上顶点,如果设为0,0就可以用后面的自动定位参数
Width, Height - 设定窗口的宽和高.
Position - 自动定位参数,具体见下表.
Value Purpose Lua symbol
0 Stretch to output view size miniwin.pos_stretch_to_view
1 Stretch with aspect ratio miniwin.pos_stretch_to_view_with_aspect
2 Strech to owner size miniwin.pos_stretch_to_owner
3 Stretch with aspect ratio miniwin.pos_stretch_to_owner_with_aspect
4 Top left miniwin.pos_top_left
5 Center left-right at top miniwin.pos_top_center
6 Top right miniwin.pos_top_right
7 On right, center top-bottom miniwin.pos_center_right
8 On right, at bottom miniwin.pos_bottom_right
9 Center left-right at bottom miniwin.pos_bottom_center
10 On left, at bottom miniwin.pos_bottom_left
11 On left, center top-bottom miniwin.pos_center_left
12 Centre all miniwin.pos_center_all
13 Tile miniwin.pos_tile
Flags通常设成0就可以
3、long WindowDelete(BSTR Name)
4、long WindowShow(BSTR Name, BOOL Show)
5、VARIANT WindowList()
-- show all windows
windows = WindowList()
if windows then
for _, v in ipairs (windows) do
Note (v)
end
end -- if any
6、VARIANT WindowInfo(BSTR Name, long InfoType)
Name - the name of an existing miniwindow.
InfoType - the information you want:
1: Left (from WindowCreate)
2: Top (from WindowCreate)
3: Width
4: Height
5: Show flag
6: Is it hidden right now?
7: Layout position code
8: Flags
9: Background colour
10: Where it is right now: left
11: Where it is right now: top
12: Where it is right now: right
13: Where it is right now: bottom
14: Where mouse last was (mouse down, mouse up or move) - X position - relative to miniwindow
15: Where mouse last was (mouse down, mouse up or move) - Y position - relative to miniwindow
16: Incremented each time items 14/15 are updated.
17: Where mouse was (during drag operation) - X position - relative to output window
18: Where mouse was (during drag operation) - y position - relative to output window
19: Hotspot ID of the hotspot currently being moused-over (empty string if none)
20: Hotspot ID of the hotspot currently being moused-down in (empty string if none)
21: Date/time the miniwindow was installed.
7、long WindowPosition(BSTR Name, long Left, long Top, short Position, long Flags) 重新定位窗口,参数与create相同
8、long WindowResize(BSTR WindowName, long Width, long Height, long BackgroundColour) 改变窗口大小颜色