Skip to content

Commit 150635c

Browse files
author
pinnacle-comp
committed
1 parent 398cada commit 150635c

3 files changed

Lines changed: 128 additions & 0 deletions

File tree

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
outline: [2, 3]
3+
---
4+
5+
# Class `pinnacle.snowcap.integration.FocusBorder` : <code>snowcap.widget.Program</code>
6+
7+
8+
A border that shows window focus, with an optional titlebar.
9+
10+
## Fields
11+
12+
### window
13+
14+
`window`: <code><a href="/lua-reference/main/classes/pinnacle.window.WindowHandle">pinnacle.window.WindowHandle</a></code>
15+
16+
The window this border is decorating.
17+
18+
### thickness
19+
20+
`thickness`: <code>integer</code>
21+
22+
The thickness of the border, in pixels.
23+
24+
### focused_color
25+
26+
`focused_color`: <code>snowcap.widget.Color</code>
27+
28+
The color of the border when it's focused.
29+
30+
### unfocused_color
31+
32+
`unfocused_color`: <code>snowcap.widget.Color</code>
33+
34+
The color of the border when it's unfocused.
35+
36+
### focused
37+
38+
`focused`: <code>boolean</code>
39+
40+
Whether the window this border surrounds is focused.
41+
42+
### include_titlebar
43+
44+
`include_titlebar`: <code>boolean</code>
45+
46+
Whether to draw a titlebar
47+
48+
### title
49+
50+
`title`: <code>string</code>
51+
52+
The title of the window.
53+
54+
### titlebar_height
55+
56+
`titlebar_height`: <code>integer</code>
57+
58+
The height of the titlebar
59+
60+
61+
## Functions
62+
63+
### <Badge type="method" text="method" /> decorate
64+
65+
<div class="language-lua"><pre><code>function pinnacle.snowcap.integration.FocusBorder:decorate()
66+
-> snowcap.decoration.DecorationHandle | nil</code></pre></div>
67+
68+
Decorates the window with this focus border.
69+
70+
71+
72+
73+
#### Returns
74+
75+
1. <code>snowcap.decoration.DecorationHandle | nil</code>
76+
77+
78+

main/classes/pinnacle.snowcap.integration.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,47 @@ Some of its characteristics can be changed by altering its fields.
4848

4949

5050

51+
52+
### <Badge type="function" text="function" /> focus_border
53+
54+
<div class="language-lua"><pre><code>function pinnacle.snowcap.integration.focus_border(window: <a href="/lua-reference/main/classes/pinnacle.window.WindowHandle">pinnacle.window.WindowHandle</a>)
55+
-> <a href="/lua-reference/main/classes/pinnacle.snowcap.integration.FocusBorder">pinnacle.snowcap.integration.FocusBorder</a></code></pre></div>
56+
57+
Creates the default focus border without a titlebar.
58+
59+
60+
61+
#### Parameters
62+
63+
`window`: <code><a href="/lua-reference/main/classes/pinnacle.window.WindowHandle">pinnacle.window.WindowHandle</a></code>
64+
65+
66+
67+
#### Returns
68+
69+
1. <code><a href="/lua-reference/main/classes/pinnacle.snowcap.integration.FocusBorder">pinnacle.snowcap.integration.FocusBorder</a></code>
70+
71+
72+
73+
74+
### <Badge type="function" text="function" /> focus_border_with_titlebar
75+
76+
<div class="language-lua"><pre><code>function pinnacle.snowcap.integration.focus_border_with_titlebar(window: <a href="/lua-reference/main/classes/pinnacle.window.WindowHandle">pinnacle.window.WindowHandle</a>)
77+
-> <a href="/lua-reference/main/classes/pinnacle.snowcap.integration.FocusBorder">pinnacle.snowcap.integration.FocusBorder</a></code></pre></div>
78+
79+
Creates the default focus border with a titlebar.
80+
81+
82+
83+
#### Parameters
84+
85+
`window`: <code><a href="/lua-reference/main/classes/pinnacle.window.WindowHandle">pinnacle.window.WindowHandle</a></code>
86+
87+
88+
89+
#### Returns
90+
91+
1. <code><a href="/lua-reference/main/classes/pinnacle.snowcap.integration.FocusBorder">pinnacle.snowcap.integration.FocusBorder</a></code>
92+
93+
94+

main/classes/pinnacle.window.WindowSignal.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,10 @@ The pointer left a window.
2727

2828
The window got keyboard focus.
2929

30+
### title_changed <Badge type="danger" text="nullable" />
31+
32+
`title_changed?`: <code>fun(window: <a href="/lua-reference/main/classes/pinnacle.window.WindowHandle">pinnacle.window.WindowHandle</a>, title: string)</code>
33+
34+
A window's title changed.
35+
3036

0 commit comments

Comments
 (0)