All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::PDF::Annots::ComboBoxWidget Class Reference

#include <ComboBoxWidget.h>

+ Inheritance diagram for pdftron::PDF::Annots::ComboBoxWidget:

Public Member Functions

 ComboBoxWidget (SDF::Obj d=0)
 
 ComboBoxWidget (const Annot &annot)
 
void AddOption (const UString &value)
 
void AddOptions (const std::vector< UString > &opts)
 
std::vector< UStringGetOptions ()
 
void ReplaceOptions (const std::vector< UString > &new_opts)
 
void SetSelectedOption (const UString &value)
 
UString GetSelectedOption ()
 
void RemoveOption (const UString &value)
 
- Public Member Functions inherited from pdftron::PDF::Annots::Widget
 Widget (SDF::Obj d=0)
 
 Widget (const Annot &ann)
 
Field GetField () const
 
HighlightingMode GetHighlightingMode () const
 
void SetHighlightingMode (HighlightingMode mode=e_invert)
 
Action GetAction () const
 
void SetAction (const Action &action)
 
int GetBorderColorCompNum () const
 
ColorPt GetBorderColor () const
 
void SetBorderColor (const ColorPt &col, int compnum)
 
int GetBackgroundColorCompNum () const
 
ColorPt GetBackgroundColor () const
 
void SetBackgroundColor (const ColorPt &c, int compnum)
 
UString GetStaticCaptionText () const
 
void SetStaticCaptionText (const UString &contents)
 
UString GetRolloverCaptionText () const
 
void SetRolloverCaptionText (const UString &contents)
 
UString GetMouseDownCaptionText () const
 
void SetMouseDownCaptionText (const UString &contents)
 
SDF::Obj GetStaticIcon () const
 
void SetStaticIcon (SDF::Obj icon)
 
SDF::Obj GetRolloverIcon () const
 
void SetRolloverIcon (SDF::Obj icon)
 
SDF::Obj GetMouseDownIcon () const
 
void SetMouseDownIcon (SDF::Obj icon)
 
IconCaptionRelation GetIconCaptionRelation () const
 
void SetIconCaptionRelation (IconCaptionRelation icr)
 
ScaleCondition GetScaleCondition () const
 
void SetScaleCondition (ScaleCondition sd)
 
ScaleType GetScaleType () const
 
void SetScaleType (ScaleType st)
 
double GetHIconLeftOver () const
 
void SetHIconLeftOver (double hl)
 
double GetVIconLeftOver () const
 
void SetVIconLeftOver (double vl)
 
bool GetFitFull () const
 
void SetFitFull (bool ff)
 
ColorPt GetTextColor ()
 
int GetTextColorCompNum ()
 
void SetTextColor (const ColorPt &color, int col_comp)
 
double GetFontSize () const
 
void SetFontSize (double font_size)
 
Font GetFont () const
 
void SetFont (const Font &font)
 
- Public Member Functions inherited from pdftron::PDF::Annot
 Annot (SDF::Obj d=0)
 
 Annot (const Annot &d)
 
Annotoperator= (const Annot &d)
 
bool operator== (const Annot &d)
 
bool IsValid () const
 
SDF::Obj GetSDFObj () const
 
Type GetType () const
 
Rect GetRect () const
 
Rect GetVisibleContentBox () const
 
bool IsMarkup () const
 
void SetRect (const Rect &pos)
 
Page GetPage () const
 
void SetPage (const Page &page)
 
SDF::Obj GetUniqueID () const
 
void SetUniqueID (const char *id, int id_buf_sz=0)
 
Date GetDate () const
 
void SetDate (const Date &date)
 
bool GetFlag (Flag flag) const
 
void SetFlag (Flag flag, bool value)
 
SDF::Obj GetTriggerAction (Annot::ActionTriggerEvent trigger)
 
BorderStyle GetBorderStyle () const
 
void SetBorderStyle (const BorderStyle &bs, bool oldStyleOnly=false)
 
SDF::Obj GetAppearance (AnnotationState annot_state=e_normal, const char *app_state=0)
 
void SetAppearance (SDF::Obj app_stream, AnnotationState annot_state=e_normal, const char *app_state=0)
 
void RemoveAppearance (AnnotationState annot_state=e_normal, const char *app_state=0)
 
void Flatten (class Page page)
 
const char * GetActiveAppearanceState () const
 
void SetActiveAppearanceState (const char *astate)
 
ColorPt GetColorAsRGB () const
 
ColorPt GetColorAsCMYK () const
 
ColorPt GetColorAsGray () const
 
int GetColorCompNum () const
 
void SetColor (const ColorPt &col, int numcomp=3)
 
int GetStructParent () const
 
void SetStructParent (const int parkeyval)
 
SDF::Obj GetOptionalContent () const
 
void SetOptionalContent (SDF::Obj content)
 
void SetContents (const UString &contents)
 
UString GetContents () const
 
int GetRotation () const
 
void SetRotation (int angle)
 
void RefreshAppearance ()
 
void RefreshAppearance (const RefreshOptions &options)
 
UString GetCustomData (const UString &key) const
 
void SetCustomData (const UString &key, const UString &value)
 
void DeleteCustomData (const UString &key)
 
void Resize (const Rect &newrect)
 
ptrdiff_t GetHandleInternal ()
 

Static Public Member Functions

static ComboBoxWidget Create (PDFDoc &doc, const Rect &pos, const UString &field_name="")
 
static ComboBoxWidget Create (PDFDoc &doc, const Rect &pos, const Field &field)
 
- Static Public Member Functions inherited from pdftron::PDF::Annots::Widget
static Widget Create (SDF::SDFDoc &doc, const Rect &pos, Field field)
 
- Static Public Member Functions inherited from pdftron::PDF::Annot
static Annot Create (SDF::SDFDoc &doc, Type type, const Rect &pos)
 
static AnnotCreateInternal (ptrdiff_t impl)
 

Additional Inherited Members

- Public Types inherited from pdftron::PDF::Annots::Widget
enum  HighlightingMode {
  e_none, e_invert, e_outline, e_push,
  e_toggle
}
 
enum  IconCaptionRelation {
  e_NoIcon, e_NoCaption, e_CBelowI, e_CAboveI,
  e_CRightILeft, e_CLeftIRight, e_COverlayI
}
 
enum  ScaleCondition { e_Always, e_WhenBigger, e_WhenSmaller, e_Never }
 
enum  ScaleType { e_Anamorphic, e_Proportional }
 
- Public Types inherited from pdftron::PDF::Annot
enum  Type {
  e_Text, e_Link, e_FreeText, e_Line,
  e_Square, e_Circle, e_Polygon, e_Polyline,
  e_Highlight, e_Underline, e_Squiggly, e_StrikeOut,
  e_Stamp, e_Caret, e_Ink, e_Popup,
  e_FileAttachment, e_Sound, e_Movie, e_Widget,
  e_Screen, e_PrinterMark, e_TrapNet, e_Watermark,
  e_3D, e_Redact, e_Projection, e_RichMedia,
  e_Unknown
}
 
enum  Flag {
  e_invisible, e_hidden, e_print, e_no_zoom,
  e_no_rotate, e_no_view, e_read_only, e_locked,
  e_toggle_no_view, e_locked_contents
}
 
enum  ActionTriggerEvent {
  e_action_trigger_activate = 0, e_action_trigger_annot_enter = 1, e_action_trigger_annot_exit = 2, e_action_trigger_annot_down = 3,
  e_action_trigger_annot_up = 4, e_action_trigger_annot_focus = 5, e_action_trigger_annot_blur = 6, e_action_trigger_annot_page_open = 7,
  e_action_trigger_annot_page_close = 8, e_action_trigger_annot_page_visible = 9, e_action_trigger_annot_page_invisible = 10
}
 
enum  AnnotationState { e_normal, e_rollover, e_down }
 
typedef pdftron::PDF::BorderStyle BorderStyle
 

Detailed Description

An object representing a combo box used in a PDF Form.

Definition at line 17 of file ComboBoxWidget.h.

Constructor & Destructor Documentation

pdftron::PDF::Annots::ComboBoxWidget::ComboBoxWidget ( SDF::Obj  d = 0)

Creates a Combo Box Widget annotation and initialize it using given Cos/SDF object.

Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
dthe object to use to initialize the ComboBoxWidget
pdftron::PDF::Annots::ComboBoxWidget::ComboBoxWidget ( const Annot annot)

Creates a Combo Box Widget annotation and initialize it using given annotation object.

Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
annotThe annotation to use.

Member Function Documentation

void pdftron::PDF::Annots::ComboBoxWidget::AddOption ( const UString value)

Adds an option to Combo Box widget.

Parameters
valueThe option to add
void pdftron::PDF::Annots::ComboBoxWidget::AddOptions ( const std::vector< UString > &  opts)

Adds multiple options to Combo Box widget.

Parameters
optsThe options to add
static ComboBoxWidget pdftron::PDF::Annots::ComboBoxWidget::Create ( PDFDoc doc,
const Rect pos,
const UString field_name = "" 
)
static

Creates a new Combo Box Widget annotation, in the specified document.

Parameters
docThe document to which the annotation is added.
posA rectangle specifying the annotation's bounds, specified in user space coordinates.
field_nameThe name of the field for which to create a ComboBox widget
Returns
A newly created blank Combo Box Widget annotation.
static ComboBoxWidget pdftron::PDF::Annots::ComboBoxWidget::Create ( PDFDoc doc,
const Rect pos,
const Field field 
)
static

Creates a new Widget annotation, in the specified document.

Parameters
docThe document to which the annotation is added.
posA rectangle specifying the annotation's bounds, specified in user space coordinates.
fieldThe field for which to create a Text widget
Returns
A newly created blank Widget annotation.
std::vector<UString> pdftron::PDF::Annots::ComboBoxWidget::GetOptions ( )

Gets all options of the Combo Box widget.

Returns
The options of the Combo Box widget
UString pdftron::PDF::Annots::ComboBoxWidget::GetSelectedOption ( )

Retrieves the option selected in the ComboBox widget

Returns
The option selected in the ComboBox widget
void pdftron::PDF::Annots::ComboBoxWidget::RemoveOption ( const UString value)

Removes the option from Combo Box widget.

Parameters
valueThe option to remove
void pdftron::PDF::Annots::ComboBoxWidget::ReplaceOptions ( const std::vector< UString > &  new_opts)

Replaces the current Combo Box widget options with a new set.

Parameters
new_optsThe new set of options to use.
void pdftron::PDF::Annots::ComboBoxWidget::SetSelectedOption ( const UString value)

Selects the given option in the Combo Box widget

Parameters
valueThe option to select

The documentation for this class was generated from the following file: