summaryrefslogtreecommitdiff
path: root/fitz/fitz.h
diff options
context:
space:
mode:
authorPaul Gardiner <paul@glidos.net>2012-07-16 14:30:56 +0100
committerPaul Gardiner <paul@glidos.net>2012-07-17 12:57:41 +0100
commit0b0180f24fc44b4acf88f950a84d953fb7ca17b7 (patch)
treebe848903131cdf9ebcba2477b160fa6411a46454 /fitz/fitz.h
parent4387a60412b2c24f6961d0e3cc45ed97c7f05d5a (diff)
downloadmupdf-0b0180f24fc44b4acf88f950a84d953fb7ca17b7.tar.xz
Forms: implement library api for handling list boxes and combo boxes
Diffstat (limited to 'fitz/fitz.h')
-rw-r--r--fitz/fitz.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h
index 24b7f1da..fa07360b 100644
--- a/fitz/fitz.h
+++ b/fitz/fitz.h
@@ -2494,6 +2494,35 @@ int fz_widget_text_get_content_type(fz_interactive *idoc, fz_widget *tw);
*/
void fz_widget_text_set_text(fz_interactive *idoc, fz_widget *tw, char *text);
+/*
+ fz_widget_choice_get_options: get the list of options for a list
+ box or combo box. Returns the number of options and fills in their
+ names within the supplied array. Should first be called with a
+ NULL array to find out how big the array should be.
+*/
+int fz_widget_choice_get_options(fz_interactive *idoc, fz_widget *tw, char *opts[]);
+
+/*
+ fz_widget_choice_is_multiselect: returns whether a list box or
+ combo box supports selection of multiple options
+*/
+int fz_widget_choice_is_multiselect(fz_interactive *idoc, fz_widget *tw);
+
+/*
+ fz_widget_choice_get_value: get the value of a choice widget.
+ Returns the number of options curently selected and fills in
+ the supplied array with their strings. Should first be called
+ with NULL as the array to find out how big the arrray need to
+ be. The filled in elements should not be freed by the caller.
+*/
+int fz_widget_choice_get_value(fz_interactive *idoc, fz_widget *tw, char *opts[]);
+
+/*
+ fz_widget_set_value: set the value of a choice widget. The
+ caller should pass the number of options selected and an
+ array of their names
+*/
+void fz_widget_choice_set_value(fz_interactive *idoc, fz_widget *tw, int n, char *opts[]);
typedef struct fz_write_options_s fz_write_options;