Home

Windows Controls

These procedures are used to create window controls within an AppGraphics window. While the library is currently limited, it does support buttons, menus, and text entry. Buttons and menu items will all have callback functions that allow the user to handle such actions. Users should be aware of possible cross-threading issues; please read the Threads section for more information.

addmenu

C int addmenu (title, parent)
Fortran function addmenu (title, parent)

Description

Creates a menu within a window. This routine can be used to create the root menu bar for a window or to add subsequent menus to the window’s menu bar by properly specifying the parent value.

Parameters

Parameter C Type Fortran Type Description
label const char * character(*) Text to display in a menu. Unused if the menu being created is the root menu bar for a window.
parent int integer The parent menu to which to add this menu. If omitted or specified as MENU_FOR_WINDOW, a menu bar will be added.

Return Value

C int
Fortran integer

An identifier of the menu. If a root menu is attempted to be added twice, this routine will return the error value MENU_ERROR rather than a menu identifier.

addmenuitem

C int addmenuitem (title, parent, callback)
Fortran function addmenuitem (title, parent, callback)

Description

Creates a menu item within an existing menu.

Parameters

Parameter C Type Fortran Type Description
title const char * character(*) Text to display for this menu item
parent int integer The parent menu to which to add this menu item
callback void callback( void ) subroutine callback() The procedure to call when the menu item is selected

Return Value

C int
Fortran integer

An identifier of the menu item.

addmenuseparator

C int addmenuseparator (parent)
Fortran function addmenuseparator (parent)

Description

Creates a menu separator, which should appear as a line within a menu. The item’s returned identifier can be used with removemenuitem as if it is a normal menu item.

Parameters

Parameter C Type Fortran Type Description
parent int integer The parent menu to which to add this menu item

Return Value

C int
Fortran integer

An identifier of the menu separator.

beginradiogroup

C void beginradiogroup ( )
Fortran subroutine beginradiogroup ( )

Description

Initializes a group of radio buttons. All radio buttons created until the next call to beginradiogroup will be in the same group, meaning only one may be checked at a time.

cleardropdownlistentries

C void cleardropdownlistentries (id)
Fortran subroutine cleardropdownlistentries (id)

Description

Removes all entries in a drop down list

Parameters

Parameter C Type Fortran Type Description
id int integer The id of the drop down list to clear

clearlistboxentries

C void clearlistboxentries (id)
Fortran subroutine clearlistboxentries (id)

Description

Removes all entries in a list box

Parameters

Parameter C Type Fortran Type Description
id int integer The id of the list box to clear

checkboxischecked

C bool checkboxischecked (id)
Fortran function checkboxischecked (id)

Description

Returns the current state of a check box

Parameters

Parameter C Type Fortran Type Description
id int integer The id of the check box to query

Return Value

C bool
Fortran logical

True if checked, false otherwise.

checkboxsetchecked

C void checkboxsetchecked (id, state)
Fortran subroutine checkboxsetchecked (id, state)

Description

Sets the current state of a checkbox

Parameters

Parameter C Type Fortran Type Description
id int integer The id of the check box to set
state bool logical True to set checked, false to set unchecked

cleartextboxentercallback

Fortran subroutine cleartextboxentercallback (index)

Description Clears a callback to be executed when the ENTER key is pressed while typing in a specified text box.

Parameters

Parameter Fortran Type Description
index integer The identifier for the text box

createbutton

C int createbutton (x, y, width, height, label, callback)
Fortran function createbutton (x, y, width, height, label, callback)

Description

Creates a button within a window.

Parameters

Parameter C Type Fortran Type Description
x int integer Leftmost position of the button
y int integer Topmost position of the button
width int integer Width of the button
height int integer Height of the button
label const char * character(*) Text to display on the button
callback void callback( void ) subroutine callback() The procedure to call when the button is clicked

Return Value

C int
Fortran integer

An identifier of the button

createcheckbox

C int createcheckbox (x, y, width, height, label, callback)
Fortran function createcheckbox (x, y, width, height, label, callback)

Description

Creates a check box within a window. The check box is automatically managed; when clicked, the checkbox state is flipped. The label will appear to the right of the actual check box on most systems.

Parameters

Parameter C Type Fortran Type Description
x int integer Leftmost position of the check box
y int integer Topmost position of the check box
width int integer Width of the check box
height int integer Height of the check box
label const char * character(*) Text to display on the check box
callback void callback( void ) subroutine callback()1 The procedure to call when the check box is clicked

