@gjsify/adwaita-core 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/accent.js +1 -0
- package/lib/esm/conformance/accent.js +1 -0
- package/lib/esm/conformance/index.js +1 -1
- package/lib/esm/conformance/shortcut-label.js +1 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/shortcut-label.js +1 -0
- package/lib/types/about-dialog.d.ts +92 -98
- package/lib/types/accent.d.ts +36 -0
- package/lib/types/accent.spec.d.ts +2 -0
- package/lib/types/action-row.d.ts +95 -125
- package/lib/types/avatar.d.ts +30 -37
- package/lib/types/banner.d.ts +25 -53
- package/lib/types/breakpoint.d.ts +6 -7
- package/lib/types/button-content.d.ts +41 -80
- package/lib/types/carousel.d.ts +175 -252
- package/lib/types/checks.d.ts +13 -30
- package/lib/types/chrome.d.ts +90 -136
- package/lib/types/color-scheme.d.ts +5 -6
- package/lib/types/conformance/about-dialog.d.ts +64 -91
- package/lib/types/conformance/accent.d.ts +20 -0
- package/lib/types/conformance/action-row.d.ts +26 -46
- package/lib/types/conformance/avatar.d.ts +8 -10
- package/lib/types/conformance/banner.d.ts +17 -37
- package/lib/types/conformance/button-content.d.ts +24 -46
- package/lib/types/conformance/carousel.d.ts +35 -75
- package/lib/types/conformance/checks.d.ts +0 -4
- package/lib/types/conformance/chrome.d.ts +28 -36
- package/lib/types/conformance/data-grid.d.ts +28 -47
- package/lib/types/conformance/dialog.d.ts +4 -9
- package/lib/types/conformance/entry-row.d.ts +20 -39
- package/lib/types/conformance/index.d.ts +4 -0
- package/lib/types/conformance/navigation-view.d.ts +0 -4
- package/lib/types/conformance/popover.d.ts +4 -9
- package/lib/types/conformance/preferences.d.ts +15 -28
- package/lib/types/conformance/rows.d.ts +5 -12
- package/lib/types/conformance/shortcut-label.d.ts +34 -0
- package/lib/types/conformance/sidebar.d.ts +28 -49
- package/lib/types/conformance/spinner.d.ts +21 -27
- package/lib/types/conformance/split-button.d.ts +21 -43
- package/lib/types/conformance/split-view.d.ts +29 -36
- package/lib/types/conformance/tab-view.d.ts +32 -73
- package/lib/types/conformance/view-stack.d.ts +0 -12
- package/lib/types/conformance/view-switcher.d.ts +46 -114
- package/lib/types/conformance/wrap-box.d.ts +40 -63
- package/lib/types/data-grid.d.ts +38 -48
- package/lib/types/dialog.d.ts +39 -51
- package/lib/types/easing.d.ts +6 -12
- package/lib/types/entry-row.d.ts +94 -123
- package/lib/types/glib.d.ts +17 -25
- package/lib/types/index.d.ts +4 -0
- package/lib/types/length-unit.d.ts +7 -12
- package/lib/types/navigation-view.d.ts +62 -68
- package/lib/types/popover.d.ts +39 -66
- package/lib/types/preferences.d.ts +83 -100
- package/lib/types/rows.d.ts +45 -63
- package/lib/types/shortcut-label.d.ts +79 -0
- package/lib/types/shortcut-label.spec.d.ts +2 -0
- package/lib/types/sidebar.d.ts +95 -121
- package/lib/types/spinner.d.ts +39 -61
- package/lib/types/split-button.d.ts +78 -134
- package/lib/types/split-view.d.ts +74 -89
- package/lib/types/tab-view.d.ts +174 -256
- package/lib/types/view-stack.d.ts +87 -129
- package/lib/types/view-switcher.d.ts +126 -211
- package/lib/types/wrap-box.d.ts +62 -123
- package/package.json +3 -3
|
@@ -1,42 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The four mutually exclusive content slots of the action half. `'empty'` is the
|
|
3
|
-
* initial state — `label`, `icon-name` and `child` are all `NULL
|
|
4
|
-
* (adw-split-button.c:311-352).
|
|
3
|
+
* initial state — `label`, `icon-name` and `child` are all `NULL`.
|
|
5
4
|
*/
|
|
6
5
|
export type SplitButtonContentMode = 'empty' | 'label' | 'icon' | 'child';
|
|
7
|
-
/** `GtkArrowType` as a string union. Default `'down'
|
|
6
|
+
/** `GtkArrowType` as a string union. Default `'down'`. */
|
|
8
7
|
export type SplitButtonDirection = 'none' | 'up' | 'down' | 'left' | 'right';
|
|
9
8
|
/**
|
|
10
|
-
* Every symbolic icon an `arrow` node can be given `-gtk-icon-source` for
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* `Adwaita` release that introduces a sixth glyph breaks the renderers at COMPILE
|
|
15
|
-
* time instead of painting a blank arrow at runtime.
|
|
9
|
+
* Every symbolic icon an `arrow` node can be given `-gtk-icon-source` for. A union rather
|
|
10
|
+
* than `string` so a renderer's glyph→asset table is TOTAL: an Adwaita release that adds a
|
|
11
|
+
* sixth glyph breaks the renderers at COMPILE time instead of painting a blank arrow at
|
|
12
|
+
* runtime.
|
|
16
13
|
*/
|
|
17
14
|
export type AdwArrowIcon = 'open-menu-symbolic' | 'pan-down-symbolic' | 'pan-up-symbolic' | 'pan-start-symbolic' | 'pan-end-symbolic';
|
|
18
15
|
/** A root style class `update_style_classes` puts on the `splitbutton` node. */
|
|
19
16
|
export type SplitButtonStyleClass = 'image-button' | 'text-button';
|
|
20
17
|
/**
|
|
21
|
-
* The GObject property names this widget notifies
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* emits SEVERAL notifications inside a single freeze/thaw
|
|
26
|
-
* (adw-split-button.c:671-681), and that sequence cannot be reconstructed from
|
|
27
|
-
* the final state alone.
|
|
28
|
-
*
|
|
29
|
-
* `can-shrink` is deliberately absent — see the module note on deferred scope.
|
|
18
|
+
* The GObject property names this widget notifies, carried in
|
|
19
|
+
* {@link SplitButtonChange.notified} so a renderer can re-emit `notify::*` with the same
|
|
20
|
+
* sequence the upstream suite asserts: one mutation emits SEVERAL notifications inside a
|
|
21
|
+
* single freeze/thaw, and that sequence cannot be reconstructed from the final state alone.
|
|
30
22
|
*/
|
|
31
23
|
export type SplitButtonProperty = 'label' | 'icon-name' | 'child' | 'use-underline' | 'menu-model' | 'popover' | 'direction' | 'dropdown-tooltip';
|
|
32
24
|
/**
|
|
33
25
|
* One `GMenuModel` item: a label plus the detailed action it invokes, i.e. what
|
|
34
|
-
* `Gio.Menu.append (label, action)` produces
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* all four menu call sites in the workspace can converge on ONE type. The name
|
|
38
|
-
* is family-neutral on purpose: `Adw.MenuButton` needs exactly this and must be
|
|
39
|
-
* able to adopt it without a rename.
|
|
26
|
+
* `Gio.Menu.append (label, action)` produces. `id` and `icon` are the renderers'
|
|
27
|
+
* menu-button extras, so every menu call site can converge on ONE type; the name is
|
|
28
|
+
* family-neutral because `Adw.MenuButton` needs exactly this.
|
|
40
29
|
*/
|
|
41
30
|
export interface AdwMenuEntry {
|
|
42
31
|
/** Display label. */
|
|
@@ -80,29 +69,23 @@ export interface SplitButtonHalfState {
|
|
|
80
69
|
/** The `keyboard-activating` CSS class GTK sets during a keyboard press. */
|
|
81
70
|
keyboardActivating: boolean;
|
|
82
71
|
}
|
|
83
|
-
/** The translatable default dropdown tooltip
|
|
72
|
+
/** The translatable default dropdown tooltip. */
|
|
84
73
|
export declare const DEFAULT_DROPDOWN_TOOLTIP = "More Options";
|
|
85
74
|
/** Adwaita's `--disabled-opacity`, for renderers that dim rather than desaturate. */
|
|
86
75
|
export declare const SPLIT_BUTTON_DISABLED_OPACITY = 0.5;
|
|
87
76
|
/**
|
|
88
|
-
* `update_style_classes` as a pure function
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* `get_icon_name()` is `NULL` — yet `label[0]` is NUL, so it carries no
|
|
93
|
-
* `text-button` class. `' '` does carry it, and renders two spaces: nothing in
|
|
94
|
-
* the C path trims.
|
|
77
|
+
* `update_style_classes` as a pure function. Both branches test the FIRST CHARACTER, not
|
|
78
|
+
* truthiness: `''` is a perfectly good label — non-`NULL`, so `get_label()` returns it and
|
|
79
|
+
* `get_icon_name()` is `NULL` — yet `label[0]` is NUL, so it carries no `text-button`
|
|
80
|
+
* class. `' '` does carry it and renders two spaces; nothing in the C path trims.
|
|
95
81
|
*/
|
|
96
82
|
export declare function splitButtonStyleClasses(label: string | null, iconName: string | null): readonly SplitButtonStyleClass[];
|
|
97
83
|
/**
|
|
98
|
-
* The dropdown tooltip to actually show, and whether it is markup
|
|
99
|
-
* (adw-split-button.c:1044-1051).
|
|
100
|
-
*
|
|
84
|
+
* The dropdown tooltip to actually show, and whether it is markup.
|
|
101
85
|
* `has_dropdown_tooltip = tooltip && *tooltip` — a non-empty value goes through
|
|
102
|
-
* `gtk_widget_set_tooltip_markup` (Pango markup), an empty one restores the
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* the default branch, is a different widget.
|
|
86
|
+
* `gtk_widget_set_tooltip_markup` (Pango markup), an empty one restores the translated
|
|
87
|
+
* default as plain TEXT. Not cosmetic: a renderer that escapes the markup branch, or
|
|
88
|
+
* leaves the accessible name empty on the default branch, is a different widget.
|
|
106
89
|
*/
|
|
107
90
|
export declare function resolveDropdownTooltip(tooltip: string): {
|
|
108
91
|
text: string;
|
|
@@ -110,71 +93,53 @@ export declare function resolveDropdownTooltip(tooltip: string): {
|
|
|
110
93
|
};
|
|
111
94
|
/**
|
|
112
95
|
* The arrow glyph a PLAIN `menubutton` draws for a direction — `none` is the
|
|
113
|
-
* `open-menu-symbolic` hamburger
|
|
114
|
-
*
|
|
115
|
-
* Use {@link splitButtonArrowIcon} for the dropdown half of a split button, which
|
|
116
|
-
* the stylesheet gives a different `none`.
|
|
96
|
+
* `open-menu-symbolic` hamburger. Use {@link splitButtonArrowIcon} for the dropdown half
|
|
97
|
+
* of a split button, which the stylesheet gives a different `none`.
|
|
117
98
|
*/
|
|
118
99
|
export declare function menuButtonArrowIcon(direction: SplitButtonDirection): AdwArrowIcon;
|
|
119
100
|
/**
|
|
120
|
-
* The arrow glyph a SPLIT BUTTON's dropdown half draws
|
|
121
|
-
*
|
|
101
|
+
* The arrow glyph a SPLIT BUTTON's dropdown half draws — `none` is `pan-down-symbolic`,
|
|
102
|
+
* per the stylesheet's `splitbutton` override.
|
|
122
103
|
*/
|
|
123
104
|
export declare function splitButtonArrowIcon(direction: SplitButtonDirection): AdwArrowIcon;
|
|
124
105
|
/**
|
|
125
|
-
* Where the popup is placed: `'none'` behaves the same as `'down'
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* it straight back off the same `GtkMenuButton` (:971) — the split button stores
|
|
131
|
-
* nothing and overrides nothing here, so `none → down` is `GtkMenuButton`'s own
|
|
132
|
-
* behaviour. {@link menuButtonPopupDirection} is therefore this very function
|
|
133
|
-
* rather than a second copy of it.
|
|
106
|
+
* Where the popup is placed: `'none'` behaves the same as `'down'`. Placement is NOT a
|
|
107
|
+
* split-button rule, unlike the glyph: `adw_split_button_set_direction` is a pass-through
|
|
108
|
+
* to `gtk_menu_button_set_direction` and the getter reads it straight back off the same
|
|
109
|
+
* `GtkMenuButton`, so `none → down` is `GtkMenuButton`'s own behaviour and
|
|
110
|
+
* {@link menuButtonPopupDirection} is this very function rather than a copy.
|
|
134
111
|
*/
|
|
135
112
|
export declare function splitButtonPopupDirection(direction: SplitButtonDirection): Exclude<SplitButtonDirection, 'none'>;
|
|
136
113
|
/**
|
|
137
114
|
* Where a plain `menubutton` places its popup — deliberately an ALIAS of
|
|
138
|
-
* {@link splitButtonPopupDirection},
|
|
139
|
-
*
|
|
140
|
-
* The two arrow-glyph functions differ because the stylesheet overrides the glyph
|
|
141
|
-
* per widget; placement has no such override, and pinning that as reference
|
|
142
|
-
* equality (`menuButtonPopupDirection === splitButtonPopupDirection`) is a claim a
|
|
143
|
-
* test can hold, where a duplicated body would only be a claim a comment makes.
|
|
115
|
+
* {@link splitButtonPopupDirection}, so that the "placement has no per-widget override"
|
|
116
|
+
* claim is reference equality a test can hold rather than a comment.
|
|
144
117
|
*/
|
|
145
118
|
export declare const menuButtonPopupDirection: typeof splitButtonPopupDirection;
|
|
146
119
|
/** Whether `value` names a `GtkArrowType`, for parsing a renderer attribute. */
|
|
147
120
|
export declare function isSplitButtonDirection(value: unknown): value is SplitButtonDirection;
|
|
148
121
|
/**
|
|
149
|
-
* `update_state` as a pure fold
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* sits on the root: `splitbutton.flat:checked` shades the whole control and
|
|
153
|
-
* hides the separator while the menu is open (_buttons.scss:542-549). Neither
|
|
154
|
-
* renderer folded it, so both showed a per-half highlight only.
|
|
122
|
+
* `update_state` as a pure fold. The two halves are separate widgets, but the state the
|
|
123
|
+
* STYLESHEET keys off sits on the root: `splitbutton.flat:checked` shades the whole control
|
|
124
|
+
* and hides the separator while the menu is open.
|
|
155
125
|
*/
|
|
156
126
|
export declare function splitButtonRootState(action: SplitButtonHalfState, dropdown: SplitButtonHalfState): {
|
|
157
127
|
active: boolean;
|
|
158
128
|
checked: boolean;
|
|
159
129
|
};
|
|
160
130
|
/**
|
|
161
|
-
* Parse a JSON menu attribute into entries.
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
* `label` key all yield `[]` / are dropped — because the input is author-written
|
|
165
|
-
* markup and a typo must not take the widget down with it. Replaces the two
|
|
166
|
-
* byte-identical copies in `adw-split-button.ts` and `adw-menu-button.ts`.
|
|
131
|
+
* Parse a JSON menu attribute into entries. Total by construction — malformed JSON, a
|
|
132
|
+
* non-array root and entries without a `label` key all yield `[]` / are dropped — because
|
|
133
|
+
* the input is author-written markup and a typo must not take the widget down with it.
|
|
167
134
|
*/
|
|
168
135
|
export declare function parseMenuEntries(json: string | null | undefined): AdwMenuEntry[];
|
|
169
136
|
/**
|
|
170
137
|
* The whole `Adw.SplitButton` state machine: content mode, use-underline,
|
|
171
|
-
* menu-model/popover exclusivity, direction, dropdown tooltip and the popup flag.
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* `set_label()` can emit `notify::icon-name`, `notify::child` and `notify::label`
|
|
177
|
-
* in that order and the upstream suite counts them.
|
|
138
|
+
* menu-model/popover exclusivity, direction, dropdown tooltip and the popup flag. Every
|
|
139
|
+
* mutator returns whether it changed anything and notifies only on a real change, like
|
|
140
|
+
* `ComboState`/`SpinState`, plus {@link SplitButtonChange.notified}: an ORDERED property
|
|
141
|
+
* list, because a single `set_label()` can emit `notify::icon-name`, `notify::child` and
|
|
142
|
+
* `notify::label` in that order and the upstream suite counts them.
|
|
178
143
|
*/
|
|
179
144
|
export declare class SplitButtonState {
|
|
180
145
|
private _mode;
|
|
@@ -196,20 +161,16 @@ export declare class SplitButtonState {
|
|
|
196
161
|
/** The label, or `null` unless {@link mode} is `'label'`. */
|
|
197
162
|
get label(): string | null;
|
|
198
163
|
/**
|
|
199
|
-
* Set the label, clearing `icon-name` and `child
|
|
200
|
-
* (
|
|
201
|
-
*
|
|
202
|
-
* A non-string is rejected outright and changes nothing, mirroring
|
|
203
|
-
* `g_return_if_fail (label != NULL)` at :666 — there is no "unset the label"
|
|
204
|
-
* path in C, clearing it is a side effect of setting another slot.
|
|
164
|
+
* Set the label, clearing `icon-name` and `child`. A non-string is rejected outright,
|
|
165
|
+
* mirroring `g_return_if_fail (label != NULL)` — there is no "unset the label" path in
|
|
166
|
+
* C, clearing it is a side effect of setting another slot.
|
|
205
167
|
*/
|
|
206
168
|
setLabel(label: string): boolean;
|
|
207
169
|
/** The icon name, or `null` unless {@link mode} is `'icon'`. */
|
|
208
170
|
get iconName(): string | null;
|
|
209
171
|
/**
|
|
210
|
-
* Set the icon name, clearing `label` and `child
|
|
211
|
-
* (
|
|
212
|
-
* (icon_name != NULL)` at :754.
|
|
172
|
+
* Set the icon name, clearing `label` and `child`. A non-string is rejected —
|
|
173
|
+
* `g_return_if_fail (icon_name != NULL)`.
|
|
213
174
|
*/
|
|
214
175
|
setIconName(iconName: string): boolean;
|
|
215
176
|
/**
|
|
@@ -218,12 +179,9 @@ export declare class SplitButtonState {
|
|
|
218
179
|
*/
|
|
219
180
|
get child(): object | null;
|
|
220
181
|
/**
|
|
221
|
-
* Set (or clear, with `null`) the child, clearing `label` and `icon-name
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
* This is also the only way to reach `'empty'` again from a filled slot, and
|
|
225
|
-
* it is how a renderer expresses "no content" — `setChild(null)` on a fresh
|
|
226
|
-
* state is correctly a no-op (:806-807).
|
|
182
|
+
* Set (or clear, with `null`) the child, clearing `label` and `icon-name`. The only way
|
|
183
|
+
* back to `'empty'` from a filled slot, and how a renderer expresses "no content" —
|
|
184
|
+
* `setChild(null)` on a fresh state is correctly a no-op.
|
|
227
185
|
*/
|
|
228
186
|
setChild(child: object | null | undefined): boolean;
|
|
229
187
|
/** The root style classes for the current content. */
|
|
@@ -231,74 +189,61 @@ export declare class SplitButtonState {
|
|
|
231
189
|
/** Whether an underline in the label marks a mnemonic. */
|
|
232
190
|
get useUnderline(): boolean;
|
|
233
191
|
/**
|
|
234
|
-
* Set the mnemonic flag
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
* Only the PROPERTY lives here. The `_S` → underlined-S derivation belongs to
|
|
239
|
-
* `GtkLabel`, not to this widget or its test — see the module note on
|
|
240
|
-
* deferred scope.
|
|
192
|
+
* Set the mnemonic flag, `!!`-normalised as C does, so a truthy non-boolean stores
|
|
193
|
+
* `true` and a following `setUseUnderline(true)` is correctly a no-op. Only the
|
|
194
|
+
* PROPERTY lives here; the `_S` → underlined-S derivation belongs to `GtkLabel`.
|
|
241
195
|
*/
|
|
242
196
|
setUseUnderline(value: boolean): boolean;
|
|
243
197
|
/** The menu entries, or `null` when no menu model is set. */
|
|
244
198
|
get menuModel(): readonly AdwMenuEntry[] | null;
|
|
245
199
|
/**
|
|
246
|
-
* Set the menu model, dissociating any popover
|
|
247
|
-
*
|
|
200
|
+
* Set the menu model, dissociating any popover and replacing it with the model-derived
|
|
201
|
+
* one.
|
|
248
202
|
*
|
|
249
|
-
* DELIBERATE NORMALISATION: an EMPTY list is stored as "no menu model". C can
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
* insensitive dropdown" (:376-378) hold from a renderer's point of view. The
|
|
255
|
-
* `@gjsify/adwaita-web` bug this kills was a click on a menu-less split
|
|
256
|
-
* button opening an empty, fully styled popover.
|
|
203
|
+
* DELIBERATE NORMALISATION: an EMPTY list is stored as "no menu model". C can hold a
|
|
204
|
+
* non-`NULL` but empty `GMenu`, which leaves the dropdown live and pops up an empty
|
|
205
|
+
* popover — but no renderer can construct that state (one parses a JSON array, another
|
|
206
|
+
* takes a label list), so collapsing the two is what makes "no menu ⇒ insensitive
|
|
207
|
+
* dropdown" hold from a renderer's point of view.
|
|
257
208
|
*/
|
|
258
209
|
setMenuModel(entries: readonly AdwMenuEntry[] | null | undefined): boolean;
|
|
259
210
|
/** The popover: the one the app set, or the model-derived stand-in, or `null`. */
|
|
260
211
|
get popover(): object | null;
|
|
261
212
|
/**
|
|
262
|
-
* Set the popover, dissociating any menu model
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
* `set_label`/`set_icon_name`/`set_child` use throughout this widget
|
|
267
|
-
* (:671-681). GtkMenuButton's own internal ordering is not observable from
|
|
268
|
-
* the upstream suite, which only counts per-property notifications.
|
|
213
|
+
* Set the popover, dissociating any menu model. The cleared property is notified before
|
|
214
|
+
* the set one, the order `set_label()`/`set_icon_name`/`set_child` use throughout this
|
|
215
|
+
* widget; GtkMenuButton's own internal ordering is not observable from the upstream
|
|
216
|
+
* suite, which only counts per-property notifications.
|
|
269
217
|
*/
|
|
270
218
|
setPopover(popover: object | null | undefined): boolean;
|
|
271
219
|
/**
|
|
272
|
-
* Whether the dropdown half is live
|
|
273
|
-
*
|
|
274
|
-
* popover (:394-396) — with neither, GtkMenuButton is insensitive.
|
|
220
|
+
* Whether the dropdown half is live: with neither a menu model nor a popover,
|
|
221
|
+
* GtkMenuButton is insensitive.
|
|
275
222
|
*/
|
|
276
223
|
get dropdownEnabled(): boolean;
|
|
277
224
|
/** The direction the popup opens in, and the arrow points. */
|
|
278
225
|
get direction(): SplitButtonDirection;
|
|
279
|
-
/** Set the direction
|
|
226
|
+
/** Set the direction. An unknown value is rejected. */
|
|
280
227
|
setDirection(direction: SplitButtonDirection): boolean;
|
|
281
228
|
/** The arrow glyph for the current direction, with the split button's `none`. */
|
|
282
229
|
get arrowIcon(): AdwArrowIcon;
|
|
283
230
|
/**
|
|
284
|
-
* The dropdown tooltip as SET — `''` while unset, never `null
|
|
285
|
-
* (adw-split-button.c:1017-1018). Pass it through
|
|
231
|
+
* The dropdown tooltip as SET — `''` while unset, never `null`. Pass it through
|
|
286
232
|
* {@link resolveDropdownTooltip} to get what should actually be shown.
|
|
287
233
|
*/
|
|
288
234
|
get dropdownTooltip(): string;
|
|
289
235
|
/**
|
|
290
|
-
* Set the dropdown tooltip
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
* notify and RESTORES the default rather than blanking the tooltip.
|
|
236
|
+
* Set the dropdown tooltip. C's guard compares against the GETTER, which already reports
|
|
237
|
+
* `''` when unset, so clearing an unset tooltip notifies nothing while clearing a set
|
|
238
|
+
* one notifies and RESTORES the default rather than blanking the tooltip.
|
|
294
239
|
*/
|
|
295
240
|
setDropdownTooltip(tooltip: string): boolean;
|
|
296
241
|
/** Whether the menu is popped up. */
|
|
297
242
|
get open(): boolean;
|
|
298
243
|
private _setOpen;
|
|
299
|
-
/** Pop the menu up programmatically — `adw_split_button_popup
|
|
244
|
+
/** Pop the menu up programmatically — `adw_split_button_popup`. */
|
|
300
245
|
openMenu(): boolean;
|
|
301
|
-
/** Dismiss the menu programmatically — `adw_split_button_popdown
|
|
246
|
+
/** Dismiss the menu programmatically — `adw_split_button_popdown`. */
|
|
302
247
|
closeMenu(): boolean;
|
|
303
248
|
/** The dropdown half was activated by the user; flips the menu open/closed. */
|
|
304
249
|
toggleMenu(): boolean;
|
|
@@ -306,10 +251,9 @@ export declare class SplitButtonState {
|
|
|
306
251
|
* Activate a menu entry BY POSITION and dismiss the menu, returning the entry
|
|
307
252
|
* (or `null` for an out-of-range index).
|
|
308
253
|
*
|
|
309
|
-
* Position is the addressing a `GMenuModel` actually uses — each item carries
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
* identically named entries and cannot tell an entry called `Cancel` from a
|
|
254
|
+
* Position is the addressing a `GMenuModel` actually uses — each item carries its own
|
|
255
|
+
* detailed action. Resolving a choice by LABEL instead silently dispatches the first of
|
|
256
|
+
* two identically named entries and cannot tell an entry called `Cancel` from a
|
|
313
257
|
* dismissed sheet.
|
|
314
258
|
*/
|
|
315
259
|
activateMenuEntry(index: number): AdwMenuEntry | null;
|