The LAMP Application

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

lamp_mac/FIGARO/

input_field.pro


:Description: Takes a string and turns it into a number, depending upon the required data type. :Params: inputValue : in, required, type="str" dataType : in, required :Returns: The number resulting from the conversion of the input string. 'NULLVALUE' if the conversion failed. :Author: fanning :History: fanning, 17 Nov. 1999 pellegrini, 22 Feb. 2011 :Categories: gui :private:

Class description for input_field

Fields

Fields in input_field

TOP 0L
ID 0L
HANDLER 0L
VALUE ptr_new()
TYPE ''

Routines

result = input_field_returnvalue(inputValue, dataType)
result = input_field_validate(value, dataType, decimal=decimal, digits=digits, positive=positive)

input_field__define
input_field_kill_notify, id

input_field_set_value, cw_tlb, value

result = input_field_get_value(cw_tlb)

input_field_event_handler, event

result = input_field(parent, column=column, cr_only=cr_only, digits=digits, decimal=decimal, doublevalue=doublevalue, event_func=event_func, event_pro=event_pro, fieldFont=fieldFont, floatvalue=floatvalue, frame=frame, integervalue=integervalue, labelfont=labelfont, labelsize=labelsize, longvalue=longvalue, positive=positive, row=row, scr_xSize=scr_xSize, scr_ySize=scr_ySize, stringvalue=stringvalue, title=title, uname=uname, uvalue=uvalue, value=value, xsize=xsize)

Routine details

top input_field_returnvalue

result = input_field_returnvalue(inputValue, dataType)

Parameters

inputValue
dataType

top input_field_validate

result = input_field_validate(value, dataType, decimal=decimal, digits=digits, positive=positive)

:Description: Eliminates illegal characters from a string that represents a number. The return value is a properly formatted string that can be turned into an INT, LONG, FLOAT, or DOUBLE value. :Params: value : in, optional, type="str" The input string. Default = "" dataType : in, optional, type="str" The output type. Default = "STRING" :Keywords: decimal : in, optional, type="int" The number of decimal in case of a floating-string. digits : in, optional, type="int" The number of digits in case of a integer-string. positive : in, required, type="bool" If set, treat the string as positive number. :Returns: The formatted string. :Author: fanning :History: fanning, 17 Nov. 1999 pellegrini, 22 févr. 2011 :Categories: strings

Parameters

value
dataType

Keywords

decimal
digits
positive

top input_field__define

input_field__define

top input_field_kill_notify

input_field_kill_notify, id

:Description: Cleans up the pointer when the compound widget is destroyed. :Params: id : in, required, type="int" The compound widget id. :Author: fanning :History: fanning, 17 Nov. 1999 pellegrini, 22 Feb. 2011 :Categories: gui :private:

Parameters

id

top input_field_set_value

input_field_set_value, cw_tlb, value

:Description: Sets a value for the compound widget. The value is a value appropriate for the data type or a string. :Params: cw_tlb : in, required, type="int" The id of the compound widget. value : in, required, type="any" The value to set the input field with. :Author: fanning :History: fanning, 17 Nov. 1999 pellegrini, 22 Feb. 2011 :Categories: gui :private:

Parameters

cw_tlb
value

top input_field_get_value

result = input_field_get_value(cw_tlb)

:Description: This function returns the numerical or string value of the input field. :Params: cw_tlb : in, required, type="int" The id of the compound widget. :Returns: The input stored by the input field. :Author: fanning :History: fanning, 17 Nov. 1999 pellegrini, 22 Feb. 2011 :Categories: gui :private:

Parameters

cw_tlb

top input_field_event_handler

input_field_event_handler, event

:Description: The main event handler for the input field. :Params: event : in, required, type="struct" The IDL event structure. :Author: fanning :History: fanning, 17 Nov. 1999 pellegrini, 22 Feb. 2011 :Categories: gui :private:

Parameters

event

top input_field

result = input_field(parent, column=column, cr_only=cr_only, digits=digits, decimal=decimal, doublevalue=doublevalue, event_func=event_func, event_pro=event_pro, fieldFont=fieldFont, floatvalue=floatvalue, frame=frame, integervalue=integervalue, labelfont=labelfont, labelsize=labelsize, longvalue=longvalue, positive=positive, row=row, scr_xSize=scr_xSize, scr_ySize=scr_ySize, stringvalue=stringvalue, title=title, uname=uname, uvalue=uvalue, value=value, xsize=xsize)

:Description: The purpose of this compound widget is to provide an alternative to the CW_FIELD widget offered in the IDL distribution. What has always annoyed me about CW_FIELD is that the text widgets do not look editable to the users on Windows platforms. This program corrects that deficiency and adds some features that I think would be helpful. For example, you can now assign an event handler to the compound widget. All events are handled internally unless either the Event_Pro or Event_Func keywords are used to assign an event handler to the compound widget. By default all events generated by the text widget are passed to the assigned event handler. If you wish to receive only Carriage Return events, set the CR_Only keyword. event = { INPUT_FIELD , $ ; The name of the event structure. ID: 0L , $ ; The ID of the compound widget's top-level base. TOP: 0L , $ ; The widget ID of the top-level base of the hierarchy. HANDLER: 0L , $ ; The event handler ID. Filled out by IDL. Value: Ptr_New(), $ ; A pointer to the widget value. Type:"" ; A string indicating the type of data in the VALUE field. } ; Values are "INT", "LONG", "FLOAT", "DOUBLE", or "STRING". :Params: parent : in, required, type="long" The parent widget ID of the compound widget :Keywords: Column : in, optional, type="bool" Set this keyword to have the Label Widget above the Text Widget. CR_Only : in, optional, type="bool" Set this keyword if you only want Carriage Return events. If this keyword is not set, all events are returned. No events are returned unless the EVENT_PRO or EVENT_FUNC keywords are used. Digits : in, optional, type="int" Set this keyword to the number of digits permitted in INTERGERVALUE and LONGVALUE numbers. Decimal : in, optional, type="int" Set this keyword to the number of digits to the right of the decimal point in FLOATVALUE and DOUBLEVALUE numbers. DoubleValue : in, optional, type="bool" Set this keyword if you want DOUBLE values returned. Event_Func : in, optional, type="str" Set this keyword to the name of an Event Function. If this keyword is undefined and the Event_Pro keyword is undefined, all compound widget events are handled internally and not passed on to the parent widget. Event_Pro : in, optional, type="str" Set this keyword to the name of an Event Procedure. If this keyword is undefined and the Event_Func keyword is undefined, all compound widget events are handled internally and not passed on to the parent widget. FieldFont : in, optional, type="font str" The font name for the text in the Text Widget. FloatValue : in, optional, type="bool" Set this keyword for FLOAT values. Frame : in, optional, type="bool" Set this keyword to put a frame around the compound widget. IntegerValue : i, optional, type="bool" Set this keyword for INTEGER values. LabelFont : in, optional, type="font str" The font name for the text in the Label Widget. LabelSize : in, optional, type="int" The X screen size of the Label Widget. LongValue : in, required, type="bool" Set this keyword for LONG values. Positive Row : in, optional, type="bool" Set this keyword to have the Label beside the Text Widget. (The default.) Scr_XSize : in, optional, type="int" The X screen size of the compound widget. Scr_YSize : in, optional, type="int" The Y screen size of the compound widget. StringValue : in, optional, type="bool" Set this keyword for STRING values. (The default.) Title : in, required, type="str" The text to go on the Label Widget. UName : in, optional, type="str" The widget uname. UValue : in, optional, type="any" A user value for any purpose. Value : in, optional, type="any" The "value" of the compound widget. XSize : in, optional, type="int" The X size of the Text Widget. :Returns: The widget id. :Author: fanning :History: fanning, 17 Nov. 1999 pellegrini, 22 févr. 2011 :Categories: widgets :private:

Parameters

parent

Keywords

column
cr_only
digits
decimal
doublevalue
event_func
event_pro
fieldFont
floatvalue
frame
integervalue
labelfont
labelsize
longvalue
positive
row
scr_xSize
scr_ySize
stringvalue
title
uname
uvalue
value
xsize

File attributes

Modification date: Tue Oct 1 14:42:05 2013
Lines: 701