$dockpanels » History » Version 17
Per Amundsen, 02/16/2023 09:29 PM
| 1 | 1 | Per Amundsen | _Added in 1.9.4_ |
|---|---|---|---|
| 2 | |||
| 3 | *$dockpanels* |
||
| 4 | |||
| 5 | 14 | Per Amundsen | Returns [[$true]] if any Monitor Panels is visible except pinned Monitor Panels, otherwise [[$false]]. |
| 6 | 1 | Per Amundsen | |
| 7 | 13 | Per Amundsen | _See also [[Monitor Panels]], [[/dock]]._ |
| 8 | 1 | Per Amundsen | |
| 9 | 16 | Per Amundsen | ------------------------------ |
| 10 | |||
| 11 | 15 | Per Amundsen | *$dockpanels(name|@window|dialog id)* |
| 12 | 1 | Per Amundsen | |
| 13 | 5 | Per Amundsen | Returns [[$true]] if named dockpanel is visible, otherwise [[$false]]. |
| 14 | 1 | Per Amundsen | |
| 15 | *Parameters* |
||
| 16 | |||
| 17 | 17 | Per Amundsen | table(ktable). |
| 18 | |*Parameter*|*Description*| |
||
| 19 | | name<notextile>|</notextile>@window<notextile>|</notextile>dialog id | The panel name, @window or dialog id to check. (Server, Channel, Private, Url, Notify, Dcc, Highlight, Nicklist or Treebar) | |
||
| 20 | 1 | Per Amundsen | |
| 21 | *Properties* |
||
| 22 | |||
| 23 | 17 | Per Amundsen | table(ktable). |
| 24 | |*Property*|*Description*| |
||
| 25 | | .side | Returns the docked panel side. (left/right/top/bottom) | |
||
| 26 | | .container | Returns the container position for the panel. | |
||
| 27 | | .panel | Returns the panel position. | |
||
| 28 | | .tab | Returns the tab position for the panel. | |
||
| 29 | | .name | Returns the name of the window/docked panel. | |
||
| 30 | | .locked | Returns [[$true]] if the docked panel is locked, otherwise [[$false]]. | |
||
| 31 | | .pinned | Returns [[$true]] if the docked panel is pinned, otherwise [[$false]]. | |
||
| 32 | | .visible | Returns [[$true]] if the docked panel is visible, otherwise [[$false]]. | |
||
| 33 | | .w | Returns the docked panel width. | |
||
| 34 | | .h | Returns the docked panel height. | |
||
| 35 | | .wid | Returns the window id of the panel if any. | |
||
| 36 | 4 | Per Amundsen | |
| 37 | *Example* |
||
| 38 | |||
| 39 | <pre> |
||
| 40 | ; Display information about the highlight panels. |
||
| 41 | //echo -ag Higlight is $iif($dockpanels(Highlight), Visible, Hidden) |
||
| 42 | |||
| 43 | 1 | Per Amundsen | ; Hide the highlights dockpanel if it's in a window. |
| 44 | //window -h @ $+ $dockpanels(Highlight).wid |
||
| 45 | </pre> |
||
| 46 | |||
| 47 | ------------------------------ |
||
| 48 | |||
| 49 | _Added in 4.3_ |
||
| 50 | |||
| 51 | *$dockpanels(side, [container], [panel], [tab])* |
||
| 52 | |||
| 53 | Returns the number of containers/panels/tabs docked in [[Monitor Panels]] or information about docked panels/windows. |
||
| 54 | 9 | Per Amundsen | |
| 55 | _See also [[Monitor Panels]], [[/dock]]._ |
||
| 56 | |||
| 57 | *Parameters* |
||
| 58 | |||
| 59 | 17 | Per Amundsen | table(ktable). |
| 60 | |*Parameter*|*Description*| |
||
| 61 | | side | The dock side to list. (left/right/top/bottom) | |
||
| 62 | | [container] | If N = 0, number of containers, otherwise the Nth container to list. | |
||
| 63 | | [panel] | If N = 0, number of panels, otherwise the Nth panel to list. | |
||
| 64 | | [tab] | If N = 0, number of tabs, otherwise the Nth tab to list. | |
||
| 65 | 9 | Per Amundsen | |
| 66 | *Properties* |
||
| 67 | |||
| 68 | 17 | Per Amundsen | table(ktable). |
| 69 | |*Property*|*Description*| |
||
| 70 | | .side | Returns the docked panel side. (left/right/top/bottom) | |
||
| 71 | | .container | Returns the container position for the panel. | |
||
| 72 | | .panel | Returns the panel position. | |
||
| 73 | | .tab | Returns the tab position for the panel. | |
||
| 74 | | .name | Returns the name of the window/docked panel. | |
||
| 75 | | .locked | Returns [[$true]] if the docked panel is locked, otherwise [[$false]]. | |
||
| 76 | | .pinned | Returns [[$true]] if the docked panel is pinned, otherwise [[$false]]. | |
||
| 77 | | .visible | Returns [[$true]] if the docked panel is visible, otherwise [[$false]]. | |
||
| 78 | | .w | Returns the docked panel width. | |
||
| 79 | | .h | Returns the docked panel height. | |
||
| 80 | 9 | Per Amundsen | |
| 81 | 11 | Per Amundsen | *Example* |
| 82 | |||
| 83 | <pre> |
||
| 84 | alias listdocks { |
||
| 85 | echo -ag Number of containers on the bottom = $dockpanels(bottom, 0) |
||
| 86 | |||
| 87 | var %c 0 |
||
| 88 | while (%c < $dockpanels(right, 0)) { |
||
| 89 | inc %c |
||
| 90 | |||
| 91 | echo -ag Number of panels in container %c is $dockpanels(bottom, %c, 0) |
||
| 92 | |||
| 93 | var %p 0 |
||
| 94 | while (%p < $dockpanels(bottom, %c, 0)) { |
||
| 95 | inc %p |
||
| 96 | |||
| 97 | echo -ag Number of tabs in panel %p = $dockpanels(bottom, %c, %p, 0) |
||
| 98 | |||
| 99 | var %t 0 |
||
| 100 | while (%t < $dockpanels(bottom, %c, %p, 0)) { |
||
| 101 | inc %t |
||
| 102 | echo -ag Tab %t is $dockpanels(bottom, %c, %p, %t) |
||
| 103 | } |
||
| 104 | 4 | Per Amundsen | } |
| 105 | 1 | Per Amundsen | } |
| 106 | } |
||
| 107 | </pre> |