Return Value

C int
Fortran integer

An identifier of the check box

createdropdownlist

C int createdropdownlist (x, y, width, height, callback)
Fortran function createdropdownlist (x, y, width, height, callback)

Description

Creates a drop down list (sometimes called a combo box) within a window.

Parameters

Parameter C Type Fortran Type Description
x int integer Leftmost position of the drop down list
y int integer Topmost position of the drop down list
width int integer Width of the drop down list
height int integer Height of the drop down list when the list is open
callback void callback( void ) subroutine callback()1 The procedure to call when the drop down list selection changes

Return Value

C int
Fortran integer

An identifier of the drop down list

createlistbox

C int createlistbox (x, y, width, height, callback)
Fortran function createlistbox (x, y, width, height, callback)

Description

Creates a list box within a window. This list box allows single selections. The callback procedure is called whenever the selection changes.

Parameters

Parameter C Type Fortran Type Description
x int integer Leftmost position of the list box
y int integer Topmost position of the list box
width int integer Width of the list box
height int integer Height of the list box
callback void callback( void ) subroutine callback()1 The procedure to call when the list box selection changes

Return Value

C int
Fortran integer

An identifier of the list box

createmultilinetextbox

C int createmultilinetextbox (int x, int y, int w, int h, bool wrap)
Fortran function createmultilinetextbox (x, y, w, h, wrap)

Description

Creates an empty, multi-line text box within a window. This text box can display multiple lines of text and accept the Enter key as a valid character. The user can edit the contents of this text box. The text will be justified according to the last call to settextjustify for the current window, and the text box’s justification cannot be changed after the text box is created.

After creation, a multi-line text box can be handled by the routines that also apply to normal text boxes.

Parameters

Parameter C Type Fortran Type Description
x int integer Leftmost position of the text box
y int integer Topmost position of the text box
width int integer Width of the text box
height int integer Height of the text box
wrap bool logical1 When true, automatically wrap lines

Return Value

C int
Fortran integer

An identifier of the text box

createradiobutton

C int createradiobutton (x, y, width, height, label, callback)
Fortran function createradiobutton (x, y, width, height, label, callback)

Description

Creates a radio button within a window. Radio buttons, like check boxes, are either checked or clear. However, radio buttons may be in a group such that only one radio button may be enabled at any given time. The radio button is automatically managed; when clicked, the radio button state is flipped, and changes to other buttons in the radio button’s group will be made if applicable. The label will appear to the right of the actual radio button on most systems.

Parameters

Parameter C Type Fortran Type Description
x int integer Leftmost position of the radio button
y int integer Topmost position of the radio button
width int integer Width of the radio button
height int integer Height of the radio button
label const char * character(*) Text to display on the radio button
callback void callback( void ) subroutine callback()1 The procedure to call when the radio button is clicked

Return Value

C int
Fortran integer

An identifier of the radio button

createscrollbar

C int createscrollbar(x, y, width, height, direction, callback)
Fortran function createscrollbar (x, y, width, height, direction, callback)

Description

Creates a scroll bar within the window. The scroll bar can be either horizontal or vertical
depending on the value of direction, which may be either:

Value Description
SCROLL_HORIZONTAL A horizontal scroll bar
SCROLL_VERTICAL A vertical scroll bar

The resulting scroll bar is not tied to the window to allow scrolling automatically. Rather, the developer must provide a callback procedure that will be called with the scrollbar’s current position whenever the scrollbar moves. This callback may then taken action based on the scroll position provided.

Parameters

Parameter C Type Fortran Type Description
x int integer Leftmost position of the scroll bar
y int integer Topmost position of the scroll bar
width int integer Width of the scroll bar
height int integer Height of the scroll bar
direction int integer The direction of the scroll bar
callback void callback( int ) subroutine callback(integer) The procedure to call when the scroll position changes

Return Value

C int
Fortran integer

An identifier of the scroll bar

createtextbox

C int createtextbox (x, y, width, height)
Fortran function createtextbox (x, y, width, height)

Description

Creates an empty text box within a window. The user can edit the contents of this text box. The text will be justified according to the last call to settextjustify for the current window, and the text box’s justification cannot be changed after the text box is created.

Parameters

