manufacturer of I/O-rich SBCs, operator interfaces, handheld instruments, and development tools for embedded control low cost single board computers, embedded controllers, and operator interfaces for scientific instruments & industrial control development tools for embedded control order our low cost I/O-rich embedded control products embedded controller manufacturer profile single board computers & embedded controllers development tools & starter kits for your embedded design operator interfaces with touchscreens and graphical user interface plug-in expansion modules for digital & analog I/O C language & Forth language integrated development tools, IDE single board and embedded computer accessories embedded controller enclosures, bezels, environmental gaskets

The C Programmer’s Guide to the Mosaic Handheld

Table of Contents

PART 1 GETTING STARTED

Introduction. How to Use This Manual

Chapter 1: Getting to Know Your Handheld Instrument

Chapter 2: Powering Your Handheld

PART 2 PROGRAMMING THE MOSAIC HANDHELD

Chapter 3: Your First Program

Chapter 4: The IDE: Writing, Compiling, Downloading and Debugging Programs

Chapter 5: Making Effective Use of Memory

Chapter 6: Real Time Programming

Chapter 7: Failure and Run-Time Error Recovery

Chapter 8: Programming the Graphical User Interface

PART 3 COMMUNICATIONS, MEASUREMENT, AND CONTROL

Chapter 9: Digital and Timer-Controlled I/O

Chapter 10: Data Acquisition

Chapter 11: Serial Communications

Chapter 12: The Battery-Backed Real Time Clock

Chapter 13: Customizing the Handheld's I/O

PART 4: REFERENCE DATA

Appendix A: GUI Function Reference

Appendix B: Handheld Schematics

Glossary

<< Previous | Next >>

A     B     C     DF    G     H     I     K     LM    N     P     R     S    T    UVWXY   

void Schedule_Event(ulong event, ulong interval, ulong start, ulong stop)

Schedule_Event ( event xcfa \ interval \ start \ stop -- )

Type

Function

Input Parameters

event_xcfa         A 32 bit number that refers to the event procedure to be scheduled.

interval              A 32 bit number that specifies the interval that the event is to be executed in timeslice counts.

start                  A 32 bit number that specifies the absolute start time of the event in timeslice counts.

stop                  A 32 bit number that specifies the absolute stop time of the event in timeslice counts.

Description

A method that adds the specified event procedure to the GUI Toolkit’s endless execution loop so that it will be repeatedly executed.  The interval paramter specifies the how often the event procedure will be called.  The start parameter specifies when the event procedure will first be called; 0 indicates that the event procedure will start to be called immediately.  The stop parameter specifies when the event will no longer be called; 0 indicates that the event procedure will be called forever.  The units for the interval, start, and stop parameters are in timeslice counts or 5 millisecond units.  No error checking is performed.  If the event procedure reads, writes, or modifies any object or property of the GUI Toolkit, the first line of the event procedure must disable the servicing of events and the last line of the event procedure must re-enable the servicing of events to prevent data corruption.  Schedule Event should be used for non-critical event scheduling because events may be delayed by interrupt service routines and other tasks.  For critical event timing, use an interrupt service routine.

Usage

\\ Schedule an event to be repetitively called once every 5 seconds.

Schedule_Event ( battery_monitor_ptr, 1000, 0, 0);

/ Schedule an event to be repetitively called once every 5 seconds.

cfa.for Battery_Monitor 1000 u>d 0\0 0\0 Schedule_Event

Library

library.c

library.4th

See Also

Remove_Event

SCREEN

SCREEN

Type

Constant

Return Value

Integer

Description

The name of an object type used to create new screen objects whose data resides in the GUI heap as opposed to GUI Screens whose data resides in the RAM in the display controller.  Only GUI Screens can be made visible (using the VISIBLE property) and shown on the display.  Screens that reside in the heap are useful for applications with many screens; heap screens can be loaded at initialization and quickly copied to a GUI Screen in the display when needed using the Copy_Screen method.

Usage

screenHeap = New_Object ( SCREEN );

SCREEN New_Object screenHeap !

Library

library.c

library.4th

See Also

Copy_Screen, VISIBLE

SCREEN_ADDRESS

SCREEN_ADDRESS

Type

Constant

Return Value

Integer

Description

The name of a screen property that contains the extended address of the screen’s data buffer where images are drawn into.  This property is read only.

Usage

