⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filebar.tbl

📁 cShap控制云台运动
💻 TBL
字号:
<?xml version="1.0" encoding="utf-8"?>
<vg version="700" range="0,0,2000,2000" bordericons="0" borderstyle="1" scrollbars="0" backcolor="$8000000F">
<page name="page" bounds="0,0,793.700787,1122.141732" visible="false" margin="100,100,100,100" paperwidth="2100" paperheight="2969"/>
<sheet name="sheet1" bounds="0,0,576,21">
<element name="TabSet1" bounds="0,0,576,21" origin="108.652003,-132.014977" FirstCol="0" TabIndex="-1">
<rect name="rect1" bounds="0,0,576,21" origin="206,12" linetype="0" backcolor="$8000000F" frontcolor="$FFFFFF" pattern="1"/>
<element name="element1" bounds="18,0,44,18" origin="42,12" visible="false" Caption="&apos;&apos;" Selected="false">
<line name="line1" origin="70,2" visible="false" linetype="0" backcolor="$8000000F" pattern="1">
<points>
44,18,6
44,1,2
43,0,2
19,0,2
18,1,2
18,18,2
</points>
</line>
<line name="line3" origin="70,2" visible="false" backcolor="$8000000F">
<points>
44,18,6
44,1,2
43,0,2
19,0,2
18,1,2
18,18,2
</points>
</line>
<line name="line2" origin="34.32334,9.591006" visible="false" linecolor="$80000010">
<points>
43,1,6
43,18,2
</points>
</line>
<text name="text1" bounds="27,4,35,16" origin="23.991266,6" autosize="true" border="$0" fontsize="12" fontcolor="$80000011" textalign="0" borderinterval="0"/>
<line name="line4" origin="43,9.5" linecolor="$80000010">
<points>
42,18,6
42,0,2
</points>
</line>
<line name="line5" origin="30.5,9.298143" visible="false" linecolor="$80000014">
<points>
43,1,6
19,1,2
19,18,2
</points>
</line>
<programe>
property Caption read GetCaption write SetCaption
private function GetCaption()
return Text1.Text
end function
private function Initialize(Sender)
FSelected = false
end function
property Selected read FSelected write SetSelected editor Bool
private function SetCaption(AValue)
i=text1.Width
Text1.Text = AValue
j=text1.Width
line1.x[0]=line1.x[0]+(j-i)
line1.x[1]=line1.x[1]+(j-i)
line1.x[2]=line1.x[2]+(j-i)
line1.Refresh()
line2.x[0] = Line1.x[0] - 1
line2.x[1] = Line1.x[0] - 1
line2.Refresh()
line3.x[0] = Line1.x[0]
line3.x[1] = Line1.x[1]
line3.x[2] = Line1.x[2]
line3.Refresh()
line4.x[0] = Line3.x[0] - 2
line4.x[1] = Line3.x[1] - 2
line4.Refresh()
line5.x[0] = Line2.x[0]
line5.Refresh()
Refresh()
end function
private function SetSelected(AValue)
if AValue then
  Line1.Visible = true
  Line2.Visible = true
  Line3.Visible = true
  Line4.Visible = false
  Line5.Visible = true
  Text1.FontColor = $80000012
else
  Line1.Visible = false
  Line2.Visible = false
  Line3.Visible = false
  Line4.Visible = true
  Line5.Visible = false
  Text1.FontColor = $80000011
end if
FSelected = AValue
end function
</programe>
</element>
<element name="UpBtn" bounds="543,0,559,16" origin="536,9" visible="false">
<rect name="Rect2" bounds="543,0,559,16" origin="549,7" linecolor="$8000000F" backcolor="$8000000F" pattern="1"/>
<line name="Line5" origin="551,8" linecolor="$80000014">
<points>
543,16,6
543,0,2
559,0,2
</points>
</line>
<line name="Line6" origin="551,8" linecolor="$80000010">
<points>
543,16,6
559,16,2
559,0,2
</points>
</line>
<line name="Line9" origin="549.5,10" linecolor="$80000012" backcolor="$0" pattern="1">
<points>
549.5,8,6
552.5,5,2
552.5,11,3
</points>
</line>
<programe>
private function Initialize(Sender)
FTimer=0
FTimerInterval = 300
end function
published function OnClick(Sender)
FirstCol = FirstCol - 1
end function
private function OnDestroy(Sender)
if FTimer &lt;&gt; 0 then
  DestroyTimer( FTimer )
  FTimer = 0
end if
end function
private function OnLButtonDown(Sender,X,Y)
Line5.LineColor = $80000010
Line6.LineColor = $80000014
Line9.Left = Line9.Left + 1
Line9.Top = Line9.Top + 1
FTimerInterval = 300
FTimer=CreateTimer( Sender, &quot;OnTimer&quot;, FTimerInterval )
end function
private function OnLButtonUp(Sender,X,Y)
Line5.LineColor = $80000014
Line6.LineColor = $80000010
Line9.Left = Line9.Left - 1
Line9.Top = Line9.Top - 1
OnDestroy( Sender )
end function
private function OnTimer(Sender)
OnClick( Sender )
if FTimerInterval = 300 then
	OnDestroy( Sender )
	FTimerInterval = 100
	FTimer=CreateTimer( Sender, &quot;OnTimer&quot;, FTimerInterval )
end if
end function
</programe>
</element>
<element name="DownBtn" bounds="560,0,576,16" origin="560,-214.25" visible="false">
<rect name="Rect2" bounds="560,0,576,16" origin="566,7" linecolor="$8000000F" backcolor="$8000000F" pattern="1"/>
<line name="Line5" origin="568,8" linecolor="$80000014">
<points>
560,16,6
560,0,2
576,0,2
</points>
</line>
<line name="Line6" origin="568,8" linecolor="$80000010">
<points>
560,16,6
576,16,2
576,0,2
</points>
</line>
<line name="Line9" origin="566.5,13" linecolor="$80000012" backcolor="$0" pattern="1">
<points>
569.5,8,6
566.5,5,2
566.5,11,3
</points>
</line>
<programe>
private function Initialize(Sender)
FTimer=0
FTimerInterval = 300
end function
published function OnClick(Sender)
FirstCol = FirstCol + 1
end function
private function OnDestroy(Sender)
if FTimer &lt;&gt; 0 then
  DestroyTimer( FTimer )
  FTimer = 0
end if
end function
private function OnLButtonDown(Sender,X,Y)
Line5.LineColor = $80000010
Line6.LineColor = $80000014
Line9.Left = Line9.Left + 1
Line9.Top = Line9.Top + 1
FTimerInterval = 300
FTimer = CreateTimer( Sender, &quot;OnTimer&quot;, FTimerInterval )
end function
private function OnLButtonUp(Sender,X,Y)
Line5.LineColor = $80000014
Line6.LineColor = $80000010
Line9.Left = Line9.Left - 1
Line9.Top = Line9.Top - 1
OnDestroy( Sender )
end function
private function OnTimer(Sender)
OnClick( Sender )
if FTimerInterval = 300 then
	OnDestroy( Sender )
  FTimerInterval = 100
  FTimer = CreateTimer( Sender, &quot;OnTimer&quot;, FTimerInterval )
end if
end function
</programe>
</element>
<group name="Group1">
</group>
<layer/>
<layer name="Tabs"/>
<programe>
public function Add(AValue)
ar[ar.Count] = AValue
if FUpdate then
  Reset()
end if
end function
public function BeginUpdate()
FUpdate = false
end function
public function Clear()
ar.Clear()
FTabIndex = -1
if FUpdate then
  Reset()
end if
end function
public function Delete(AIndex)
ar.Delete( AIndex )
if FTabIndex &gt;= ar.Count then
  FTabIndex = -1
end if
if FUpdate then
  Reset()
end if
end function
public function EndUpdate()
if not FUpdate then
  FUpdate = true
  Reset()
end if
end function
property FirstCol read FFirstCol write SetFirstCol
public function GetCount()
return ar.Count
end function
public function GetTabName(AIndex)
return ar[AIndex]
end function
public function IndexOf(s)
i = 0
while i &lt; ar.Count
  if s = ar[i] then
    return i
  end if
  i = i + 1
wend
return -1
end function
private function Initialize(Sender)
FFirstCol = 0
FUpdate = true
FTabIndex = -1
ar=array(10)
end function
public function Insert(AIndex,AValue)
ar.Insert( AIndex, AValue )
if FUpdate then
  Reset()