Parameter C Type Fortran Type Description
x int integer Leftmost position of the text box
y int integer Topmost position of the text box
width int integer Width of the text box
height int integer Height of the text box

Return Value

C int
Fortran integer

An identifier of the text box

deletetextboxselection

C void deletetextboxselection (id)
Fortran subroutine deletetextboxselection (id)

Description

Deletes the currently selected text in a text box

Parameters

Parameter C Type Fortran Type Description
id int integer Identifier of the text box

enablebutton

C void enablebutton (id, enable)
Fortran subroutine enablebutton (id, enable)

Description

Enables or disables a specified button

Parameters

Parameter C Type Fortran Type Description
id int integer Identifier of the button
enable bool logical True to enable the button, false to disable

enablemenuitem

C void enablemenuitem (id, enable)
Fortran subroutine enablemenuitem (id, enable)

Description

Enables or disables a specified menu item

Parameters

Parameter C Type Fortran Type Description
id int integer Identifier of the menu item
enable bool logical True to enable the menu item, false to disable

enabletextbox

C void enabletextbox (id, enable)
Fortran subroutine enabletextbox (id, enable)

Description

Enables or disables a specified text box

Parameters

Parameter C Type Fortran Type Description
id int integer Identifier of the text box
enable bool logical True to enable the text box, false to disable

getbuttonposition

C bool getbuttonposition (int index, int *left, int *top, int *width, int *height)
Fortran function getbuttonposition (index, left, top, width, height)

Description

Retrieves the position and dimensions of the specified button

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the button
left int * integer(intent=out) The horizontal position of the left side of the button
top int * integer(intent=out) The vertical position of the top of the button
width int * integer(intent=out) The width of the button
height int * integer(intent=out) The height of the button

Return Value

C bool
Fortran logical

True if the position was retrieved successfully, false otherwise.

getcheckboxposition

C bool getcheckboxposition (int index, int *left, int *top, int *width, int *height)
Fortran function getcheckboxposition (index, left, top, width, height)

Description

Retrieves the position and dimensions of the specified check box

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the check box
left int * integer(intent=out) The horizontal position of the left side of the check box
top int * integer(intent=out) The vertical position of the top of the check box
width int * integer(intent=out) The width of the check box
height int * integer(intent=out) The height of the check box

Return Value

C bool
Fortran logical

True if the position was retrieved successfully, false otherwise.

getdropdownlistlength

C int getdropdownlistlength (index)
Fortran function getdropdownlistlength (index)

Description

Retrieves the number of entries in a drop down list.

Parameters

Parameter C Type Fortran Type Description
index int integer The drop down list of interest

Return Value

C int
Fortran integer

The number of entries.

getdropdownlistposition

C bool getdropdownlistposition (int index, int *left, int *top, int *width, int *height)
Fortran function getdropdownlistposition (index, left, top, width, height)

Description

Retrieves the position and dimensions of the specified drop down list

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the drop down list
left int * integer(intent=out) The horizontal position of the left side of the drop down list
top int * integer(intent=out) The vertical position of the top of the drop down list
width int * integer(intent=out) The width of the drop down list
height int * integer(intent=out) The height of the drop down list

Return Value

C bool
Fortran logical

True if the position was retrieved successfully, false otherwise.

getdropdownlistselection

C int getdropdownlistselection (index)
Fortran function getdropdownlistselection (index)

Description

Retrieves the zero-based position of the seletced item in a drop down list. If there is no selection, a negative value is returned

Parameters

Parameter C Type Fortran Type Description
index int integer The drop down list of interest

Return Value

C int
Fortran integer

The zero-based position of the currently selected item in the drop down list.

getdropdownlisttext

C int getdropdownlisttext (index, position, text, text_length)
Fortran function getdropdownlisttext (index position, text)

Description

Retrieves the text for a specified item in a drop down list. If the text parameter is omitted or is NULL, this function will return the length of the text without a null terminating character. The text parameter must be sized properly to accept the text.

Parameters

Parameter C Type Fortran Type Description
index int integer The drop down list of interest
position int integer The position of the item in the drop down list
text char * character(*)1 The buffer to receive the text contents
text_length int N/A The length of the text buffer

Return Value

C int
Fortran integer

The length of the text at the position, CONTROLS_ERROR if a general error occurred, or CONTROLS_BUFFER_TOO_SMALL if the text buffer is too small.

getlistboxlength

C int getlistboxlength (index)
Fortran function getlistboxlength (index)

Description

Retrieves the number of entries in a list box.

Parameters

Parameter C Type Fortran Type Description
index int integer The list box of interest

Return Value

C int
Fortran integer

The number of entries in a list box.

getlistboxposition

C bool getlistboxposition (int index, int *left, int *top, int *width, int *height)
Fortran function getlistboxposition (index, left, top, width, height)

Description

Retrieves the position and dimensions of the specified list box

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the list box
left int * integer(intent=out) The horizontal position of the left side of the list box
top int * integer(intent=out) The vertical position of the top of the list box
width int * integer(intent=out) The width of the list box
height int * integer(intent=out) The height of the list box

Return Value

C bool
Fortran logical

True if the position was retrieved successfully, false otherwise.

getlistboxselection

C int getlistboxselection (index)
Fortran function getlistboxselection (index)

Description

Retrieves the zero-based position of the seletced item in a list box. If there is no selection, a negative value is returned

Parameters

Parameter C Type Fortran Type Description
index int integer The list box of interest

Return Value

C int
Fortran integer

The zero-based position of the currently selected item in the list box.

getlistboxtext

C int getlistboxtext (index, position, text, text_length)
Fortran function getlistboxtext (index position, text)

Description

Retrieves the text for a specified item in a list box. If the text parameter is omitted or is NULL, this function will return the length of the text without a null terminating character. The text parameter must be sized properly to accept the text.

Parameters

Parameter C Type Fortran Type Description
index int integer The list box of interest
position int integer The position of the item in the list box
text char * character(*)1 The buffer to receive the text contents
text_length int N/A The length of the text buffer

Return Value

C int
Fortran integer

The length of the text at the position, CONTROLS_ERROR if a general error occurred, or CONTROLS_BUFFER_TOO_SMALL if the text buffer is too small.

getradiobuttonposition

C bool getradiobuttonposition (int index, int *left, int *top, int *width, int *height)
Fortran function getradiobuttonposition (index, left, top, width, height)

Description

Retrieves the position and dimensions of the specified radio button

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the radio button
left int * integer(intent=out) The horizontal position of the left side of the radio button
top int * integer(intent=out) The vertical position of the top of the radio button
width int * integer(intent=out) The width of the radio button
height int * integer(intent=out) The height of the radio button

Return Value

C bool
Fortran logical

True if the position was retrieved successfully, false otherwise.

getscrollbarposition

C bool getscrollbarposition (int index, int *left, int *top, int *width, int *height)
Fortran function getscrollbarposition (index, left, top, width, height)

Description

Retrieves the position and dimensions of the specified scroll bar

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the scroll bar
left int * integer(intent=out) The horizontal position of the left side of the scroll bar
top int * integer(intent=out) The vertical position of the top of the scroll bar
width int * integer(intent=out) The width of the scroll bar
height int * integer(intent=out) The height of the scroll bar

Return Value

C bool
Fortran logical

True if the position was retrieved successfully, false otherwise.

getscrollposition

C int getscrollposition (index)
Fortran function getscrollposition (index)

Description

Retrieves the position of the scroll bar.

Parameters

Parameter C Type Fortran Type Description
index int integer The scroll bar to query

Return Value

C int
Fortran integer

The scroll bar’s current position.

gettextboxcontents

C int gettextboxcontents (index, buffer, buflength)
Fortran function gettextboxcontents (index, buffer)

Description

Retrieves the contents of a text box. If the buffer is NULL, the return value is simply the length of text in the text box.

Parameters

Parameter C Type Fortran Type Description
index int integer The text box from which to retrieve text
buffer char * character(*) The buffer to receive the text box contents
buflength int N/A The size of the buffer to receive text

Return Value

C int
Fortran integer

The number of characters copied into the buffer from this call

gettextboxcursorposition

C int gettextboxcursorposition (index)
Fortran function gettextboxcursorposition (index)

Description

Returns the current position of the cursor within the text box

Parameters

Parameter C Type Fortran Type Description
index int integer The text box of interest

Return Value

C int
Fortran integer

The position in the text box of the cursor. This value is most likely only useful for moving the cursor in relative terms within the text box, and it should not be relied on as an index for accessing a string.

gettextboxlength

C int gettextboxlength (index)
Fortran function gettextboxlength (index)

Description

Retrieves the length of the text currently in a text box. This routine can be useful for allocating a properly sized string to receive the text.

Parameters

Parameter C Type Fortran Type Description
index int integer The text box from which to retrieve text

Return Value

C int
Fortran integer

The length of the text currently in a text box

gettextboxlinefromposition

C int gettextboxlinefromposition (index, position)
Fortran function gettextboxlinefromposition (index, position)

Description

Retrieves the line in the multi-line text box which corresponds to the requested position.

Parameters

Parameter C Type Fortran Type Description
index int integer The text box from which to retrieve text
position int integer The position within the text box

Return Value

C int
Fortran integer

The line (zero-indexed) in the text corresponding to the position

gettextboxposition

C bool gettextboxposition (int index, int *left, int *top, int *width, int *height)
Fortran function gettextboxposition (index, left, top, width, height)

Description

Retrieves the position and dimensions of the specified text box

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the text box
left int * integer(intent=out) The horizontal position of the left side of the text box
top int * integer(intent=out) The vertical position of the top of the text box
width int * integer(intent=out) The width of the text box
height int * integer(intent=out) The height of the text box

Return Value

C bool
Fortran logical

True if the position was retrieved successfully, false otherwise.

gettextboxpositionfromline

C int gettextboxpositionfromline (index, position)
Fortran function gettextboxpositionfromline (index, position)

Description

Retrieves the cursor position in the multi-line text box which corresponds to the first character of the requested line

Parameters

Parameter C Type Fortran Type Description
index int integer The text box from which to retrieve text
line int integer The line (zero-indexed) within the multi-line text box

Return Value

C int
Fortran integer

The position in the text box of the beginning of the requeset line. This value is most likely only useful for moving the cursor in relative terms within the text box, and it should not be relied on as an index for accessing a string.

gettextboxselection

C int gettextboxselection (int index, char *buffer, int buflen)
Fortran function gettextboxselection (index, buffer)

Description

Retrieves the selected text from the specified text box

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the text box
buffer char * character(len=*) The buffer to receive the selected text
buflen int N/A The length of the character buffer

Return Value

C int
Fortran integer

The number of characters copied into the buffer

gettextboxselectionlength

C int gettextboxselectionlength (int index)
Fortran function gettextboxselectionlength (index)

Description

Retrieves the length of the selected text from the specified text box

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the text box

Return Value

C int
Fortran integer

The length of the currently selected text

insertdropdownlistentry

C int insertdropdownlistentry (index, position, text)
Fortran function insertdropdownlistentry (index, position, text)

Description

Inserts a string into a specified drop down list at the requested position in the list. If the position is less than zero, the entry is appended to the end of the list. If an invalid position is provided, for example, a position that exceeds the current list length, the call will fail.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier of the drop down list
position int integer The position in the list where the string will be inserted, or less than zero to append to the list
text const char * character(*) The text to insert

Return Value

C int
Fortran integer

The number of entries in the list, or CONTROLS_ERROR if an error occurred.

insertlistboxentry

C int insertlistboxentry (index, position, text)
Fortran function insertlistboxentry (index, position, text)

Description

Inserts a string into a specified list box at the requested position in the list box. If the position is less than zero, the entry is appended to the end of the list. If an invalid position is provided, for example, a position that exceeds the current list length, the call will fail.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier of the list box
position int integer The position in the list where the string will be inserted, or less than zero to append to the list
text const char * character(*) The text to insert

Return Value

C int
Fortran integer

The number of entries in the list, or CONTROLS_ERROR if an error occurred.

inserttextboxtext

C void inserttextboxtext (index, text)
Fortran subroutine inserttextboxtext (index, text)

Description

Inserts a string into the specified text box at the current cursor position

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier of the text box
text const char * character(*) The text to insert

radiobuttonischecked

C bool radiobuttonischecked (id)
Fortran function radiobuttonischecked (id)

Description

Returns the current state of a check box

Parameters

Parameter C Type Fortran Type Description
id int integer The id of the radio button to query

Return Value

C bool
Fortran logical

True if checked, false otherwise.

radiobuttonsetchecked

C void radiobuttonsetchecked (id, state)
Fortran subroutine radiobuttonsetchecked (id, state)

Description

Sets the current state of a radio button

Parameters

Parameter C Type Fortran Type Description
id int integer The id of the radio button to set
state bool logical True to set checked, false to set unchecked

removebutton

C void removebutton (index)
Fortran subroutine removebutton (index)

Description

Removes the specified button from the window

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the button to remove.

removecheckbox

C void removecheckbox (index)
Fortran subroutine removecheckbox (index)

Description

Removes the specified check box from the window

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the check box to remove.

removedropdownlist

C void removedropdownlist (index)
Fortran subroutine removedropdownlist (index)

Description

Removes the specified drop down list from the window

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the drop down list to remove.

removedropdownlistentry

C int removedropdownlistentry (index, position)
Fortran function removedropdownlistentry (index, position)

Description

Removes a string from the specified drop down list.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier if the drop down list
position int integer The position in the list of the item to remove

Return Value

C int
Fortran integer

The number of entries in the list, or CONTROLS_ERROR if an error occurred.

removelistbox

C void removelistbox (index)
Fortran subroutine removelistbox (index)

Description

Removes the specified list box from the window

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the list box to remove.

removelistboxentry

C int removelistboxentry (index, position)
Fortran function removelistboxentry (index, position)

Description

Removes a string from the specified list box.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier if the list box
position int integer The position in the list of the item to remove

Return Value

C int
Fortran integer

The number of entries in the list, or CONTROLS_ERROR if an error occurred.

removemenu

C void removemenu (index)
Fortran subroutine removemenu (index)

Description

Removes the specified menu from the window. This call will also remove all children of a given menu, including menu items and other menus.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the menu to remove.

removemenuitem

C void removemenuitem (index)
Fortran subroutine removemenuitem (index)

Description

Removes the specified menu item from the window.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the menu item to remove.

removeradiobutton

C void removeradiobutton (index)
Fortran subroutine removeradiobutton (index)

Description

Removes the specified radio button from the window

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the radio button to remove.

removescrollbar

C void removescrollbar (index)
Fortran subroutine removescrollbar (index)

Description

Removes the specified scroll bar from the window.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the scroll bar to remove.

removetextbox

C void removetextbox (index)
Fortran subroutine removetextbox (index)

Description

Removes the specified text box from the window

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the text box to remove.

setbuttonposition

C void setbuttonposition (int index, int left, int top, int width, int height)
Fortran subroutine setbuttonposition (index, left, top, width, height)

Description

Sets the position and size of the specified button

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the button
left int integer The horizontal position of the left side of the button
top int integer The vertical position of the top of the button
width int integer The width of the button
height int integer The height of the button

setbuttontext

C void setbuttontext (int index, const char *txt)
Fortran subroutine setbuttontext (index, txt, perform_trim)

Description

Sets the text displayed on a button

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the button
txt const char * character(*), intent(in) The text to display on a button or NULL to clear the contents
perform_trim NA logical1 .TRUE. to perform a string trim operation, .FALSE. to use as-is

setcheckboxposition

C void setcheckboxposition (int index, int left, int top, int width, int height)
Fortran subroutine setcheckboxposition (index, left, top, width, height)

Description

Sets the position and size of the specified check box

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the check box
left int integer The horizontal position of the left side of the check box
top int integer The vertical position of the top of the check box
width int integer The width of the check box
height int integer The height of the check box

setcheckboxtext

C void setcheckboxtext (int index, const char *txt)
Fortran subroutine setcheckboxtext (index, txt, perform_trim)

Description

Sets the text displayed on a check box

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the check box
txt const char * character(*), intent(in) The text to display on a check box or NULL to clear the contents
perform_trim NA logical1 .TRUE. to perform a string trim operation, .FALSE. to use as-is

setdropdownlistposition

C void setdropdownlistposition (int index, int left, int top, int width, int height)
Fortran subroutine setdropdownlistposition (index, left, top, width, height)

Description

Sets the position and size of the specified drop down list

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the drop down list
left int integer The horizontal position of the left side of the drop down list
top int integer The vertical position of the top of the drop down list
width int integer The width of the drop down list
height int integer The height of the drop down list

setdropdownlistselection

C void setdropdownlistselection (int index, int entry)
Fortran subroutine setdropdownlistselection (index, entry)

Description

Sets the specified entry, zero-indexed, in a drop down list to be selected.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the drop down
entry int integer The zero-indexed of the item to select

setlistboxposition

C void setlistboxposition (int index, int left, int top, int width, int height)
Fortran subroutine setlistboxposition (index, left, top, width, height)

Description

Sets the position and size of the specified list box

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the list box
left int integer The horizontal position of the left side of the list box
top int integer The vertical position of the top of the list box
width int integer The width of the list box
height int integer The height of the list box

setlistboxselection

C void setlistboxselection (int index, int entry)
Fortran subroutine setlistboxselection (index, entry)

Description

Sets the specified entry, zero-indexed, in list box to selected, causing it to be highlighted. If the entry is a negative value, any selected item will be unselected.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the list box
entry int integer The zero-indexed of the item to select, or negative to select none

setradiobuttonposition

C void setradiobuttonposition (int index, int left, int top, int width, int height)
Fortran subroutine setradiobuttonposition (index, left, top, width, height)

Description

Sets the position and size of the specified radio button

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the radio button
left int integer The horizontal position of the left side of the radio button
top int integer The vertical position of the top of the radio button
width int integer The width of the radio button
height int integer The height of the radio button

setradiobuttontext

C void setradiobuttontext (int index, const char *txt)
Fortran subroutine setradiobuttontext (index, txt, perform_trim)

Description

Sets the text displayed on a radio button

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the radio button
txt const char * character(*), intent(in) The text to display on a radio button or NULL to clear the contents
perform_trim NA logical1 .TRUE. to perform a string trim operation, .FALSE. to use as-is

setscrollbarposition

C void setscrollbarposition (int index, int left, int top, int width, int height)
Fortran subroutine setscrollbarposition (index, left, top, width, height)

Description

Sets the position and size of the specified scroll bar

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the scroll bar
left int integer The horizontal position of the left side of the scroll bar
top int integer The vertical position of the top of the scroll bar
width int integer The width of the scroll bar
height int integer The height of the scroll bar

setscrollpagesize

C void setscrollpagesize (index, pageSize)
Fortran subroutine setscrollpagesize (index, pageSize)

Description

Sets the page size of a scroll bar. The page size is used when a user clicks within a scroll bar outside of the current position indicator.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the scroll bar
pageSize int integer The size of a “page” in the scrollbar

setscrollposition

C void setscrollposition (index, pos)
Fortran subroutine setscrollposition (index, pos)

Description

Sets the current position of the scroll bar within its range. If the value is outside the range, it is rounded to the maximum or minimum value as appropriate.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the scroll bar
pos int integer The position of the scroll bar

setscrollrange

C void setscrollrange (index, minPos, maxPos)
Fortran subroutine setscrollrange (index, minPos, maxPos)

Description

Sets the range of values over which the scroll bar can scroll. The left- or top-most position will return minPos, and the right- or bottom-most position will return maxPos.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the scroll bar
minPos int integer The minimum position value of the scroll bar
maxPos int integer The maximum position value of the scroll bar

settextboxcontents

C void settextboxcontents (index, text)
Fortran subroutine settextboxcontents (index, text)

Description

Sets the text to be displayed in a specified text box.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the text box
text const char * character(*) The text to display in the box. Fortran strings will be trimmed when setting the contents.

settextboxcursorposition

C void settextboxcursorposition (index, position)
Fortran subroutine settextboxcursorposition (index, position)

Description

Sets the cursor to the specified position within the text box

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the text box
position integer The position to which the cursor should be set

settextboxentercallback

C void settextboxentercallback (index, callback)
Fortran subroutine settextboxentercallback (index, callback)

Description

Sets a callback to be executed when the ENTER key is pressed while typing in a specified text box. The callback variable may be NULL to clear the callback.

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the text box
callback void callback( void ) subroutine callback() The procedure to call when the ENTER key is pressed

settextboxfocused

C void settextboxfocused (int index)
Fortran subroutine settextboxfocused (index)

Description

Sets the keyboard focus to the specified text box

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the text box

settextboxposition

C void settextboxposition (int index, int left, int top, int width, int height)
Fortran subroutine settextboxposition (index, left, top, width, height)

Description

Sets the position and size of the specified text box

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the text box
left int integer The horizontal position of the left side of the text box
top int integer The vertical position of the top of the text box
width int integer The width of the text box
height int integer The height of the text box

textboxselect

C void textboxselect (index, charcount)
Fortran subroutine textboxselect (index, charcount)

Description

Sets the selection within the specified text box to be the specified number of characters after the cursor

Parameters

Parameter C Type Fortran Type Description
index int integer The identifier for the text box
charcount integer The number of characters to select from the cursor

1 Optional named argument