longAddress = Get_Property(GUI_SCREEN0, SCREEN_ADDRESS);

GUI_SCREEN0 SCREEN_ADDRESS Get_Property address 2!

Library

library.c

library.4th

SERVICE_EVENTS

SERVICE_EVENTS

Type

Constant

Return Value

Integer

Description

The name of a GUI Toolkit property that determines if keypad or timer events are serviced and event procedures are called. Possible contents of this property are the booleans GUI_TRUE and GUI_FALSE. SERVICE_EVENTS is set to GUI_TRUE by Initialize_GUI.

Usage

Set_Property(GUI_TOOLKIT, SERVICE_EVENTS, GUI_FALSE);

GUI_TOOLKIT SERVICE_EVENTS GUI_FALSE Set_Property

Library

library.c

library.4th

void Service_GUI_Events ( void )

Service_GUI_Events ( -- )

Type

Function

Description

A method that executes the user defined event procedures of action keys or the timer object.  In a typical application, this method must be included in a task, separate from the GUI Toolkit’s task, as part of the tasks infinite loop to service events generated from the keypad or the timer.

Usage

Service_GUI_Events();

Service_GUI_Events

Library

library.c

library.4th

SET

SET

SET

Type

Constant

Return Value

Long

Description

The name of a value of the PEN_TYPE property of the GUI_PEN object.  When the PEN_TYPE property of the GUI_PEN object is SET, the Draw method draws (as opposed to erases) a point or a line.

Usage

Set_Property(GUI_PEN, PEN_TYPE, SET);

GUI_PEN PEN_TYPE SET Set_Property

Library

library.c

library.4th

See Also

UNSET

void Set_Property ( uint object_reference, uint property, ulong value )

Set_Property( u1 \ u2 \ ud -- | u1 = object reference, u2 = property, ud = value )

Type

Function

Input Parameters

object_reference         A 16 bit variable that refers to the object whose property is being set.

property                    A 16 bit number that specifies the property to be set.

value                         A 32 bit number that specifies the value of the property.  All property values are 32 bits.

Description

A method used to set the value of a property of an object.  Possible errors include: INVALID_HEADER, INVALID_OBJECT, INVALID_PROPERTY, INVALID_GRAPHIC, INVALID_FONT, INVALID_TEXTBOX, HEIGHT_OUT_OF_RANGE, WIDTH_OUT_OF_RANGE.

Usage

Set_Property(GUI_PEN, PEN_TYPE, SET);

GUI_PEN PEN_TYPE SET Set_Property

Library

library.c

library.4th

See Also

Get_Property

SHAPE

SHAPE

Type

Constant

Return Value

Integer

Description

The name of a pen property that specifies the current shape drawn or erased by the Draw method.  Possible contents of this property are POINT and LINESHAPE is initialized to POINT by Initialize_GUI.

Usage

Set_Property(GUI_PEN, SHAPE, LINE);

GUI_PEN SHAPE LINE Set_Property

Library

library.c

library.4th

SHIFT_DOWN

SHIFT_DOWN

Type

Constant

Return Value

Long

Description

The name of a value of the SHIFT_STATE property of a keypad or the SHIFT_TYPE property of a shift key.  When a keypad is in the SHIFT_DOWN state, a pressed data entry key inserts the KEY_CODE stored in one of its SHIFT_DOWN_VALUE properties into the DATA_ENTRY_TEXTBOX.

Usage

If ( Get_Property ( GUI_KEYPAD0, SHIFT_STATE ) == SHIFT_DOWN )

{

  printf(“The shift state is down.\n”);

}

GUI_KEYPAD0 SHIFT_STATE Get_Property SHIFT_DOWN d=

if

  cr .” The shift state is down.”

endif

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, SHIFT_DOWN_VALUE, SHIFT_UP, SHIFT_NEUTRAL

SHIFT_DOWN_VALUE0

SHIFT_DOWN_VALUE0

Type

Constant

Return Value

Integer

Description

The name of a data entry key property that contains a key code that is added to the DATA_ENTRY_TEXTBOX when the data entry key is pressed, the shift state equals SHIFT_DOWN, and the remainder of the division of PRESS_NUMBER and NUM_SHIFT_DOWN_VALUES equals to 0. SHIFT_DOWN_VALUE0 is uninitialized when a data entry key is instantiated.

Usage

