User:Jcreer/SMS:DMI Widgets and Dialogs Elements: Difference between revisions
No edit summary |
No edit summary |
||
Line 196: | Line 196: | ||
</card> | </card> | ||
</item> | </item> | ||
|} | |||
=====Element ''<control_density>''===== | |||
{|class="wikitable" | |||
|- | |||
|width="70"|'''Info''' | |||
|width="530"| Displays an edit box and combo box. Combo box can contain kg/m^3, gr/cm^3, lb/ft^3. Possible outputs are value and units. | |||
Keywords: | |||
* #MPV_MG_PER_L | |||
* #MPV_G_PER_L | |||
* #MPV_KG_PER_CU_M | |||
* #MPV_G_PER_CU_CM | |||
* #MPV_LB_PER_CU_FT | |||
|- | |||
|'''Versions''' | |||
|1 (<custom_control_XXXX>), 2 | |||
|- | |||
|'''Attributes''' | |||
|none | |||
|- | |||
|'''Children''' | |||
|width="530"| [[SMS:Dynamic Model Interface Schema#Element <option>|option]], [[SMS:Dynamic Model Interface Schema#Element <unique_name>|unique_name]], [[SMS:Dynamic Model Interface Schema#Element <dependency>|dependency]], [[SMS:Dynamic Model Interface Schema#Element <range>|range]], [[SMS:Dynamic Model Interface Schema#Element <default>|default]], [[SMS:Dynamic Model Interface Schema#Element <text_style>|text_style]] | |||
|- | |||
|'''Used by''' | |||
| [[SMS:Dynamic Model Interface Schema#Element <item>|item]], [[SMS:Dynamic Model Interface Schema#Element <row>|row]], [[SMS:Dynamic Model Interface Schema#Element <column>|column]] | |||
|- | |||
|'''Example''' | |||
|width="530"| | |||
Displays kg/m^3 and lb/ft^3 in combo box. If kg/m^3 selected and exported, returns the text “kg m”. | |||
<item> | |||
<text>Density </text> | |||
<control_density> | |||
<option> | |||
<text>kg/m^3</text> | |||
<export_text>kg m</export_text> | |||
<unit_keyword>#MPV_KG_PER_CU_M</unit_keyword> | |||
</option> | |||
<option> | |||
<text>lb_ft^3</text> | |||
<export_text>lbs ft</export_text> | |||
<unit_keyword>#MPV_LB_PER_CU_FT</unit_keyword> | |||
</option> | |||
</control_density> | |||
… | |||
|} | |} |
Revision as of 15:13, 3 March 2015
Element <check_box>
Info | Widget that displays text that is checked/unchecked. |
Versions | 1, 2 |
Attributes | none |
Children | text, default, unique_name, dependency, export_text_checked, export_text_unchecked, text_style |
Used by | item |
Example |
<check_box> <text>Calculate Sediment Transport</text> <default>checked</default> <unique_name>togCalcSedimentTransport</unique_name> <export_text_checked>ON</export_text_checked> <export_text_unchecked>OFF</export_text_unchecked> <dependency>…</dependency>… </ check_box > |
Element <combo_box>
Info |
Widget that displays list of options. Only 1 can be selected. If no default is specified and the optional tag is present, then an empty option will be added to the combo box. If there is no default tag, and no optional tag, then the first item will be default. In version 2, if a combo box has display_options_arc, and is part of a dialog that is used as an arc attribute, then a limited set of display options will appear for the options of the combo box. The display option for each option of the combo box will only be line thickness and color. The display option is NOT saved at any point and will be reset every time SMS is opened. |
Versions | 1, 2 |
Attributes | none |
Children | option, unique_name, optional, dependency, text_style, display_options_arc |
Used by | item, row, column |
Example | Creates a combo box with hours, minutes and seconds. Hours is the default item.
<combo_box> <unique_name>cbxTransportUnits</unique_name> <option> <text>hours</text> <default></default> </option> <option> <text>minutes</text> </option> <option> <text>seconds</text> </option> <dependency>…</dependency>… </ combo_box > |
Element <control_curve>
Info | Displays an curve push button. When pushed the xy curve values can be updated and a curve is displayed. |
Versions | 2 |
Attributes | none |
Children | max_rows, flags, x_column, y_column, unique_name, dependency |
Used by | item, row, column |
Example | This example creates a curve limited to 10 rows.
<item> <control_curve> <unique_name>myCurve1</unique_name> <max_rows>10</max_rows> <flags>XY_USEDATE</flags> <x_column> <text>Time </x_column> <y_column> <text>Velocity</text> </y_column> </control_curve> … |
Element <control_dataset>
Info |
Displays an edit box, and push buttons for select, delete and create. Once selected, the dataset string is placed into the edit box. <dataset_type> can be scalar or vector. Possible keyword outputs are file_name (which is the name of the dataset without path), geom_name, and file_path (full path c:\somewhere) and sms_path. |
Versions | 1 (<custom_control_XXXX>), 2 |
Attributes | none |
Children | push_button, dataset_type, unique_name, dependency, default, dataset_name, text_style, use_parameter |
Used by | item, row, column |
Example | This example creates the custom control with only the select and delete buttons.
<item> <control_dataset> <push_button>select<push_button> <push_button>delete</push_button> <dataset_type>scalar</dataset_type> </control_dataset> |
Element <control_date>
Info | Displays date and time selector, where a date can be selected. Possible output is value, which will be the date formatted as specified in SMS preferences. Possible outputs are year, month, day, hour, minute, second.
Keywords:
|
Versions | 1 (<custom_control_XXXX>), 2 |
Attributes | none |
Children | unique_name, dependency, default, text_style |
Used by | item, row, column |
Example |
<item> <text>Start date</text> <control_date> <unique_name>edtDate</unique_name> </control_date> <card> <card_name>DATE</card_name> <export_format>"%s Day:%s Month:%s Year:%s Hour:%s Minute%s Second:%s\n", #card_name, edtDate#DAY_DIGIT, edtDate#MONTH_LONG_NAME, edtDate#YEAR_4, edtDate#HOUR_24, edtDate#MINUTE_ZERO, edtDate#SECOND_ZERO</export_format> </card> </item> |
Element <control_density>
Info | Displays an edit box and combo box. Combo box can contain kg/m^3, gr/cm^3, lb/ft^3. Possible outputs are value and units.
Keywords:
|
Versions | 1 (<custom_control_XXXX>), 2 |
Attributes | none |
Children | option, unique_name, dependency, range, default, text_style |
Used by | item, row, column |
Example |
Displays kg/m^3 and lb/ft^3 in combo box. If kg/m^3 selected and exported, returns the text “kg m”. <item> <text>Density </text> <control_density> <option> <text>kg/m^3</text> <export_text>kg m</export_text> <unit_keyword>#MPV_KG_PER_CU_M</unit_keyword> </option> <option> <text>lb_ft^3</text> <export_text>lbs ft</export_text> <unit_keyword>#MPV_LB_PER_CU_FT</unit_keyword> </option> </control_density> … |