iup_grid_box.e 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722
  1. class IUP_GRID_BOX
  2. -- Creates a void container for composing elements in a regular grid. It is a
  3. -- box that arranges the elements it contains from top to bottom and from left
  4. -- to right, but can distribute the elements in lines or in columns.
  5. --
  6. -- The child elements are added to the control just like a vbox and hbox,
  7. -- sequentially. Then they are distributed accordingly the attributes
  8. -- ORIENTATION and NUMDIV. When ORIENTATION=HORIZONTAL children are distributed
  9. -- from left to right on the first line until NUMDIV, then on the second line,
  10. -- and so on. When ORIENTATION=VERTICAL children are distributed from top to
  11. -- bottom on the first column until NUMDIV, then on the second column, and so
  12. -- on. The number of lines and the number of columns can be easily obtained
  13. -- from the combination of these attributes.
  14. --
  15. -- Notice that the total number of spaces can be larger than the number of
  16. -- actual children, the last line or column can be incomplete.
  17. --
  18. -- The column sizes will be based only on the width of the children of the
  19. -- reference line, usually line 0. The line sizes will be based only on the
  20. -- height of the children of the reference column, usually column 0.
  21. inherit
  22. IUP_CONTAINER
  23. IUP_WIDGET_EXPAND
  24. IUP_WIDGET_WID
  25. IUP_WIDGET_SIZE
  26. IUP_WIDGET_RASTERSIZE
  27. IUP_WIDGET_USERSIZE
  28. IUP_WIDGET_FONT
  29. IUP_WIDGET_CLIENTSIZE
  30. IUP_WIDGET_CLIENTOFFSET
  31. IUP_WIDGET_POSITION
  32. IUP_WIDGET_MAXMIN_SIZE
  33. IUP_WIDGET_CHILD
  34. IUP_WIDGET_NAME
  35. IUP_WIDGET_CUSTOM_ATTRIBUTES
  36. create {ANY}
  37. grid_box_empty,
  38. grid_box
  39. feature {ANY}
  40. grid_box_empty
  41. -- Create an empty grid box.
  42. local
  43. p, a_grid_box: POINTER
  44. do
  45. a_grid_box := int_grid_box_empty (p)
  46. set_widget(a_grid_box)
  47. end
  48. grid_box (col: ARRAY[IUP_WIDGET])
  49. -- Create a new grid box containing the list of widgets.
  50. local
  51. iterator: ITERATOR[IUP_WIDGET]; i: INTEGER; arg: NATIVE_ARRAY[POINTER]; s: IUP_WIDGET; a_grid_box: POINTER
  52. do
  53. i := col.count
  54. arg := arg.calloc(i)
  55. iterator := col.new_iterator
  56. i := 0
  57. from
  58. iterator.start
  59. until
  60. iterator.is_off
  61. loop
  62. s := iterator.item
  63. arg.put(s.widget, i)
  64. iterator.next
  65. i := i + 1
  66. end
  67. a_grid_box := int_grid_box (arg.to_external)
  68. set_widget(a_grid_box)
  69. end
  70. -- Commands to handle attributes.
  71. set_alignment_line (value: STRING)
  72. -- Vertically aligns the elements within each line. Possible values:
  73. -- "ATOP", "ACENTER", "ABOTTOM". Default: "ATOP".
  74. -- (non inheritable)
  75. require
  76. valid_lin: is_valid_alignment_lin(value)
  77. do
  78. iup_open.set_attribute(Current, "ALIGNMENTLIN", value)
  79. end
  80. get_alignment_line: STRING
  81. -- Return the vertical align of the elements within each line.
  82. do
  83. Result := iup_open.get_attribute(Current, "ALIGNMENTLIN")
  84. end
  85. set_alignment_for_line (value: STRING; line: INTEGER)
  86. -- Set the alignment of a single line.
  87. require
  88. valid_lin: is_valid_alignment_lin(value)
  89. line >= 0
  90. local
  91. str: STRING
  92. do
  93. str := "ALIGNMENTLIN" + line.to_string
  94. iup_open.set_attribute(Current, str, value)
  95. end
  96. get_alignment_for_line (line: INTEGER): STRING
  97. -- Return the alignment used at the line.
  98. require
  99. line >= 0
  100. local
  101. str: STRING
  102. do
  103. str := "ALIGNMENTLIN" + line.to_string
  104. Result := iup_open.get_attribute(Current, str)
  105. end
  106. set_alignment_column (value: STRING)
  107. -- Horizontally aligns the elements within each column. Possible values:
  108. -- "ALEFT", "ACENTER", "ARIGHT". Default: "ALEFT".
  109. -- (non inheritable)
  110. require
  111. valid_col: is_valid_alignment_col(value)
  112. do
  113. iup_open.set_attribute(Current, "ALIGNMENTCOL", value)
  114. end
  115. get_alignment_column: STRING
  116. -- Return the horizontal align of the elements within each line.
  117. do
  118. Result := iup_open.get_attribute(Current, "ALIGNMENTCOL")
  119. end
  120. set_alignment_for_column (value: STRING; col: INTEGER)
  121. -- Set the alignment of a single column.
  122. require
  123. valid_col: is_valid_alignment_col(value)
  124. col >= 0
  125. local
  126. str: STRING
  127. do
  128. str := "ALIGNMENTCOL" + col.to_string
  129. iup_open.set_attribute(Current, str, value)
  130. end
  131. get_alignment_for_column (col: INTEGER): STRING
  132. -- Return the alignment used at the column.
  133. require
  134. col >= 0
  135. local
  136. str: STRING
  137. do
  138. str := "ALIGNMENTCOL" + col.to_string
  139. Result := iup_open.get_attribute(Current, str)
  140. end
  141. set_expand_children (value: STRING)
  142. -- Forces all children to expand in the given direction and to fully
  143. -- occupy its space available inside the box. Can be YES (both
  144. -- directions), HORIZONTAL, VERTICAL or NO. Default: "NO". This has the
  145. -- same effect as setting EXPAND on each child.
  146. -- (non inheritable).
  147. require
  148. valid_expand_children: is_valid_expand_children(value)
  149. do
  150. iup_open.set_attribute(Current, "EXPANDCHILDREN", value)
  151. end
  152. get_expand_children: STRING
  153. -- Return the value of the used expand children.
  154. do
  155. Result := iup_open.get_attribute(Current, "EXPANDCHILDREN")
  156. end
  157. set_fit_to_children_at_line (line: INTEGER)
  158. -- (write-only) Set the RASTERSIZE attribute of the reference element in
  159. -- the given line, so that it will fit the highest element in the line.
  160. -- Can only be set after the layout of the dialog has been calculated at
  161. -- least 1 time. If FITMAXWIDTHn or FITMAXHEIGHTn are set for the line
  162. -- they are used as maximum limit for the size.
  163. require
  164. line > 0
  165. local
  166. str: STRING
  167. do
  168. str := "L" + line.to_string
  169. iup_open.set_attribute(Current, "FITTOCHILDREN", str)
  170. end
  171. set_fit_to_children_at_column (column: INTEGER)
  172. -- (write-only) Set the RASTERSIZE attribute of the reference element in
  173. -- the given column, so that it will fit the largest element in the
  174. -- column. Can only be set after the layout of the dialog has been
  175. -- calculated at least 1 time. If FITMAXWIDTHn or FITMAXHEIGHTn are set
  176. -- for the column they are used as maximum limit for the size.
  177. require
  178. column > 0
  179. local
  180. str: STRING
  181. do
  182. str := "C" + column.to_string
  183. iup_open.set_attribute(Current, "FITTOCHILDREN", str)
  184. end
  185. set_gaplin (space: INTEGER)
  186. -- Defines a vertical space in pixels between lines. Default: "0".
  187. require
  188. space >= 0
  189. do
  190. iup_open.set_attribute(Current, "GAPLIN", space.to_string)
  191. end
  192. get_gaplin: INTEGER
  193. -- Return the vertical space between lines.
  194. local
  195. value: STRING
  196. do
  197. value := iup_open.get_attribute(Current, "GAPLIN")
  198. Result := value.to_integer
  199. end
  200. set_cgaplin (space: INTEGER)
  201. -- Defines a vertical space between lines in the same units of the SIZE
  202. -- attribute for the height. Default: "0".
  203. require
  204. space >= 0
  205. do
  206. iup_open.set_attribute(Current, "CGAPLIN", space.to_string)
  207. end
  208. get_cgaplin: INTEGER
  209. -- Return the value of the attribute cgaplin.
  210. local
  211. value: STRING
  212. do
  213. value := iup_open.get_attribute(Current, "CGAPLIN")
  214. Result := value.to_integer
  215. end
  216. set_gapcol (space: INTEGER)
  217. -- Defines an horizontal space in pixels between columns. Default: "0".
  218. require
  219. space >= 0
  220. do
  221. iup_open.set_attribute(Current, "GAPCOL", space.to_string)
  222. end
  223. get_gapcol: INTEGER
  224. -- Return the horizontal space between columns.
  225. local
  226. value: STRING
  227. do
  228. value := iup_open.get_attribute(Current, "GAPCOL")
  229. Result := value.to_integer
  230. end
  231. set_cgapcol (space: INTEGER)
  232. -- Defines an horizontal space between columns in the same units of the
  233. -- SIZE attribute for the height. Default: "0".
  234. require
  235. space >= 0
  236. do
  237. iup_open.set_attribute(Current, "CGAPCOL", space.to_string)
  238. end
  239. get_cgapcol: INTEGER
  240. -- Return the value of the attribute cgapcol.
  241. local
  242. value: STRING
  243. do
  244. value := iup_open.get_attribute(Current, "CGAPCOL")
  245. Result := value.to_integer
  246. end
  247. set_ngaplin (space: INTEGER)
  248. -- Same as *GAPLIN* but non inheritable.
  249. require
  250. space >= 0
  251. do
  252. iup_open.set_attribute(Current, "NGAPLIN", space.to_string)
  253. end
  254. get_ngaplin: INTEGER
  255. -- Return the value of *NGAPLIN* attribute.
  256. local
  257. value: STRING
  258. do
  259. value := iup_open.get_attribute(Current, "NGAPLIN")
  260. Result := value.to_integer
  261. end
  262. set_ncgaplin (space: INTEGER)
  263. -- Same as *CGAPLIN* but non inheritable.
  264. require
  265. space >= 0
  266. do
  267. iup_open.set_attribute(Current, "NCGAPLIN", space.to_string)
  268. end
  269. get_ncgaplin: INTEGER
  270. -- Return the value of *NCGAPLIN* attribute.
  271. local
  272. value: STRING
  273. do
  274. value := iup_open.get_attribute(Current, "NCGAPLIN")
  275. Result := value.to_integer
  276. end
  277. set_ngapcol (space: INTEGER)
  278. -- Same as *GAPCOL* but non inheritable.
  279. require
  280. space >= 0
  281. do
  282. iup_open.set_attribute(Current, "NGAPCOL", space.to_string)
  283. end
  284. get_ngapcol: INTEGER
  285. -- Return the value of *NGAPCOL* attribute.
  286. local
  287. value: STRING
  288. do
  289. value := iup_open.get_attribute(Current, "NGAPCOL")
  290. Result := value.to_integer
  291. end
  292. set_ncgapcol (space: INTEGER)
  293. -- Same as *CGAPCOL* but non inheritable.
  294. require
  295. space >= 0
  296. do
  297. iup_open.set_attribute(Current, "NCGAPCOL", space.to_string)
  298. end
  299. get_ncgapcol: INTEGER
  300. -- Return the value of *NCGAPCOL* attribute.
  301. local
  302. value: STRING
  303. do
  304. value := iup_open.get_attribute(Current, "NCGAPCOL")
  305. Result := value.to_integer
  306. end
  307. set_homogeneous_lines (state: BOOLEAN)
  308. -- (non inheritable): forces all lines to have the same vertical space,
  309. -- or height. The line height will be based on the highest child of the
  310. -- reference column (See set_sizecol). Default: "NO". Notice that this
  311. -- does not changes the children size, only the available space for each
  312. -- one of them to expand.
  313. do
  314. iup_open.set_attribute(Current, "HOMOGENEOUSLIN", boolean_to_yesno(state))
  315. end
  316. is_homogeneous_lines: BOOLEAN
  317. -- Return the state of homogeneouslin.
  318. local
  319. str: STRING
  320. do
  321. str := iup_open.get_attribute(Current, "HOMOGENEOUSLIN")
  322. Result := yesno_to_boolean(str)
  323. end
  324. set_homogeneous_columns (state: BOOLEAN)
  325. -- (non inheritable): forces all columns to have the same horizontal
  326. -- space, or width. The column width will be based on the largest child
  327. -- of the reference line (See set_sizelin). Default: "NO". Notice that
  328. -- this does not changes the children size, only the available space for
  329. -- each one of them to expand.
  330. do
  331. iup_open.set_attribute(Current, "HOMOGENEOUSCOL", boolean_to_yesno(state))
  332. end
  333. is_homogeneous_columns: BOOLEAN
  334. -- Return the state of homogeneouscol.
  335. local
  336. str: STRING
  337. do
  338. str := iup_open.get_attribute(Current, "HOMOGENEOUSCOL")
  339. Result := yesno_to_boolean(str)
  340. end
  341. set_margin (horizontal, vertical: INTEGER)
  342. -- Defines a margin in pixels. Default: "0x0" (no margin).
  343. require
  344. horizontal >= 0
  345. vertical >= 0
  346. local
  347. margin: STRING
  348. do
  349. margin := horizontal.to_string
  350. margin.append_string("x")
  351. margin.append_string(vertical.to_string)
  352. iup_open.set_attribute(Current, "MARGIN", margin)
  353. end
  354. get_margin: TUPLE[INTEGER, INTEGER]
  355. -- Return the value of the margins.
  356. local
  357. margin: STRING
  358. do
  359. margin := iup_open.get_attribute(Current, "MARGIN")
  360. Result := components_of_size(margin)
  361. end
  362. set_cmargin (horizontal, vertical: INTEGER)
  363. -- Defines a margin in the same units of the SIZE attribute.
  364. -- Default: "0x0" (no margin).
  365. require
  366. horizontal >= 0
  367. vertical >= 0
  368. local
  369. margin: STRING
  370. do
  371. margin := horizontal.to_string
  372. margin.append_string("x")
  373. margin.append_string(vertical.to_string)
  374. iup_open.set_attribute(Current, "CMARGIN", margin)
  375. end
  376. get_cmargin: TUPLE[INTEGER, INTEGER]
  377. -- Return the value of the CMARGIN.
  378. local
  379. margin: STRING
  380. do
  381. margin := iup_open.get_attribute(Current, "CMARGIN")
  382. Result := components_of_size(margin)
  383. end
  384. set_nmargin (horizontal, vertical: INTEGER)
  385. -- (non inheritable): Same as MARGIN but are non inheritable.
  386. require
  387. horizontal >= 0
  388. vertical >= 0
  389. local
  390. margin: STRING
  391. do
  392. margin := horizontal.to_string
  393. margin.append_string("x")
  394. margin.append_string(vertical.to_string)
  395. iup_open.set_attribute(Current, "NMARGIN", margin)
  396. end
  397. get_nmargin: TUPLE[INTEGER, INTEGER]
  398. -- Return the value of the nmargin.
  399. local
  400. margin: STRING
  401. do
  402. margin := iup_open.get_attribute(Current, "NMARGIN")
  403. Result := components_of_size(margin)
  404. end
  405. set_ncmargin (horizontal, vertical: INTEGER)
  406. -- (non inheritable): Same as CMARGIN but are non inheritable.
  407. require
  408. horizontal >= 0
  409. vertical >= 0
  410. local
  411. margin: STRING
  412. do
  413. margin := horizontal.to_string
  414. margin.append_string("x")
  415. margin.append_string(vertical.to_string)
  416. iup_open.set_attribute(Current, "NCMARGIN", margin)
  417. end
  418. get_ncmargin: TUPLE[INTEGER, INTEGER]
  419. -- Return the value of NCMARGIN.
  420. local
  421. margin: STRING
  422. do
  423. margin := iup_open.get_attribute(Current, "NCMARGIN")
  424. Result := components_of_size(margin)
  425. end
  426. set_numdiv (num: INTEGER)
  427. -- Controls the number of divisions along the distribution according to
  428. -- ORIENTATION. When ORIENTATION=HORIZONTAL, NUMDIV is the number of
  429. -- columns, when ORIENTATION=VERTICAL, NUMDIV is the number of lines.
  430. -- When value is 0, its actual value will be calculated to fit the
  431. -- maximum number of elements in the orientation direction. Default: 0.
  432. require
  433. num >= 0
  434. local
  435. str: STRING
  436. do
  437. if num.is_equal(0) then
  438. str := "AUTO"
  439. else
  440. str := num.to_string
  441. end
  442. iup_open.set_attribute(Current, "NUMDIV", str)
  443. end
  444. get_numdiv: INTEGER
  445. -- Return the number of divisions.
  446. local
  447. str: STRING
  448. do
  449. str := iup_open.get_attribute(Current, "NUMDIV")
  450. if str.is_equal("AUTO") then
  451. Result := 0
  452. else
  453. Result := str.to_integer
  454. end
  455. end
  456. get_lines: INTEGER
  457. -- (read-only): returns the number of lines.
  458. local
  459. str: STRING
  460. do
  461. str := iup_open.get_attribute(Current, "NUMLIN")
  462. Result := str.to_integer
  463. end
  464. get_columns: INTEGER
  465. -- (read-only): returns the number of columns.
  466. local
  467. str: STRING
  468. do
  469. str := iup_open.get_attribute(Current, "NUMCOL")
  470. Result := str.to_integer
  471. end
  472. set_normalize_size (value: STRING)
  473. -- (non inheritable): normalizes all children natural size to be the
  474. -- biggest natural size among the reference line and/or the reference
  475. -- column. All natural width will be set to the biggest width, and all
  476. -- natural height will be set to the biggest height according to is
  477. -- value. Can be NO, HORIZONTAL (width only), VERTICAL (height only) or
  478. -- BOTH. Default: "NO". Same as using IUP_NORMALIZER. Notice that this is
  479. -- different from the HOMOGENEOUS* attributes in the sense that the
  480. -- children will have their sizes changed.
  481. require
  482. is_valid_normalize_size(value)
  483. do
  484. iup_open.set_attribute(Current, "NORMALIZESIZE", value)
  485. end
  486. get_normalize_size: STRING
  487. -- Return the value of normalize size.
  488. do
  489. Result := iup_open.get_attribute(Current, "NORMALIZESIZE")
  490. end
  491. set_horizontal_orientation
  492. -- (non inheritable): controls the distribution of the children in
  493. -- columns. This is the default value.
  494. do
  495. iup_open.set_attribute(Current, "ORIENTATION", "HORIZONTAL")
  496. end
  497. set_vertical_orientation
  498. -- (non inheritable): controls the distribution of the children in
  499. -- lines.
  500. do
  501. iup_open.set_attribute(Current, "ORIENTATION", "VERTICAL")
  502. end
  503. is_horizontal: BOOLEAN
  504. local
  505. str: STRING
  506. do
  507. str := iup_open.get_attribute(Current, "ORIENTATION")
  508. if str.is_equal("HORIZONTAL") then
  509. Result := True
  510. else
  511. Result := False
  512. end
  513. end
  514. is_vertical: BOOLEAN
  515. local
  516. str: STRING
  517. do
  518. str := iup_open.get_attribute(Current, "ORIENTATION")
  519. if str.is_equal("VERTICAL") then
  520. Result := True
  521. else
  522. Result := False
  523. end
  524. end
  525. set_reference_column (col: INTEGER)
  526. -- (non inheritable): index of the column that will be used as reference
  527. -- when calculating the height of the lines. Default: 0.
  528. require
  529. col >= 0
  530. do
  531. iup_open.set_attribute(Current, "SIZECOL", col.to_string)
  532. end
  533. get_reference_column: INTEGER
  534. -- Return the index of the column used as reference.
  535. local
  536. str: STRING
  537. do
  538. str := iup_open.get_attribute(Current, "SIZECOL")
  539. Result := str.to_integer
  540. end
  541. set_reference_line (line: INTEGER)
  542. -- (non inheritable): index of the line that will be used as reference
  543. -- when calculating the width of the columns. Default: 0.
  544. require
  545. line >= 0
  546. do
  547. iup_open.set_attribute(Current, "SIZELIN", line.to_string)
  548. end
  549. get_reference_line: INTEGER
  550. -- Return the index of the line used as reference.
  551. local
  552. str: STRING
  553. do
  554. str := iup_open.get_attribute(Current, "SIZELIN")
  555. Result := str.to_integer
  556. end
  557. feature {}
  558. -- Internals
  559. int_grid_box_empty (arguments: POINTER): POINTER
  560. external "plug_in"
  561. alias "{
  562. location: "${sys}/plugins"
  563. module_name: "iup"
  564. feature_name: "IupGridBox"
  565. }"
  566. end
  567. int_grid_box (arguments: POINTER): POINTER
  568. external "plug_in"
  569. alias "{
  570. location: "${sys}/plugins"
  571. module_name: "iup"
  572. feature_name: "IupGridBoxv"
  573. }"
  574. end
  575. -- Validations
  576. is_valid_alignment_lin (value: STRING): BOOLEAN
  577. do
  578. if value.is_equal("ATOP") or
  579. value.is_equal("ACENTER") or
  580. value.is_equal("ABOTTOM") then
  581. Result := True
  582. else
  583. Result := False
  584. end
  585. end
  586. is_valid_alignment_col (value: STRING): BOOLEAN
  587. do
  588. if value.is_equal("ALEFT") or
  589. value.is_equal("ACENTER") or
  590. value.is_equal("ARIGHT") then
  591. Result := True
  592. else
  593. Result := False
  594. end
  595. end
  596. is_valid_expand_children (value: STRING): BOOLEAN
  597. do
  598. if value.is_equal("YES") or
  599. value.is_equal("HORIZONTAL") or
  600. value.is_equal("VERTICAL") or
  601. value.is_equal("NO") then
  602. Result := True
  603. else
  604. Result := False
  605. end
  606. end
  607. is_valid_normalize_size (value: STRING): BOOLEAN
  608. do
  609. if value.is_equal("BOTH") or
  610. value.is_equal("HORIZONTAL") or
  611. value.is_equal("VERTICAL") or
  612. value.is_equal("NO") then
  613. Result := True
  614. else
  615. Result := False
  616. end
  617. end
  618. end -- class IUP_GRID_BOX
  619. -- The MIT License (MIT)
  620. -- Copyright (c) 2016, 2017 by German A. Arias
  621. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  622. -- of this software and associated documentation files (the "Software"), to deal
  623. -- in the Software without restriction, including without limitation the rights
  624. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  625. -- copies of the Software, and to permit persons to whom the Software is
  626. -- furnished to do so, subject to the following conditions:
  627. --
  628. -- The above copyright notice and this permission notice shall be included in
  629. -- all copies or substantial portions of the Software.
  630. --
  631. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  632. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  633. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  634. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  635. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  636. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  637. -- SOFTWARE.