Set_Property ( dataentrykey9, SHIFT_DOWN_VALUE0, (long) ‘w’ );

dataentrykey9 @ SHIFT_DOWN_VALUE0 Ascii w u>d Set_Property

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, NUM_SHIFT_DOWN_VALUES, PRESS_NUMBER, SHIFT_DOWN

SHIFT_DOWN_VALUE1

SHIFT_DOWN_VALUE1

Type

Constant

Return Value

Integer

Description

The name of a data entry key property that contains a key code that is added to the DATA_ENTRY_TEXTBOX when the data entry key is pressed, the shift state equals SHIFT_DOWN, and the remainder of the division of PRESS_NUMBER and NUM_SHIFT_DOWN_VALUES equals to 1.  SHIFT_DOWN_VALUE1 is uninitialized when a data entry key is instantiated.

Usage

Set_Property ( dataentrykey9, SHIFT_DOWN_VALUE1, (long) ‘x’ );

dataentrykey9 @ SHIFT_DOWN_VALUE1 Ascii x u>d Set_Property

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, NUM_SHIFT_DOWN_VALUES, PRESS_NUMBER, SHIFT_DOWN

SHIFT_DOWN_VALUE2

SHIFT_DOWN_VALUE2

SHIFT_DOWN_VALUE2

Type

Constant

Return Value

Integer

Description

The name of a data entry key property that contains a key code that is added to the DATA_ENTRY_TEXTBOX when the data entry key is pressed, the shift state equals SHIFT_DOWN, and the remainder of the division of PRESS_NUMBER and NUM_SHIFT_DOWN_VALUES equals to 2.  SHIFT_DOWN_VALUE2 is uninitialized when a data entry key is instantiated.

Usage

Set_Property ( dataentrykey9, SHIFT_DOWN_VALUE2, (long) ‘y’ );

dataentrykey9 @ SHIFT_DOWN_VALUE2 Ascii y u>d Set_Property

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, NUM_SHIFT_DOWN_VALUES, PRESS_NUMBER, SHIFT_DOWN

SHIFT_DOWN_VALUE3

SHIFT_DOWN_VALUE3

Type

Constant

Return Value

Integer

Description

The name of a data entry key property that contains a key code that is added to the DATA_ENTRY_TEXTBOX when the data entry key is pressed, the shift state equals SHIFT_DOWN, and the remainder of the division of PRESS_NUMBER and NUM_SHIFT_DOWN_VALUES equals to 3.  SHIFT_DOWN_VALUE3 is uninitialized when a data entry key is instantiated.

Usage

Set_Property ( dataentrykey9, SHIFT_DOWN_VALUE3, (long) ‘z’ );

dataentrykey9 @ SHIFT_DOWN_VALUE3 Ascii z u>d Set_Property

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, NUM_SHIFT_DOWN_VALUES, PRESS_NUMBER, SHIFT_DOWN

SHIFT_DOWN_VALUE4

SHIFT_DOWN_VALUE4

Type

Constant

Return Value

Integer

Description

The name of a data entry key property that contains a key code that is added to the DATA_ENTRY_TEXTBOX when the data entry key is pressed, the shift state equals SHIFT_DOWN, and the remainder of the division of PRESS_NUMBER and NUM_SHIFT_DOWN_VALUES equals to 4.  SHIFT_DOWN_VALUE4 is uninitialized when a data entry key is instantiated.

Usage

Set_Property ( dataentrykey9, SHIFT_DOWN_VALUE4, (long) ‘w’ );

dataentrykey9 @ SHIFT_DOWN_VALUE4 Ascii w u>d Set_Property

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, NUM_SHIFT_DOWN_VALUES, PRESS_NUMBER, SHIFT_DOWN

SHIFT_EVENT_PROCEDURE

SHIFT_EVENT_PROCEDURE

Type

Constant

Return Value

Integer

Description

The name of a keypad property that contains the xcfa (extended code field address) of a user defined event procedure.  The event procedure is called after a shift key is pressed.  The event procedure can not take or return any parameters, but it can modify variables. The SHIFT_EVENT_PROCEDURE property is unitialized when Initialize_GUI is called.

Usage

Set_Property ( GUI_KEYPAD0, SHIFT_EVENT_PROCEDURE,  (long)

    delete_event_procedure_ptr );

GUI_KEYPAD0 SHIFT_EVENT_PROCEDURE cfa.for Delete_Event_Procedure

    Set_Property

Library

library.c

library.4th

SHIFT_KEY

SHIFT_KEY

Type

Constant

Return Value

Integer

Description

The name of an object type used to create a new shift key object.  Shift keys are used to set the shift state of a keypad. Once a shift key is instantiated, it’s SHIFT_TYPE property must be set using the Set_Property method.  Valid values of the shift type are SHIFT_DOWN, SHIFT_NEUTRAL, and SHIFT_UP.

Usage

shiftkey = New_Object( SHIFT_KEY );

Set_Property ( shiftkey, SHIFT_TYPE, SHIFT_UP );

SHIFT_KEY New_Object shiftkey !

shiftkey @ SHIFT_TYPE SHIFT_UP Set_Property

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, SHIFT_TYPE

SHIFT_NEUTRAL

SHIFT_NEUTRAL

Type

Constant

Return Value

Long

Description

The name of a value of the SHIFT_STATE property of a keypad or SHIFT_TYPE property of a shift key.  When a keypad is in the SHIFT_NEUTRAL state, a pressed data entry key inserts the KEY_CODE stored in its SHIFT_NEUTRAL_VALUE property into the DATA_ENTRY_TEXTBOX.

Usage

If ( Get_Property ( GUI_KEYPAD0, SHIFT_STATE ) == SHIFT_NEUTRAL )

{

  printf(“The shift state is neutral.\n”);

}

GUI_KEYPAD0 SHIFT_STATE Get_Property SHIFT_NEUTRAL d=

if

  cr .” The shift state is neutral.”

endif

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, SHIFT_NEUTRAL_VALUE, SHIFT_UP, SHIFT_DOWN

SHIFT_NEUTRAL_VALUE

SHIFT_NEUTRAL_VALUE

Type

Constant

Return Value

Integer

Description

The name of a data entry key property that contains a key code that is added to the DATA_ENTRY_TEXTBOX when the data entry key is pressed and the shift state equals SHIFT_NEUTRAL. SHIFT_NEUTRAL_VALUE is uninitialized when a data entry key is instantiated.

Usage

Set_Property ( dataentrykey9, SHIFT_NEUTRAL_VALUE, (long) ‘9’ );

dataentrykey9 @ SHIFT_NEUTRAL_VALUE Ascii 9 u>d Set_Property

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE

SHIFT_STATE

SHIFT_STATE

Type

Constant

Return Value

Integer

Description

The name of a keypad property that contains the current shift state.  The valid shift states are SHIFT_UP, SHIFT_DOWN, and SHIFT_NEUTRAL.

Usage

Set_Property(GUI_KEYPAD0, SHIFT_STATE, SHIFT_NEUTRAL);

GUI_KEYPAD0 SHIFT_STATE SHIFT_NEUTRAL Get_Property

Library

library.c

library.4th

See Also

SHIFT_UP, SHIFT_NEUTRAL, SHIFT_DOWN

SHIFT_STATE_TEXTBOX

SHIFT_STATE_TEXTBOX

Type

Constant

Return Value

Integer

Description

The name of a keypad property that contains the object reference to a textbox that contains a shift string depending on the SHIFT_STATE. The default shift strings are “Shift Up”, “Shift Neutral”, or “Shift Down”. Once a textbox is associated with a keypad, the textbox is loaded on to the VISIBLE screen, and a SHIFT_KEY is pressed, the appropriate shift string is written into the textbox and the string is shown on the display (the textbox on the screen is automatically refreshed).  The SHIFT_STATE_TEXTBOX property of a keypad is unitialized when Initialize_GUI is called.

Usage

Set_Property ( GUI_KEYPAD0, SHIFT_STATE_TEXTBOX, (long) textboxShift );

GUI_KEYPAD0 SHIFT_STATE_TEXTBOX textboxShift @ u>d Set_Property

Library

library.c

library.4th

See Also

SHIFT_KEY, SHIFT_STATE, VISIBLE

SHIFT_TOGGLE

SHIFT_TOGGLE

Type

Constant

Return Value

Integer

Description

The name of a shift key property that controls whether or not the shift key toggles between SHIFT_NEUTRAL and the SHIFT_STATE stored in the object’s SHIFT_TYPE property. SHIFT_TOGGLE is set to GUI_FALSE when a shift key is instantiated.

Usage

Set_Property ( shiftkeyUp, SHIFT_TOGGLE, GUI_TRUE );

shiftkeyUp @ SHIFT_TOGGLE GUI_TRUE Set_Property

Library

library.c

library.4th

See Also

SHIFT_NEUTRAL, SHIFT_STATE, SHIFT_TYPE

SHIFT_TYPE

SHIFT_TYPE

Type

Constant

Return Value

Integer

Description

The name of a shift key property that specifies the shift type for the key.  Valid value are: SHIFT_UP, SHIFT_NEUTRAL, and SHIFT_DOWN. SHIFT_TYPE is initialized to SHIFT_NEUTRAL when a shift key is instantiated.

Usage

Set_Property ( shiftkeyUp, SHIFT_TYPE, SHIFT_UP );

shiftkeyUp @ SHIFT_TYPE SHIFT_UP Set_Property

Library

library.c

library.4th

See Also

SHIFT_UP, SHIFT_NEUTRAL, SHIFT_DOWN

SHIFT_UP

SHIFT_UP

Type

Constant

Return Value

Long

Description

The name of a value of the SHIFT_STATE property of a keypad or the SHIFT_TYPE property of a shift key.  When a keypad is in the SHIFT_UP state, a pressed data entry key inserts the KEY_CODE stored in one of its SHIFT_UP_VALUE properties into the DATA_ENTRY_TEXTBOX.

Usage

If ( Get_Property ( GUI_KEYPAD0, SHIFT_STATE ) == SHIFT_UP )

{

  printf(“The shift state is up.\n”);

}

GUI_KEYPAD0 SHIFT_STATE Get_Property SHIFT_UP d=

if

  cr .” The shift state is up.”

endif

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, SHIFT_UP_VALUE, SHIFT_DOWN, SHIFT_NEUTRAL

SHIFT_UP_VALUE0

SHIFT_UP_VALUE0

Type

Constant

Return Value

Integer

Description

The name of a data entry key property that contains a key code that is added to the DATA_ENTRY_TEXTBOX when the data entry key is pressed, the shift state equals SHIFT_UP, and the remainder of the division of PRESS_NUMBER and NUM_SHIFT_UP_VALUES equals to 0. SHIFT_UP_VALUE0 is uninitialized when a data entry key is instantiated.

Usage

Set_Property ( dataentrykey9, SHIFT_UP_VALUE0, (long) ‘W’ );

dataentrykey9 @ SHIFT_UP_VALUE0 Ascii W u>d Set_Property

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, NUM_SHIFT_UP_VALUES, PRESS_NUMBER, SHIFT_UP

SHIFT_UP_VALUE1

SHIFT_UP_VALUE1

Type

Constant

Return Value

Integer

Description

The name of a data entry key property that contains a key code that is added to the DATA_ENTRY_TEXTBOX when the data entry key is pressed, the shift state equals SHIFT_UP, and the remainder of the division of PRESS_NUMBER and NUM_SHIFT_UP_VALUES equals to 1. SHIFT_UP_VALUE1 is uninitialized when a data entry key is instantiated.

Usage

Set_Property ( dataentrykey9, SHIFT_UP_VALUE0, (long) ‘X’ );

dataentrykey9 @ SHIFT_UP_VALUE0 Ascii X u>d Set_Property

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, NUM_SHIFT_UP_VALUES, PRESS_NUMBER, SHIFT_UP

SHIFT_UP_VALUE2

SHIFT_UP_VALUE2

Type

Constant

Return Value

Integer

Description

The name of a data entry key property that contains a key code that is added to the DATA_ENTRY_TEXTBOX when the data entry key is pressed, the shift state equals SHIFT_UP, and the remainder of the division of PRESS_NUMBER and NUM_SHIFT_UP_VALUES equals to 2. SHIFT_UP_VALUE2 is uninitialized when a data entry key is instantiated.

Usage

Set_Property ( dataentrykey9, SHIFT_UP_VALUE2, (long) ‘Y’ );

dataentrykey9 @ SHIFT_UP_VALUE2 Ascii Y u>d Set_Property

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, NUM_SHIFT_UP_VALUES, PRESS_NUMBER, SHIFT_UP

SHIFT_UP_VALUE3

SHIFT_UP_VALUE3

Type

Constant

Return Value

Integer

Description

