-
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2dfbc4e
commit 527ae27
Showing
3 changed files
with
67 additions
and
1 deletion.
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
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,64 @@ | ||
% notcurses_multiselector(3) | ||
% nick black <nickblack@linux.com> | ||
% v1.2.3 | ||
|
||
# NAME | ||
|
||
notcurses_multiselector - high level widget for selecting from a set | ||
|
||
# SYNOPSIS | ||
|
||
**#include <notcurses.h>** | ||
|
||
```c | ||
**struct ncinput;** | ||
**struct ncplane;** | ||
**struct notcurses;** | ||
**struct ncmultiselector;** | ||
|
||
struct mselector_item { | ||
char* option; | ||
char* desc; | ||
bool selected; | ||
}; | ||
|
||
typedef struct multiselector_options { | ||
char* title; // title may be NULL, inhibiting riser | ||
char* secondary; // secondary may be NULL | ||
char* footer; // footer may be NULL | ||
struct mselector_item* items; // initial items, statuses | ||
unsigned itemcount; // number of initial items | ||
// default item (selected at start) | ||
unsigned defidx; | ||
// maximum number of options to display at once | ||
unsigned maxdisplay; | ||
// exhaustive styling options | ||
uint64_t opchannels; // option channels | ||
uint64_t descchannels; // description channels | ||
uint64_t titlechannels;// title channels | ||
uint64_t footchannels; // secondary and footer channels | ||
uint64_t boxchannels; // border channels | ||
uint64_t bgchannels; // background channels for body | ||
} multiselector_options; | ||
``` | ||
|
||
**struct ncmultiselector* ncmultiselector_create(struct ncplane* n, int y, int x, const multiselector_options* opts);** | ||
|
||
**struct ncplane* ncmultiselector_plane(struct ncmultiselector* n);** | ||
|
||
**bool ncmultiselector_offer_input(struct ncmultiselector* n, const struct ncinput* nc);** | ||
|
||
**void ncmultiselector_destroy(struct ncmultiselector* n, char** item);** | ||
|
||
# DESCRIPTION | ||
|
||
# NOTES | ||
|
||
# RETURN VALUES | ||
|
||
# SEE ALSO | ||
|
||
**notcurses(3)**, | ||
**notcurses_input(3)**, | ||
**notcurses_ncplane(3)** | ||
**notcurses_selector(3)** |
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