end if
end function
public function ItemAtCursor()
d = UnitAtCursor( 0 )
if d &lt;&gt; 0 then
  n = Group1.FindUnit( d )
  if n &gt; -1 then
    return n + FFirstCol
  end if
end if
return -1
end function
published function OnDblClick(Sender)
IDE_DispatchCommand( 108 )
end function
private function OnLButtonDown(Sender,X,Y)
d = UnitAtCursor( Rect1 )
if d &lt;&gt; 0 then
  n = Group1.FindUnit( d )
  if n &gt; -1 then
    TabIndex = n + FFirstCol
    Reset()
  end if
end if
end function
published function OnRButtonDown(Sender,X,Y)
n = TabSet1.ItemAtCursor()
if n &gt; -1 then
  TabSet1.TabIndex = n
end if
doc = Create( Handle, &quot;popupmenu5.tbl&quot;, true, false )
p = Point( X, Y )
Sender.ViewToClient( p )
ClientToScreen( p )
ret = doc.Popup( p.x, p.y )
doc.Free()
if ret = 1 then
  IDE_DispatchCommand( 104 )
else if ret = 2 then
  IDE_DispatchCommand( 108 )
end if
end function
private function OnResize(Sender)
Rect1.SetBounds( Left, Top, Width, Height )
Reset()
end function
published function OnTabChanged(Sender)
if Sender.TabIndex &gt;= 0 then
  IDE_SetActiveChild( ar[Sender.TabIndex] )
end if
end function
private function Reset()
while Group1.UnitCount &gt; 0
  DeleteUnit( Group1.Units[0] )
wend
i = FFirstCol
x = Left
d = Element1
if i &lt; ar.Count then
  d.Caption = ar[i]
end if
while ( i &lt; ar.Count ) and ( x + d.Width &lt;= Left + Width )
  d = CopyUnit( element1 )
  d.Visible = true
  d.Caption = ar[i]
  d.Left = x
  d.Layer = 1
  d.Selected = false
  d.SendToBack( true )
  Group1.Add( d )
  x = x + d.Width - 4
  i = i + 1
  if i &lt; ar.Count then
    d = Element1
    d.Caption = ar[i]
  end if
wend
UpBtn.Left = Rect1.Left + Rect1.Width - DownBtn.Width - UpBtn.Width - 1
DownBtn.Left = Rect1.Left + Rect1.Width - DownBtn.Width
if ( FFirstCol &gt; 0 ) or ( i &lt; ar.Count ) then
  UpBtn.Visible = true
  DownBtn.Visible = true
  i = Group1.UnitCount - 1
  while i &gt;= 0
    d = Group1.Units[i]
    if d.Left + d.Width &gt; UpBtn.Left then
      DeleteUnit( d )
    else
      break
    end if
    i = i - 1
  wend
else
  UpBtn.Visible = false
  DownBtn.Visible = false
end if
if ( FTabIndex - FFirstCol &gt;= 0 ) and ( FTabIndex - FFirstCol &lt; Group1.UnitCount ) then
  d = Group1.Units[FTabIndex-FFirstCol]
  d.Selected = true
  d.BringToFront( true )
end if
Refresh()
end function
public function ScrollTo(ATabIndex)
SetTabIndex( ATabIndex )
if ATabIndex &lt; FFirstCol then
  SetFirstCol( ATabIndex )
else if ATabIndex &gt;= FFirstCol + Group1.UnitCount then
  SetFirstCol( ATabIndex )
end if
end function
private function SetFirstCol(AValue)
if AValue &gt;= 0 and AValue &lt; ar.Count
  FFirstCol = AValue
  Reset()
end if
end function
private function SetTabIndex(AValue)
if AValue &gt;= -1 and AValue &lt; ar.Count then
  FTabIndex = AValue
  Reset()
  if FTabIndex &lt; FFirstCol then
    FirstCol = FTabIndex
  else if FTabIndex - FFirstCol &gt;= Group1.UnitCount then
    FirstCol = FTabIndex
  end if
  OnTabChanged( this )
end if
end function
public function SetTabName(AIndex,AValue)
ar[AIndex] = AValue
if FUpdate then
  Reset()
end if
end function
property TabIndex read FTabIndex write SetTabIndex
</programe>
</element>
<CheckButton name="btnClose" bounds="576,0,592,16" origin="606.5,7.5">
<杈规

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -