开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
devel
分支 (25)
devel
spiderbasic-3.10
v6.21
v6.20
spiderbasic-3.02
qt
v6.12
spiderbasic-3.01
enablejs-ignore-formatting
master
spiderbasic-3.00
webview-tool
v6.11
v6.10
v6.04
spiderbasic-2.51
v6.03
editor-fix-3
editor-slow-fix2
editor-slow-fix
devel
分支 (25)
devel
spiderbasic-3.10
v6.21
v6.20
spiderbasic-3.02
qt
v6.12
spiderbasic-3.01
enablejs-ignore-formatting
master
spiderbasic-3.00
webview-tool
v6.11
v6.10
v6.04
spiderbasic-2.51
v6.03
editor-fix-3
editor-slow-fix2
editor-slow-fix
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
devel
分支 (25)
devel
spiderbasic-3.10
v6.21
v6.20
spiderbasic-3.02
qt
v6.12
spiderbasic-3.01
enablejs-ignore-formatting
master
spiderbasic-3.00
webview-tool
v6.11
v6.10
v6.04
spiderbasic-2.51
v6.03
editor-fix-3
editor-slow-fix2
editor-slow-fix
purebasic
/
PureBasicIDE
/
ToolsPanel.pb
purebasic
/
PureBasicIDE
/
ToolsPanel.pb
ToolsPanel.pb 19.38 KB
一键复制 编辑 原始数据 按行查看 历史
Timo Harter 提交于 2025年01月17日 18:40 +08:00 . QT Subsystem support (#274)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550
; --------------------------------------------------------------------------------------------
; Copyright (c) Fantaisie Software. All rights reserved.
; Dual licensed under the GPL and Fantaisie Software licenses.
; See LICENSE and LICENSE-FANTAISIE in the project root for license information.
; --------------------------------------------------------------------------------------------
Procedure ActivateTool(Name$)
Opened = 0
If ToolsPanelMode
; try the tools in the panel first
;
ForEach UsedPanelTools()
*PanelToolData.ToolsPanelEntry = UsedPanelTools()
If *PanelToolData\ToolID$ = Name$
SetGadgetState(#GADGET_ToolsPanel, ListIndex(UsedPanelTools()))
CurrentTool = UsedPanelTools()
CurrentTool\ResizeHandler(GetPanelWidth(#GADGET_ToolsPanel), GetPanelHeight(#GADGET_ToolsPanel))
Opened = 1
Break
EndIf
Next UsedPanelTools()
If Opened And ToolsPanelAutoHide And ToolsPanelVisible = 0
If ToolsPanelHideDelay < 2500
ToolsPanelHideTime.q = ElapsedMilliseconds() + 2500 ; stay open for at least 2.5 seconds!
Else
ToolsPanelHideTime.q = ElapsedMilliseconds() + ToolsPanelHideDelay
EndIf
ToolsPanel_Show()
EndIf
EndIf
If Opened = 0
; now try the rest and open in external window
;
ForEach AvailablePanelTools()
If AvailablePanelTools()\ToolID$ = Name$
If AvailablePanelTools()\IsSeparateWindow
SetWindowForeground(AvailablePanelTools()\ToolWindowID)
SetActiveWindow(AvailablePanelTools()\ToolWindowID)
Else
Flags = #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget
If AvailablePanelTools()\ToolWindowX = 0
Flags | #PB_Window_ScreenCentered
EndIf
If AvailablePanelTools()\ExternalPlugin
Title$ = AvailablePanelTools()\PanelTitle$
Else
Title$ = Language("ToolsPanel", AvailablePanelTools()\PanelTitle$)
EndIf
WindowWidth = AvailablePanelTools()\ToolWindowWidth
If WindowWidth < AvailablePanelTools()\ToolMinWindowWidth
WindowWidth = AvailablePanelTools()\ToolMinWindowWidth
EndIf
WindowHeight = AvailablePanelTools()\ToolWindowHeight
If WindowHeight < AvailablePanelTools()\ToolMinWindowHeight
WindowHeight = AvailablePanelTools()\ToolMinWindowHeight
EndIf
Window = OpenWindow(#PB_Any, AvailablePanelTools()\ToolWindowX, AvailablePanelTools()\ToolWindowY, WindowWidth, WindowHeight, Title,ドル Flags)
If Window
EnsureWindowOnDesktop(Window)
WindowBounds(Window, AvailablePanelTools()\ToolMinWindowWidth, AvailablePanelTools()\ToolMinWindowHeight, #PB_Ignore, #PB_Ignore)
AvailablePanelTools()\IsSeparateWindow = 1
AvailablePanelTools()\ToolWindowID = Window
Tool.ToolsPanelInterface = @AvailablePanelTools()
Tool\CreateFunction()
If #DEFAULT_CanWindowStayOnTop
; CompilerIf #CompileWindows
; AvailablePanelTools()\ToolStayOnTop = CheckBoxGadget(#PB_Any, 5, WindowHeight(Window)-23, WindowWidth(Window)-10, 23, Language("Misc","StayOnTop"))
; CompilerElse
; AvailablePanelTools()\ToolStayOnTop = CheckBoxGadget(#PB_Any, 5, WindowHeight(Window)-25, WindowWidth(Window)-10, 25, Language("Misc","StayOnTop"))
; CompilerEndIf
AvailablePanelTools()\ToolStayOnTop = CheckBoxGadget(#PB_Any, 5, WindowHeight(Window)-25, WindowWidth(Window)-10, 25, Language("Misc","StayOnTop"))
Height = GetRequiredHeight(AvailablePanelTools()\ToolStayOnTop)
ResizeGadget(AvailablePanelTools()\ToolStayOnTop, 5, WindowHeight(Window)-Height-5, WindowWidth(Window)-10, Height)
SetGadgetState(AvailablePanelTools()\ToolStayOnTop, AvailablePanelTools()\IsToolStayOnTop)
SetWindowStayOnTop(Window, AvailablePanelTools()\IsToolStayOnTop)
Tool\ResizeHandler(WindowWidth(Window), WindowHeight(Window)-Height-5)
Else
Tool\ResizeHandler(WindowWidth(Window), WindowHeight(Window))
EndIf
EndIf
EndIf
Break
EndIf
Next AvailablePanelTools()
EndIf
EndProcedure
; Creates the "hidden panel" image. This procedure is used on OSX, and as fallback for the other os
;
Procedure ToolsPanel_CreateFake_Default()
CatchImage(#IMAGE_ToolsPanelRight, ?Image_ToolsPanelRight)
CatchImage(#IMAGE_ToolsPanelLeft, ?Image_ToolsPanelLeft)
If ToolsPanelSide = 0
ImageGadget(#GADGET_ToolsPanelFake, 0, 0, 0, 0, ImageID(#IMAGE_ToolsPanelRight))
Else
ImageGadget(#GADGET_ToolsPanelFake, 0, 0, 0, 0, ImageID(#IMAGE_ToolsPanelLeft))
EndIf
ToolsPanelHiddenWidth = 16
EndProcedure
; Special Windows procedure for the vertical.
; Does not work on XP, so windows still needs the default fallback
;
CompilerIf #CompileWindows
Procedure ToolsPanel_CreateFake_Windows()
#TCS_VERTICAL = 80ドル
#TCS_RIGHT = 2ドル
; on windows we have a special replacement for the hidden panel (= vertical tab)
; which does not work on XP.
; Intrestingly, this works ok on vista (though the gadget is displayed without skins there)
If OSVersion() <> #PB_OS_Windows_XP
; this frees the old fake panel created below as well, as it is its child.
;
ContainerGadget(#GADGET_ToolsPanelFake, 0, 0, 0, 0)
CloseGadgetList()
If ToolsPanelSide = 0
style = #TCS_RIGHT
Else
style = 0
EndIf
FakeToolsPanelID = CreateWindowEx_(0, "SysTabControl32", "", #WS_VISIBLE|#WS_OVERLAPPED|#WS_CHILD|#WS_CLIPSIBLINGS|#TCS_MULTILINE|#TCS_VERTICAL|style, 0, 0, 0, 0, GadgetID(#GADGET_ToolsPanelFake), 0, GetModuleHandle_(#Null$) , 0)
If FakeToolsPanelID
; we use MS Sans serif for the vertical panel, as any other try to modify the
; system default font looks ugly.
; all this will not be done on XP anyway (were there is another default font)
;
FontID = FontID(LoadFont(#PB_Any, "MS Sans Serif", 10, #PB_Font_HighQuality))
SendMessage_(FakeToolsPanelID, #WM_SETFONT, FontID, 0)
ForEach UsedPanelTools()
*ToolData.ToolsPanelEntry = UsedPanelTools()
If *ToolData\ExternalPlugin
Text$ = *ToolData\PanelTitle$
Else
Text$ = Language("ToolsPanel", *ToolData\PanelTitle$)
EndIf
panelitem.TC_ITEM\mask = #TCIF_TEXT
panelitem\pszText = @Text$
SendMessage_(FakeToolsPanelID, #TCM_INSERTITEM, ListIndex(UsedPanelTools()), @panelitem)
Next UsedPanelTools()
EndIf
ToolsPanelHiddenWidth = 25 ; width of the vertical panel
Else
; use the fallback procedure on XP
ToolsPanel_CreateFake_Default()
EndIf
EndProcedure
CompilerEndIf
; Special linux procedure for the vertical panel
;
CompilerIf #CompileLinuxGtk
ImportC ""
gtk_label_set_angle_(*Label.GtkWidget, angle.d) As "gtk_label_set_angle" ; Gtk 2.6+
EndImport
Procedure ToolsPanel_CreateFake_Linux(IsUpdate)
PanelGadget(#GADGET_ToolsPanelFake, 0, 0, 0, 0)
; If the gadget is visible (toolspanel update), then we get the same warning as mentioned below
; So just hide it (this is done after creation anyway, so it does not hurt)
If IsUpdate
HideGadget(#GADGET_ToolsPanelFake, 1)
EndIf
ForEach UsedPanelTools()
*ToolData.ToolsPanelEntry = UsedPanelTools()
If *ToolData\ExternalPlugin
AddGadgetItem(#GADGET_ToolsPanelFake, -1, *ToolData\PanelTitle$)
Else
AddGadgetItem(#GADGET_ToolsPanelFake, -1, Language("ToolsPanel", *ToolData\PanelTitle$))
EndIf
; set the needed orientation for the tab label
; Note that the actual label is now inside a container (because of image support)
;
*LabelContainer.GtkWidget = gtk_notebook_get_tab_label_(GadgetID(#GADGET_ToolsPanelFake), gtk_notebook_get_nth_page_(GadgetID(#GADGET_ToolsPanelFake), ListIndex(UsedPanelTools())))
*Children = gtk_container_get_children_(*LabelContainer)
*Label.GtkWidget = g_list_nth_data_(*Children, 1) ; label is the second child (image slot is always present)
g_list_free_(*Children) ; free this list
If ToolsPanelSide = 0
gtk_label_set_angle_(*Label, 270)
Else
gtk_label_set_angle_(*Label, 90)
EndIf
Next UsedPanelTools()
CloseGadgetList()
; make it vertical
;
If ToolsPanelSide = 0
gtk_notebook_set_tab_pos_(GadgetID(#GADGET_ToolsPanelFake), #GTK_POS_RIGHT)
Else
gtk_notebook_set_tab_pos_(GadgetID(#GADGET_ToolsPanelFake), #GTK_POS_LEFT)
EndIf
; Note: ToolsPanelHiddenWidth cannot be set here, as the window is not shown
; yet, and there is no way to calculate the tab height. This variable is set
; in the main source when the PanelTabHeight is calculated as well.
;
; Note: We have to set this to a high enough value for the startup, else we get
; a gtk warning by some theme engine (CRITICAL **: clearlooks_style_draw_box_gap: assertion `width >= -1' failed)
; The real value is set later in PureBasic.pb
;
If IsUpdate = #False
ToolsPanelHiddenWidth = 50
EndIf
EndProcedure
CompilerEndIf
Procedure ToolsPanel_Create(IsUpdate)
UseGadgetList(WindowID(#WINDOW_Main))
; create the gadget that represents the "hidden" panel
;
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows: ToolsPanel_CreateFake_Windows()
CompilerCase #PB_OS_Linux
CompilerIf #CompileLinuxGtk
ToolsPanel_CreateFake_Linux(IsUpdate)
CompilerElse
ToolsPanel_CreateFake_Default()
CompilerEndIf
CompilerCase #PB_OS_MacOS: ToolsPanel_CreateFake_Default() ; use same as windows fallback
CompilerEndSelect
HideGadget(#GADGET_ToolsPanelFake, 1)
If ToolsPanelMode
If IsGadget(#GADGET_ToolsPanel) ; we do not destroy the gadget anymore
OpenGadgetList(#GADGET_ToolsPanel)
Else
PanelGadget(#GADGET_ToolsPanel, 0, 0, 0, 0)
EndIf
ForEach UsedPanelTools()
*ToolData.ToolsPanelEntry = UsedPanelTools()
If *ToolData\ExternalPlugin
AddGadgetItem(#GADGET_ToolsPanel, -1, *ToolData\PanelTitle$)
Else
AddGadgetItem(#GADGET_ToolsPanel, -1, Language("ToolsPanel", *ToolData\PanelTitle$))
EndIf
PanelTool.ToolsPanelInterface = UsedPanelTools()
PanelTool\CreateFunction()
Next UsedPanelTools()
FirstElement(UsedPanelTools()) ; set the current tool.. very important!
CurrentTool = UsedPanelTools()
CloseGadgetList()
CompilerIf #CompileWindows
SetWindowLongPtr_(GadgetID(#GADGET_ToolsPanel), #GWL_STYLE, GetWindowLongPtr_(GadgetID(#GADGET_ToolsPanel), #GWL_STYLE) | #TCS_MULTILINE)
CompilerEndIf
Else
If IsGadget(#GADGET_ToolsPanel) = 0
PanelGadget(#GADGET_ToolsPanel, 0, 0, 0, 0) ; still create the gadget if we do not need a panel
CloseGadgetList()
EndIf
HideGadget(#GADGET_ToolsPanel, 1)
EndIf
EndProcedure
Procedure ToolsPanel_Update()
; because you can also change the order of items in the ToolsPanel completely,
; we destroy the whole ToolsPanel and recreate it.
;
ForEach UsedPanelTools()
*ToolData.ToolsPanelEntry = UsedPanelTools()
If *ToolData\NeedDestroyFunction
PanelTool.ToolsPanelInterface = UsedPanelTools()
PanelTool\DestroyFunction()
EndIf
Next UsedPanelTools()
ClearList(UsedPanelTools())
If IsGadget(#GADGET_ToolsPanel)
ClearGadgetItems(#GADGET_ToolsPanel) ; no more freegadget
EndIf
If ListSize(NewUsedPanelTools()) > 0
ToolsPanelMode = 1
Else
ToolsPanelMode = 0
EndIf
; Close any tools in external tool windows to avoid any conflicts
;
ForEach AvailablePanelTools()
If AvailablePanelTools()\IsSeparateWindow
If AvailablePanelTools()\NeedDestroyFunction
Tool.ToolsPanelInterface = @AvailablePanelTools()
Tool\DestroyFunction()
EndIf
If MemorizeWindow
Window = AvailablePanelTools()\ToolWindowID
AvailablePanelTools()\ToolWindowX = WindowX(Window)
AvailablePanelTools()\ToolWindowY = WindowY(Window)
AvailablePanelTools()\ToolWindowWidth = WindowWidth(Window)
AvailablePanelTools()\ToolWindowHeight = WindowHeight(Window)
EndIf
CloseWindow(AvailablePanelTools()\ToolWindowID)
AvailablePanelTools()\ToolWindowID = -1
AvailablePanelTools()\IsSeparateWindow = 0
EndIf
Next AvailablePanelTools()
; copy the NewUsedPanelTools() to the UsedPanelTools()
;
ForEach NewUsedPanelTools()
AddElement(UsedPanelTools())
UsedPanelTools() = NewUsedPanelTools()
Next NewUsedPanelTools()
; now re-create the whole thing
;
ToolsPanel_Create(#True)
; Swap the gadgets in the splitter if the Toolspanelside changed.
; we need to check which is the toolspanel, as ToolsPanelSide is already updated,
; we cannot use that one to know where the panel is now :)
;
If GadgetType(GetGadgetAttribute(#GADGET_ToolsSplitter, #PB_Splitter_FirstGadget)) = #PB_GadgetType_Panel
OldSide = 1
Else
OldSide = 0
EndIf
If OldSide <> ToolsPanelSide
; create a dummy gadget for the swap
DummyGadget = ContainerGadget(#PB_Any, 0, 0, 0, 0)
CloseGadgetList()
FirstGadget = GetGadgetAttribute(#GADGET_ToolsSplitter, #PB_Splitter_FirstGadget)
SecondGadget = GetGadgetAttribute(#GADGET_ToolsSplitter, #PB_Splitter_SecondGadget)
SetGadgetAttribute(#GADGET_ToolsSplitter, #PB_Splitter_FirstGadget, DummyGadget)
SetGadgetAttribute(#GADGET_ToolsSplitter, #PB_Splitter_SecondGadget, FirstGadget)
SetGadgetAttribute(#GADGET_ToolsSplitter, #PB_Splitter_FirstGadget, SecondGadget)
; reverse the sizes as well
SetGadgetState(#GADGET_ToolsSplitter, GadgetWidth(#GADGET_ToolsSplitter)-GetGadgetState(#GADGET_ToolsSplitter))
FreeGadget(DummyGadget)
EndIf
If ToolsPanelVisible = 0
HideGadget(#GADGET_ToolsPanelFake, 0)
EndIf
If ToolsPanelAutoHide Or ToolsPanelMode = 0 ; hide the panel if we do not need it
ToolsPanel_Hide()
ElseIf ToolsPanelMode
ToolsPanel_Show()
EndIf
; Resize the currently displayed tool
;
If ToolsPanelVisible And CurrentTool
CurrentTool\ResizeHandler(GetPanelWidth(#GADGET_ToolsPanel), GetPanelHeight(#GADGET_ToolsPanel))
EndIf
EndProcedure
; checks the autohide state of the ToolsPanel.
; If ToolsPanelAutoHide is set, the OS specific Event code must ensure that
; this is called either on any mouse movement or in a timer interval
; to ensure correct updates of this
;
Procedure ToolsPanel_CheckAutoHide()
If ToolsPanelAutoHide And ToolsPanelMode
MouseX = WindowMouseX(#WINDOW_Main)
If MouseX <> -1 And WindowMouseY(#WINDOW_Main) <> -1 ; do nothing if mouse is outside of the window
; Convert cursor X position from physical to logical pixels to ensure that scale is
; consistent with editor and tool-panel widths.
; This must be done only after it's determined to be in-frame; unscaling prior will
; result in failure at high scale factors (where -1 becomes 0).
;
CompilerIf #CompileWindows
MouseX = DesktopUnscaledX(MouseX)
CompilerEndIf
If ToolsPanelSide = 0 ; right side
Offset = EditorWindowWidth - MouseX
ToolsPanelWidth = GadgetWidth(#GADGET_ToolsSplitter) - GetGadgetState(#GADGET_ToolsSplitter)
Else
Offset = MouseX
ToolsPanelWidth = GetGadgetState(#GADGET_ToolsSplitter)
EndIf
;Debug "Width: " + Str(ToolsPanelWidth) + ", X: "+Str(Offset)
If ToolsPanelVisible And Offset > ToolsPanelWidth + 40
If ToolsPanelHideTime = 0 ; first time the panel was left
ToolsPanelHideTime.q = ElapsedMilliseconds() + ToolsPanelHideDelay
ElseIf ToolsPanelHideTime < ElapsedMilliseconds() ; the hide timeout has passed
ToolsPanel_Hide()
ToolsPanelHideTime = 0
EndIf
ElseIf ToolsPanelVisible = 0 And Offset < ToolsPanelHiddenWidth
ToolsPanel_Show()
ToolsPanelHideTime = 0
EndIf
EndIf
EndIf
EndProcedure
Procedure ToolsPanel_Hide()
CompilerIf #CompileWindows
If FakeToolsPanelID
SendMessage_(FakeToolsPanelID, #TCM_SETCURSEL, GetGadgetState(#GADGET_ToolsPanel), 0)
EndIf
CompilerEndIf
CompilerIf #CompileLinuxGtk
If GadgetType(#GADGET_ToolsPanelFake) = #PB_GadgetType_Panel ; check if we used the vertical panel
SetGadgetState(#GADGET_ToolsPanelFake, GetGadgetState(#GADGET_ToolsPanel))
EndIf
CompilerEndIf
If ToolsPanelVisible ; no check for ToolsPanelMode here, as we call this to hide the panel when ToolsPanelMode = 0
If ErrorLogVisible
State = GetGadgetState(#GADGET_LogSplitter) ; somehow the reparenting makes the slider jump in the second splitter on linux, so only reset it after ResizeWindow()
EndIf
CompilerIf #CompileWindows
; Temporarily disable painting to avoid flickering while reparenting.
SendMessage_(WindowID(#WINDOW_Main), #WM_SETREDRAW, #False, 0)
CompilerEndIf
If ToolsPanelSide = 0
ToolsPanelWidth_Hidden = GadgetWidth(#GADGET_ToolsSplitter) - GetGadgetState(#GADGET_ToolsSplitter)
SetGadgetAttribute(#GADGET_ToolsSplitter, #PB_Splitter_FirstGadget, #GADGET_ToolsDummy)
Else
ToolsPanelWidth_Hidden = GetGadgetState(#GADGET_ToolsSplitter)
SetGadgetAttribute(#GADGET_ToolsSplitter, #PB_Splitter_SecondGadget, #GADGET_ToolsDummy)
EndIf
ToolsPanelVisible = 0
HideGadget(#GADGET_ToolsPanelFake, 0)
ResizeMainWindow()
CompilerIf #CompileWindows
; Restore painting to have updated visuals reflected.
SendMessage_(WindowID(#WINDOW_Main), #WM_SETREDRAW, #True, 0)
CompilerEndIf
HideGadget(#GADGET_ToolsSplitter, 1)
If ErrorLogVisible
SetGadgetState(#GADGET_LogSplitter, State)
EndIf
EndIf
EndProcedure
Procedure ToolsPanel_Show()
If ToolsPanelVisible = 0 And ToolsPanelMode
If ErrorLogVisible
State = GetGadgetState(#GADGET_LogSplitter) ; somehow the reparenting makes the slider jump in the second splitter on linux, so only reset it after ResizeWindow()
OldGadget = #GADGET_LogSplitter
Else
OldGadget = #GADGET_SourceContainer
EndIf
HideGadget(#GADGET_ToolsSplitter, 0)
If ToolsPanelSide = 0
SetGadgetAttribute(#GADGET_ToolsSplitter, #PB_Splitter_FirstGadget, OldGadget)
Else
SetGadgetAttribute(#GADGET_ToolsSplitter, #PB_Splitter_SecondGadget, OldGadget)
EndIf
ToolsPanelVisible = 1
HideGadget(#GADGET_ToolsPanelFake, 1)
ResizeMainWindow()
; apply the old state again.
If ToolsPanelSide = 0
SetGadgetState(#GADGET_ToolsSplitter, GadgetWidth(#GADGET_ToolsSplitter)-ToolsPanelWidth_Hidden)
Else
SetGadgetState(#GADGET_ToolsSplitter, ToolsPanelWidth_Hidden)
EndIf
If ErrorLogVisible
SetGadgetState(#GADGET_LogSplitter, State)
EndIf
EndIf
EndProcedure
DataSection
Image_ToolsPanelRight:
IncludeBinary "data/ToolsPanelRight.png"
Image_ToolsPanelLeft:
IncludeBinary "data/ToolsPanelLeft.png"
EndDataSection
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

PureBasic是由Fantaisie Software所开发的商用BASIC程序语言及集成开发环境。特点是语法简单直接,不依赖运行时库,因此能编译出相当小巧的程序,包含命令列或GUI执行档、DLL等。而且不使用各系统的API,所以有高度的跨平台特性,支持Windows 32/64位元、Linux 32/64位元、Mac OS X、Amiga。
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/PureBasic/purebasic.git
git@gitee.com:PureBasic/purebasic.git
PureBasic
purebasic
PureBASIC
devel
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /