Adobe 65007312 - Photoshop Lightroom Programmer's Manual page 96

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

Advertisement

C
5: Creating a User Interface for Your Plug-in
HAPTER
You can then use the shortcut to specify dynamic property values:
...
viewFactory:static_text {
...
The required argument of
bound to the UI element; that is, the value of
the view hierarchy, but can be overridden at any level.
You can override the bound table for a specific binding by passing the
containing both the key and the table it comes from:
visible = LrView.bind { key = "mySetting", bind_to_object = "myTable" }
This allows you to bind different properties in one view object to keys in different tables.
The bound table is typically the export-settings table, since your UI is typically a way for your user to see
and set these values. The SDK makes this default case easy for sections that you define for the Export
dialog. In views created with
bind_to_object
along with the view factory. See
Simple bindings
The simplest binding is between a property in the
and simply keeps the two synchronized. For example:
visible = LrView.bind( "LR_export_useSubfolder" )
In this case, both the local property (
setting) have Boolean values. Setting the use-subfolder preference to true (in the Export dialog, for
instance) makes the control visible.
For some other common types of binding, you can use an
example:
visible = LrBinding.negativeOfKey( "LR_export_useSubfolder" )
This binds the property to the opposite of the table value; that is, setting the use-subfolder preference to
true hides the control. The binding works in both directions; that is, hiding the control would also set
LR_export_useSubfolder
for example, a value of 2 would become -2.
Although
can be used only with Boolean values, and work only in one direction; a change in the bound table sets the
bound property value, but not the reverse. The
Set a Boolean property to the opposite of a Boolean key value, or a numeric property to the negation
of a numeric key value (
Set a Boolean property when a key value is or is not present (
Set a Boolean property when a key value is or is not equal to a specific value (
keyIsNot
title = bind 'mySetting',
LrView.bind()
sectionsForTopOfDialog
for the entire view hierarchy is set automatically to the export-settings table passed
"Adding custom sections to the Plug-in Manager" on page
to true. This function can be used to negate numeric as well as Boolean values;
works both ways, and with numeric values, the other
negativeOfKey()
LrBinding.negativeOfKey
).
is the key name; by default, this is in the table that is already
bind_to_object
and
object and a settings key of the same datatype,
LrView
) and the bound table item (a Lightroom-defined export
visible
LrBinding
functions allow you to:
LrBinding
).
Binding UI values to data values 96
in the same UI element. This is inherited in
LrView.bind()
sectionsForBottomOfDialog
function as the value assignment; for
LrBinding
LrBinding.keyIsNil
LrBinding.keyEquals
function a table
, the value of
32.
functions
,
).
keyIsNotNil
,

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop lightroom sdk 3.0

Table of Contents