-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get choices working in the file choosers
- Loading branch information
Showing
3 changed files
with
54 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package filechooser | ||
|
||
// ComboBox represents a serialized combo box that can be added to the dialog. | ||
// None of the strings, except for the initial selection, should be empty. | ||
// As a special case, passing an empty array for the list of choices indicates | ||
// a boolean choice that is typically displayed as a check button, using “true” and “false” as the choices. | ||
type ComboBox struct { | ||
ID string // An ID that will be returned with the response. | ||
Label string // A user-visible label. | ||
Choices []Choice // The list of choices. | ||
InitialSelection string // Default selection of choice. Leave empty to let the portal decide. | ||
} | ||
|
||
// Choice represent a choice that can be made in a ComboBox. | ||
type Choice struct { | ||
ID string // An ID that will be returned with the response. | ||
Label string // A user-visible label. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters