Binding Ui Values To Data Values - Adobe 65007312 - Photoshop Lightroom Programmer's Manual

Mac
Hide thumbs Also See for 65007312 - Photoshop Lightroom:
Table of Contents

Advertisement

C
5: Creating a User Interface for Your Plug-in
HAPTER
Text view properties
These properties apply to any control that displays text, including
push_button
Property
width_in_chars
width_in_digits
height_in_lines

Binding UI values to data values

Bindings allow you to make your UI dynamic by specifying a relationship between an
and current values in an observable table (see
be the export-settings property table provided by the API, or a table that you create for local program data
that you define.
When you create a binding, the value or state of the UI element reflects the data value, and the data value
reflects the UI element state. This is a two-way relationship; when the binding is established, the data value
from the table is pushed to the view, and when the user changes the bound value in the view (by selecting
a checkbox, for instance, or entering a value in a text field), the table is notified and the corresponding
data key value or values change accordingly. Similarly, when your program changes a value in the table,
the bound UI elements are updated to display the new value.
To create bindings:
1. Specify a bound table at some level of the view hierarchy. Set the table as the value of the
bind_to_object
parent container is inherited by its children, but can be overridden.
When you create a dialog box, you must set the bound table explicitly.
When you create a section for the Plug-in Manager or Export dialog using the
sectionsForTopOfDialog
your plug-in is passed to those functions as the propertyTable value. This table contains both
export settings that you have defined for your plug-in (see
page
page
The propertyTable is automatically set as the default bound table for all of the UI elements in the
view hierarchy for that section. However, the bindable
view hierarchy; if you want to make that value dynamic, you must specify the table explicitly. See
"Adding custom sections to the Plug-in Manager" on page
, as well as the editable text controls.
Datatype
number
number
number
property (you can also use the name
or
57) and Lightroom-defined export settings (see
59).
Description
Calculates the minimum width using this as the
number of m characters that should fit. Considered
together with
editable text fields.
Calculates the minimum width using this as the
number of 0 digits that should fit. Considered
together with
Calculates the minimum height using this as the
number of lines that should fit within the field.
Default is 1.
"Creating observable property tables" on page
object
sectionsForBottomOfDialog
Binding UI values to data values 94
,
popup_menu
static_text
. Default is 15 for
width_in_digits
. Default is 0.
width_in_chars
LrView
for this property). The bound table of a
functions, the settings table for
"Remembering user choices" on
"Lightroom built-in property keys" on
for the section is not part of the
synopsis
32.
, and
object's state
97). This can

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop lightroom sdk 3.0

Table of Contents