The name of a data entry key property that contains a key code that is added to the DATA_ENTRY_TEXTBOX when the data entry key is pressed, the shift state equals SHIFT_UP, and the remainder of the division of PRESS_NUMBER and NUM_SHIFT_UP_VALUES equals to 3. SHIFT_UP_VALUE3 is uninitialized when a data entry key is instantiated.

Usage

Set_Property ( dataentrykey9, SHIFT_UP_VALUE3, (long) ‘Z’ );

dataentrykey9 @ SHIFT_UP_VALUE3 Ascii Z u>d Set_Property

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, NUM_SHIFT_UP_VALUES, PRESS_NUMBER, SHIFT_UP

SHIFT_UP_VALUE4

SHIFT_UP_VALUE4

Type

Constant

Return Value

Integer

Description

The name of a data entry key property that contains a key code that is added to the DATA_ENTRY_TEXTBOX when the data entry key is pressed, the shift state equals SHIFT_UP, and the remainder of the division of PRESS_NUMBER and NUM_SHIFT_UP_VALUES equals to 4. SHIFT_UP_VALUE4 is uninitialized when a data entry key is instantiated.

Usage

Set_Property ( dataentrykey9, SHIFT_UP_VALUE4, (long) ‘W’ );

dataentrykey9 @ SHIFT_UP_VALUE4 Ascii W u>d Set_Property

Library

library.c

library.4th

See Also

DATA_ENTRY_KEY, DATA_ENTRY_TEXTBOX, KEY_CODE, NUM_SHIFT_UP_VALUES, PRESS_NUMBER, SHIFT_UP

STANDARD_FONT

STANDARD_FONT

Type

Constant

Return Value

Integer

Description

The name of a GUI Toolkit property that contains the object reference for the font used to render the string in a textbox.  When Initialize_GUI is called, STANDARD_FONT is set GUI_FONT which is a proportional font (i.e. the widths of each character vary depending on the character) with a height of 10 pixels.  By changing the value of STANDARD_FONT, all subsequently created textboxes will use the new font to render text (the value of the TEXTBOX_FONT property will be set to use the new font).

Usage

Set_Property(GUI_TOOLKIT, STANDARD_FONT, (ulong) fontCustom);

GUI_TOOLKIT STANDARD_FONT fontCustom @ u>d Set_Property

Library

library.c

library.4th

See Also

GUI_FONT, TEXTBOX_FONT

STRING_LENGTH

STRING_LENGTH

Type

Constant

Return Value

Integer

Description

The name of a read only textbox property that contains the number of characters contained in the string in the textbox. 

Usage

len = Get_Property ( textboxString, STRING_LENGTH );

textboxString @ STRING_LENGTH Get_Property len 2!

Library

library.c

library.4th

STRING_LINES

STRING_LINES

Type

Constant

Return Value

Integer

Description

The name of a read only textbox property that contains the number of lines the string in the textbox occupies when rendered. Based on the number of characters in the string and the width of the textbox.

Usage

num_lines = Get_Property ( textboxString, STRING_LINES );

textboxString @ STRING_LINES Get_Property num_lines 2!

Library

library.c

library.4th

void STRING_TO_TEXTBOX ( uint textbox_reference, char *string )

String_To_Textbox ( u1 \ x$addr -- | u1 = textbox reference, x$addr = string to write into textbox )

Type

Macro

Function

Input Parameters

textbox_reference       A 16 bit value referring to the textbox that the string is written to.

string                        Pointer to a character string that is to be written into the textbox.

string      The extended string address of the string that is to be written into the textbox.

Description

A method that writes a string into a textbox.  STRING_TO_TEXTBOX overwrites any previous string data.  To add or delete characters to the end of the string, use the Add_Character and Delete_Character methods.  Errors include: HEAP_FULL, HEIGHT_OUT_OF_RANGE, INVALID_TEXTBOX, WIDTH_OUT_OF_RANGE.

Usage

STRING_TO_TEXTBOX(textboxInfo,”Hello World”);

textboxInfo @ “ Hello World” String_To_Textbox

Library

library.c

library.4th

See Also

Add_Character, Delete_Character, Textbox_To_String

<< Previous | Next >>


Home|Site Map|Products|Manuals|Resources|Order|About Us
Copyright (c) 2006 Mosaic Industries, Inc.
Your source for single board computers, embedded controllers, and operator interfaces for instruments and automation