List box implementation

This commit is contained in:
Jakub Melka
2020-05-16 17:34:23 +02:00
parent 0f4eeeacb7
commit a51aae3836
7 changed files with 1206 additions and 343 deletions

View File

@ -27,6 +27,8 @@ class QPdfWriter;
namespace pdf
{
using PDFIntegerVector = std::vector<PDFInteger>;
struct WrapName
{
WrapName(const char* name) :
@ -928,6 +930,20 @@ public:
void setDocumentTitle(QString title);
/// Sets form field list box indices.
/// \param formField Form field
/// \param indices Sorted list of selected indices
void setFormFieldChoiceIndices(PDFObjectReference formField,
PDFIntegerVector indices);
/// Sets form field list box top index. Top index is zero-based index of first item visible in the list box.
/// \param formField Form field
/// \param topIndex Zero-based index of first visible item
void setFormFieldChoiceTopIndex(PDFObjectReference formField,
PDFInteger topIndex);
/// Sets form field value. Value must be correct for this form field, no checking is performed. Also, if
/// you use this function, annotation widgets, which are attached to this form field, should also be
/// updated (for example, appearance state and sometimes appearance streams).