Index

PowerDoc Objects

Button

Overview

The Button object is a visual and interactive form control whose purpose is to trigger certain action(s) when an event occurs (e.g. the user presses the button, releases it, etc.).

Designated Rendering Function: fcDrawButton (10000)

Note: fcValue_08, fcValue_16, fcValue_24 and fcValue_32 cannot be used at the same time. fcValue_32 takes precedence over fcValue_24. fcValue_24 takes precedence over fcValue_16. Finally, fcValue_16 takes precedence over fcValue_08.

fcConfigPtr (10000)

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

Link to the Control Configuration object.

This link supplies the control's configuration parameters.

fcProgramPtr (10030)

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

Link to the Program object.

Properties

fcConnectionID (10001)   PD_LONG_SIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

An ID used to establish a connection between several independent form controls. Controls with the same fcConnectionID are connected.

fcLockStatus (10002)   PD_BYTE_UNSIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

A flag that indicates whether and how the control is locked for user interactions.

Supported values:

0 = Control is not locked (all user interactions are enabled)

1 = Control is completely locked (all user interactions are disabled)

2 = Control is locked for changes (user changes are disabled, other interactions are enabled)

3 = Control is locked for changes (user changes are disabled, other interactions are enabled), except scrolling

4 = Control is only locked for scrolling

fcState (10003)   PD_BYTE_UNSIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

A flag indicating the state of a control.

Supported values:

0 = Normal
1 = Pushed
2 = Selected

fcName (10004)   PD_ASC

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

Name of the control. Controls representing different variables or features should have different names. Controls representing the same variable or feature (e.g. a group of radio buttons) should have the same name.

fcValue_08 (10005)   PD_ASC

Supported Compression Methods: 006

Also appears in: Listbox Column, Radio Button, Check Box, Text Box, List Box

Control's value in ANSI format (1 byte per character). Any form control can have a value. Most controls (e.g. buttons, radio buttons, check boxes, text boxes) need a value to function in a useful way. Some controls, however, can function without a value (e.g. sliders).

fcValue_16 (10012)   PD_HEX

Supported Compression Methods: 004

Also appears in: Listbox Column, Radio Button, Check Box, Text Box, List Box

Control's value in Unicode format (2 bytes per character). Any form control can have a value. Most controls (e.g. buttons, radio buttons, check boxes, text boxes) need a value to function in a useful way. Some controls, however, can function without a value (e.g. sliders).

fcValue_24 (10013)   PD_HEX

Supported Compression Methods: 002

Also appears in: Listbox Column, Radio Button, Check Box, Text Box, List Box

Control's value in Unicode format (3 bytes per character). Any form control can have a value. Most controls (e.g. buttons, radio buttons, check boxes, text boxes) need a value to function in a useful way. Some controls, however, can function without a value (e.g. sliders).

fcValue_32 (10014)   PD_HEX

Supported Compression Methods: 000

Also appears in: Listbox Column, Radio Button, Check Box, Text Box, List Box

Control's value in Unicode format (4 bytes per character). Any form control can have a value. Most controls (e.g. buttons, radio buttons, check boxes, text boxes) need a value to function in a useful way. Some controls, however, can function without a value (e.g. sliders).

fcDw (10006)   PD_LONG_SIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

Width of the control in document units.

fcDh (10007)   PD_LONG_SIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

Height of the control in document units.

fcUserParam (10008)   PD_LONG_SIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

An arbitrary user parameter.

fcTabOrderID (10009)   PD_WORD_SIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

Tab order ID.

fcGroupID (10010)   PD_LONG_SIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

An ID used to group several form controls. Controls with the same fcGroupID belong to the same group.

fcUserString (10017)   PD_ASC

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

fcOnCtrlRelease (10200)   PD_ARR_BYTE_UNSIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

An array of actions executed when the control is released.

Each element of the array can have one of the following values:

0 = Do nothing
1 = Call the callback function
2 = Jump to the page specified in fcUserParam
3 = Scroll up (left) connected sliders, text boxes and list boxes
4 = Scroll down (right) connected sliders, text boxes and list boxes
5 = Scroll connected list boxes and text boxes according to the slider's position
6 = Copy the value of the slider's position to connected text boxes
7 = Scroll connected sliders according to the first visible item in the list box or text box
8 = Copy the value of the selected item in the list to connected text boxes
9 = Hide all controls whose GroupID matches the value specified in fcUserParam
10 = Show all controls whose GroupID matches the value specified in fcUserParam
11 = Alternate the visibility of all controls whose GroupID matches the value specified in fcUserParam
12 = Jump to the previous page
13 = Jump to the next page
14 = Update connected sliders to reflect the amount of content in the text box
15 = Copy the value of the slider's position to joined media - by time
16 = Copy the value of the slider's position to joined media - by frame
17 = Pause joined media
18 = Play joined media
19 = Restart joined media
20 = Toggle joined media
21 = Open URL specified in fcUserString using the default Web browser
22 = Jump to the first page that holds an image with the name ID specified in fcUserParam
23 = Jump to the last page that holds an image with the name ID specified in fcUserParam
24 = Open address specified in fcUserString using the default E-mail client
100 = Call the Program object via fcProgramPtr

fcOnCtrlPush (10203)   PD_ARR_BYTE_UNSIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

An array of actions executed when the control is pushed.

Each element of the array can have one of the following values:

0 = Do nothing
1 = Call the callback function
2 = Jump to the page specified in fcUserParam
3 = Scroll up (left) connected sliders, text boxes and list boxes
4 = Scroll down (right) connected sliders, text boxes and list boxes
5 = Scroll connected list boxes and text boxes according to the slider's position
6 = Copy the value of the slider's position to connected text boxes
7 = Scroll connected sliders according to the first visible item in the list box or text box
8 = Copy the value of the selected item in the list to connected text boxes
9 = Hide all controls whose GroupID matches the value specified in fcUserParam
10 = Show all controls whose GroupID matches the value specified in fcUserParam
11 = Alternate the visibility of all controls whose GroupID matches the value specified in fcUserParam
12 = Jump to the previous page
13 = Jump to the next page
14 = Update connected sliders to reflect the amount of content in the text box
15 = Copy the value of the slider's position to joined media - by time
16 = Copy the value of the slider's position to joined media - by frame
17 = Pause joined media
18 = Play joined media
19 = Restart joined media
20 = Toggle joined media
21 = Open URL specified in fcUserString using the default Web browser
22 = Jump to the first page that holds an image with the name ID specified in fcUserParam
23 = Jump to the last page that holds an image with the name ID specified in fcUserParam
24 = Open address specified in fcUserString using the default E-mail client
100 = Call the Program object via fcProgramPtr

fcOnCtrlFocusReceive (10204)   PD_ARR_BYTE_UNSIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

An array of actions executed when the control receives focus.

Each element of the array can have one of the following values:

0 = Do nothing
1 = Call the callback function
2 = Jump to the page specified in fcUserParam
3 = Scroll up (left) connected sliders, text boxes and list boxes
4 = Scroll down (right) connected sliders, text boxes and list boxes
5 = Scroll connected list boxes and text boxes according to the slider's position
6 = Copy the value of the slider's position to connected text boxes
7 = Scroll connected sliders according to the first visible item in the list box or text box
8 = Copy the value of the selected item in the list to connected text boxes
9 = Hide all controls whose GroupID matches the value specified in fcUserParam
10 = Show all controls whose GroupID matches the value specified in fcUserParam
11 = Alternate the visibility of all controls whose GroupID matches the value specified in fcUserParam
12 = Jump to the previous page
13 = Jump to the next page
14 = Update connected sliders to reflect the amount of content in the text box
15 = Copy the value of the slider's position to joined media - by time
16 = Copy the value of the slider's position to joined media - by frame
17 = Pause joined media
18 = Play joined media
19 = Restart joined media
20 = Toggle joined media
21 = Open URL specified in fcUserString using the default Web browser
22 = Jump to the first page that holds an image with the name ID specified in fcUserParam
23 = Jump to the last page that holds an image with the name ID specified in fcUserParam
24 = Open address specified in fcUserString using the default E-mail client
100 = Call the Program object via fcProgramPtr

fcOnCtrlHold (10205)   PD_ARR_BYTE_UNSIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

An array of actions executed when the control is held.

Each element of the array can have one of the following values:

0 = Do nothing
1 = Call the callback function
2 = Jump to the page specified in fcUserParam
3 = Scroll up (left) connected sliders, text boxes and list boxes
4 = Scroll down (right) connected sliders, text boxes and list boxes
5 = Scroll connected list boxes and text boxes according to the slider's position
6 = Copy the value of the slider's position to connected text boxes
7 = Scroll connected sliders according to the first visible item in the list box or text box
8 = Copy the value of the selected item in the list to connected text boxes
9 = Hide all controls whose GroupID matches the value specified in fcUserParam
10 = Show all controls whose GroupID matches the value specified in fcUserParam
11 = Alternate the visibility of all controls whose GroupID matches the value specified in fcUserParam
12 = Jump to the previous page
13 = Jump to the next page
14 = Update connected sliders to reflect the amount of content in the text box
15 = Copy the value of the slider's position to joined media - by time
16 = Copy the value of the slider's position to joined media - by frame
17 = Pause joined media
18 = Play joined media
19 = Restart joined media
20 = Toggle joined media
21 = Open URL specified in fcUserString using the default Web browser
22 = Jump to the first page that holds an image with the name ID specified in fcUserParam
23 = Jump to the last page that holds an image with the name ID specified in fcUserParam
24 = Open address specified in fcUserString using the default E-mail client
100 = Call the Program object via fcProgramPtr

fcOnCtrlFocusLose (10206)   PD_ARR_BYTE_UNSIGNED

Also appears in: Radio Button, Check Box, Text Box, List Box, Horizontal Slider, Vertical Slider, Rich Text Box, Rich Button, Rich List Box

An array of actions executed when the control loses focus.

Each element of the array can have one of the following values:

0 = Do nothing
1 = Call the callback function
2 = Jump to the page specified in fcUserParam
3 = Scroll up (left) connected sliders, text boxes and list boxes
4 = Scroll down (right) connected sliders, text boxes and list boxes
5 = Scroll connected list boxes and text boxes according to the slider's position
6 = Copy the value of the slider's position to connected text boxes
7 = Scroll connected sliders according to the first visible item in the list box or text box
8 = Copy the value of the selected item in the list to connected text boxes
9 = Hide all controls whose GroupID matches the value specified in fcUserParam
10 = Show all controls whose GroupID matches the value specified in fcUserParam
11 = Alternate the visibility of all controls whose GroupID matches the value specified in fcUserParam
12 = Jump to the previous page
13 = Jump to the next page
14 = Update connected sliders to reflect the amount of content in the text box
15 = Copy the value of the slider's position to joined media - by time
16 = Copy the value of the slider's position to joined media - by frame
17 = Pause joined media
18 = Play joined media
19 = Restart joined media
20 = Toggle joined media
21 = Open URL specified in fcUserString using the default Web browser
22 = Jump to the first page that holds an image with the name ID specified in fcUserParam
23 = Jump to the last page that holds an image with the name ID specified in fcUserParam
24 = Open address specified in fcUserString using the default E-mail client
100 = Call the Program object via fcProgramPtr

Example

C/C++

DT_ID_SLONG obj[2];

obj[0] = pdObjAdd(pd, 0, "Form Configuration");
obj[1] = pdObjAdd(pd, 0, "Form Button");

/* Properties for object 0 */
pdPropAdd(pd, obj[0], fcCnfLib, "0", PD_WORD_SIGNED);
pdPropAdd(pd, obj[0], fcCnfCtrlStyleOnFocus, "0", PD_WORD_SIGNED);
pdPropAdd(pd, obj[0], fcCnfCharBox, "6", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[0], fcCnfButtonNormal, "14", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[0], fcCnfButtonPushed, "13", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[0], fcCnfSliderNormal, "2", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[0], fcCnfSliderPushed, "3", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[0], fcCnfRadioButtonNormal, "6", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[0], fcCnfRadioButtonPushed, "7", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[0], fcCnfRadioButtonSelected, "8", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[0], fcCnfCheckBoxNormal, "3", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[0], fcCnfCheckBoxPushed, "4", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[0], fcCnfCheckBoxSelected, "5", PD_BYTE_UNSIGNED);

/* Properties for object 1 */
pdLinkAdd(pd, obj[1], fcConfigPtr, obj[0]);
pdPropAdd(pd, obj[1], fcName, "IDBUTTON", PD_ASC);
pdPropAdd(pd, obj[1], fcValue_08, "Button", PD_ASC);
pdPropAdd(pd, obj[1], fcDw, "400", PD_LONG_SIGNED);
pdPropAdd(pd, obj[1], fcDh, "100", PD_LONG_SIGNED);
pdPropAdd(pd, obj[1], fcState, "0", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[1], fcUserParam, "100", PD_LONG_SIGNED);
pdPropAdd(pd, obj[1], fcOnCtrlPush, "1", PD_BYTE_UNSIGNED);
pdPropAdd(pd, obj[1], fcOnCtrlRelease, "2", PD_BYTE_UNSIGNED);


/* Image placement */
pdImgAdd(pd, obj[1], 0, 50, 50, 0, 0, 0, fcDrawButton, DV_NULL);

INTEGRAL DSL

/* Lambda shortcuts */

local o = @(label = "") CDTObj(::my.doc, label); /* to make object */
local p = @(id, str, len = PD_DEFAULT) CDTProp(id, str, len); /* to add property - general */
local s = @(id, str) CDTPropStr(id, str); /* to add property - string */
local i = @(id, num) CDTPropInt(id, num); /* to add property - integer */
local l = @(id, obj) CDTLink(id, obj); /* to add link */

/* Objects */

local obj_0 = o("Form Configuration");
local obj_1 = o("Form Button");

/* Object Properties */

obj_0 + i(fcCnfLib, 0);
obj_0 + i(fcCnfCtrlStyleOnFocus, 0);
obj_0 + i(fcCnfCharBox, 6);
obj_0 + i(fcCnfButtonNormal, 14);
obj_0 + i(fcCnfButtonPushed, 13);
obj_0 + i(fcCnfSliderNormal, 2);
obj_0 + i(fcCnfSliderPushed, 3);
obj_0 + i(fcCnfRadioButtonNormal, 6);
obj_0 + i(fcCnfRadioButtonPushed, 7);
obj_0 + i(fcCnfRadioButtonSelected, 8);
obj_0 + i(fcCnfCheckBoxNormal, 3);
obj_0 + i(fcCnfCheckBoxPushed, 4);
obj_0 + i(fcCnfCheckBoxSelected, 5);

obj_1 + l(fcConfigPtr, obj_0);
obj_1 + p(fcName, "IDBUTTON", PD_ASC);
obj_1 + p(fcValue_08, "Button", PD_ASC);
obj_1 + i(fcDw, 400);
obj_1 + i(fcDh, 100);
obj_1 + i(fcState, 0);
obj_1 + i(fcUserParam, 100);
obj_1 + i(fcOnCtrlPush, 1);
obj_1 + i(fcOnCtrlRelease, 2);

/* Image Pinning */

obj_1.Pin(0, 50, 50, fcDrawButton);
 

Index