iup_tabs.e 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. class IUP_TABS
  2. -- Creates a native container for composing elements in hidden layers with only
  3. -- one layer visible (just like IUP_ZBOX), but its visibility can be
  4. -- interactively controlled. The interaction is done in a line of tabs with
  5. -- titles and arranged according to the tab type. Also known as Notebook in
  6. -- native systems.
  7. inherit
  8. IUP_ZBOX
  9. rename
  10. zbox_empty as tabs_empty,
  11. zbox as tabs
  12. redefine
  13. tabs_empty,
  14. tabs,
  15. execute_map,
  16. execute_unmap,
  17. execute_destroy,
  18. execute_getfocus,
  19. execute_killfocus,
  20. execute_enterwindow,
  21. execute_leavewindow,
  22. execute_k_any,
  23. execute_help,
  24. execute_tabchange,
  25. execute_tabchangepos,
  26. execute_tabclose,
  27. execute_rightclick,
  28. execute_focus
  29. end
  30. IUP_WIDGET_BGCOLOR
  31. IUP_WIDGET_FGCOLOR
  32. IUP_WIDGET_ACTIVE
  33. IUP_WIDGET_SCREENPOSITION
  34. IUP_WIDGET_TIP
  35. IUP_WIDGET_ZORDER
  36. IUP_WIDGET_VISIBLE
  37. IUP_WIDGET_FOCUS
  38. IUP_WIDGET_PROPAGATEFOCUS
  39. IUP_WIDGET_FLOATING
  40. create {ANY}
  41. tabs_empty,
  42. tabs
  43. feature {ANY}
  44. tabs_empty
  45. -- Create an empty tabs
  46. local
  47. p, a_tabs: POINTER
  48. do
  49. a_tabs := int_tabs_empty (p)
  50. set_widget(a_tabs)
  51. end
  52. tabs (col: ARRAY[IUP_WIDGET])
  53. -- Create a new tabs containing the list of widgets
  54. local
  55. i: INTEGER; arg: ARRAY[POINTER]; s: IUP_WIDGET; a_tabs: POINTER
  56. do
  57. i := col.count
  58. create arg.make_filled(default_pointer, 1, i + 1)
  59. i := 0
  60. across
  61. col as ic
  62. loop
  63. i := i + 1
  64. s := ic.item
  65. arg.put(s.widget, i)
  66. end
  67. a_tabs := int_tabs (get_pointer(arg.to_c))
  68. set_widget(a_tabs)
  69. end
  70. -- Attributes
  71. set_childoffset (horizontal, vertical: INTEGER)
  72. require
  73. horizontal >= 0
  74. vertical >= 0
  75. local
  76. offset: STRING
  77. do
  78. offset := horizontal.out
  79. offset.append_string("x")
  80. offset.append_string(vertical.out)
  81. iup_open.set_attribute(Current, "CHILDOFFSET", offset)
  82. end
  83. get_childoffset: TUPLE[INTEGER, INTEGER]
  84. -- Return the offset of the child.
  85. local
  86. offset: STRING
  87. do
  88. offset := iup_open.get_attribute(Current, "CHILDOFFSET")
  89. Result := components_of_size(offset)
  90. end
  91. count: INTEGER
  92. -- (read-only) (non inheritable): returns the number of tabs.
  93. do
  94. Result := get_child_count
  95. end
  96. set_multiline (state: BOOLEAN)
  97. -- [Windows Only] (non inheritable): Enable multiple lines of tab
  98. -- buttons. This will hide the tab scroll and fits to make all tab buttons
  99. -- visible. Can be "YES" or "NO". Default "NO". It is always enabled
  100. -- when TABTYPE=LEFT or TABTYPE=RIGHT.
  101. do
  102. iup_open.set_attribute(Current, "MULTILINE", boolean_to_yesno(state))
  103. end
  104. is_multiline: BOOLEAN
  105. -- Return the multiline status of the element.
  106. local
  107. str: STRING
  108. do
  109. str := iup_open.get_attribute(Current, "MULTILINE")
  110. Result := yesno_to_boolean(str)
  111. end
  112. set_showclose (state: BOOLEAN)
  113. -- [Windows and GTK Only] (non inheritable): enables the close button on
  114. -- each tab. Default value: "NO". In Windows the close button imply the
  115. -- classic visual for the control. By default when closed the tab is
  116. -- hidden. The change that behavior use the TABCLOSE_CB callback.
  117. do
  118. iup_open.set_attribute(Current, "SHOWCLOSE", boolean_to_yesno(state))
  119. end
  120. is_showclose: BOOLEAN
  121. -- Return the showclose status of the element.
  122. local
  123. str: STRING
  124. do
  125. str := iup_open.get_attribute(Current, "SHOWCLOSE")
  126. Result := yesno_to_boolean(str)
  127. end
  128. set_horizontal_tab
  129. -- (non inheritable): Indicates an horizontal orientation of tab text.
  130. -- This is the default value. In Windows, it can NOT be set,
  131. -- it is dependent on the TABTYPE attribute, if TABTYPE=LEFT or
  132. -- TABTYPE=RIGHT then TABORIENTATION=VERTICAL, if TABTYPE=TOP or
  133. -- TABTYPE=BOTTOM then TABORIENTATION=HORIZONTAL.
  134. do
  135. iup_open.set_attribute(Current, "TABORIENTATION", "HORIZONTAL")
  136. end
  137. set_vertical_tab
  138. -- (non inheritable): Indicates a vertical orientation of tab text.
  139. -- VERTICAL is supported only in GTK and in Windows. In Windows, it can
  140. -- NOT be set, it is dependent on the TABTYPE attribute, if TABTYPE=LEFT
  141. -- or TABTYPE=RIGHT then TABORIENTATION=VERTICAL, if TABTYPE=TOP or
  142. -- TABTYPE=BOTTOM then TABORIENTATION=HORIZONTAL.
  143. do
  144. iup_open.set_attribute(Current, "TABORIENTATION", "VERTICAL")
  145. end
  146. is_horizontal_tab: BOOLEAN
  147. local
  148. str: STRING
  149. do
  150. str := iup_open.get_attribute(Current, "TABORIENTATION")
  151. if str.is_equal("HORIZONTAL") then
  152. Result := True
  153. else
  154. Result := False
  155. end
  156. end
  157. is_vertical_tab: BOOLEAN
  158. local
  159. str: STRING
  160. do
  161. str := iup_open.get_attribute(Current, "TABORIENTATION")
  162. if str.is_equal("VERTICAL") then
  163. Result := True
  164. else
  165. Result := False
  166. end
  167. end
  168. set_tab_padding (horizontal, vertical: INTEGER)
  169. -- (non inheritable): internal margin of the tab title. Works just like
  170. -- the MARGIN attribute of the IUP_BOX and IUP_VBOX containers, but uses
  171. -- a different name to avoid inheritance problems. Default value: "0x0".
  172. require
  173. horizontal >= 0
  174. vertical >= 0
  175. local
  176. padding: STRING
  177. do
  178. padding := horizontal.out
  179. padding.append_string("x")
  180. padding.append_string(vertical.out)
  181. iup_open.set_attribute(Current, "TABPADDING", padding)
  182. end
  183. get_tab_padding: TUPLE[INTEGER, INTEGER]
  184. -- Return the margin of the tab title.
  185. local
  186. padding: STRING
  187. do
  188. padding := iup_open.get_attribute(Current, "TABPADDING")
  189. Result := components_of_size(padding)
  190. end
  191. set_tab_type (type: STRING)
  192. -- (non inheritable) (creation only in Windows): Indicates the type of
  193. -- tab, which can be "TOP", "BOTTOM", "LEFT" or "RIGHT". Default is "TOP".
  194. -- In Windows, if LEFT or RIGHT then MULTILINE=YES and
  195. -- TABORIENTATION=VERTICAL are set, if TOP or BOTTOM then
  196. -- TABORIENTATION=HORIZONTAL is set. In Windows, when not TOP, then
  197. -- visual style is removed from tabs.
  198. require
  199. is_valid_tabtype(type)
  200. do
  201. iup_open.set_attribute (Current, "TABTYPE", type)
  202. end
  203. get_tab_type: STRING
  204. -- Return the tab type.
  205. do
  206. Result := iup_open.get_attribute (Current, "TABTYPE")
  207. end
  208. -- Tab attributes
  209. set_tab_n_image (imagename: STRING; n: INTEGER)
  210. -- (non inheritable): image name to be used in the respective tab. Use
  211. -- set_widget_name to associate an image to a name. n starts at 0.
  212. -- See also IUP_IMAGE. In Motif, the image is shown only if TABTITLEn is
  213. -- Void. In Windows and Motif set the BGCOLOR attribute before setting
  214. -- the image. When set after map will update the TABIMAGE attribute on
  215. -- the respective child
  216. require
  217. n >= 0
  218. local
  219. str: STRING
  220. do
  221. str := "TABIMAGE" + n.out
  222. iup_open.set_attribute (Current, str, imagename)
  223. end
  224. get_tab_n_image (n: INTEGER): STRING
  225. -- Return the image name at tab n.
  226. require
  227. n >= 0
  228. local
  229. str: STRING
  230. do
  231. str := "TABIMAGE" + n.out
  232. Result := iup_open.get_attribute(Current, str)
  233. end
  234. set_tab_n_visible (state: BOOLEAN; n: INTEGER)
  235. -- Allows to hide a tab. n starts at 0. When a tab is hidden the tabs
  236. -- indices are not changed.
  237. require
  238. n >= 0
  239. do
  240. iup_open.set_attribute_id (Current, "TABVISIBLE", n, boolean_to_yesno(state))
  241. end
  242. is_tab_n_visible (n: INTEGER): BOOLEAN
  243. -- Return the visible status of tab n.
  244. require
  245. n >= 0
  246. local
  247. str: STRING
  248. do
  249. str := iup_open.get_attribute_id(Current, "TABVISIBLE", n)
  250. Result := yesno_to_boolean(str)
  251. end
  252. set_tab_n_title (title: STRING; n: INTEGER)
  253. -- (non inheritable): Contains the text to be shown in the respective
  254. -- tab title. n starts at 0. The "&" character can be used to define a
  255. -- mnemonic, the next character will be used as key. Use "&&" to show the
  256. -- "&" character instead on defining a mnemonic. The button can be
  257. -- activated from any control in the dialog using the "Alt+key"
  258. -- combination. When set after map will update the TABTITLE attribute on
  259. -- the respective child.
  260. require
  261. n >= 0
  262. do
  263. iup_open.set_attribute_id (Current, "TABTITLE", n, title)
  264. end
  265. get_tab_n_title (n: INTEGER): STRING
  266. -- Return the title of tab n.
  267. require
  268. n >= 0
  269. do
  270. Result := iup_open.get_attribute_id(Current, "TABTITLE", n)
  271. end
  272. -- Callbacks
  273. -- Common
  274. set_cb_map (act: detachable FUNCTION[TUPLE[IUP_TABS], STRING])
  275. -- Called right after an element is mapped and its attributes updated.
  276. local
  277. operation: INTEGER
  278. do
  279. cb_map := act
  280. if cb_map /= Void then
  281. operation := 1
  282. else
  283. operation := 0
  284. end
  285. iup_open.set_callback (Current, "MAP_CB", "NONEEDED", operation)
  286. end
  287. set_cb_unmap (act: detachable FUNCTION[TUPLE[IUP_TABS], STRING])
  288. -- Called right before an element is unmapped.
  289. local
  290. operation: INTEGER
  291. do
  292. cb_unmap := act
  293. if cb_unmap /= Void then
  294. operation := 1
  295. else
  296. operation := 0
  297. end
  298. iup_open.set_callback (Current, "UNMAP_CB", "NONEEDED", operation)
  299. end
  300. set_cb_destroy (act: detachable FUNCTION[TUPLE[IUP_TABS], STRING])
  301. -- Called right before an element is destroyed.
  302. local
  303. operation: INTEGER
  304. do
  305. cb_destroy := act
  306. if cb_destroy /= Void then
  307. operation := 1
  308. else
  309. operation := 0
  310. end
  311. iup_open.set_callback (Current, "DESTROY_CB", "NONEEDED", operation)
  312. end
  313. set_cb_get_focus (act: detachable FUNCTION[TUPLE[IUP_TABS], STRING])
  314. -- Action generated when an element is given keyboard focus.
  315. -- This callback is called after the KILLFOCUS_CB of the element
  316. -- that loosed the focus. The {IUP}.get_focus function during the
  317. -- callback returns the element that loosed the focus.
  318. local
  319. operation: INTEGER
  320. do
  321. cb_getfocus := act
  322. if cb_getfocus /= Void then
  323. operation := 1
  324. else
  325. operation := 0
  326. end
  327. iup_open.set_callback (Current, "GETFOCUS_CB", "NONEEDED", operation)
  328. end
  329. set_cb_kill_focus (act: detachable FUNCTION[TUPLE[IUP_TABS], STRING])
  330. -- Action generated when an element loses keyboard focus. This
  331. -- callback is called before the GETFOCUS_CB of the element that
  332. -- gets the focus.
  333. local
  334. operation: INTEGER
  335. do
  336. cb_killfocus := act
  337. if cb_killfocus /= Void then
  338. operation := 1
  339. else
  340. operation := 0
  341. end
  342. iup_open.set_callback (Current, "KILLFOCUS_CB", "NONEEDED", operation)
  343. end
  344. set_cb_enter_window (act: detachable FUNCTION[TUPLE[IUP_TABS], STRING])
  345. -- Action generated when the mouse enters the native element.
  346. local
  347. operation: INTEGER
  348. do
  349. cb_enterwindow := act
  350. if cb_enterwindow /= Void then
  351. operation := 1
  352. else
  353. operation := 0
  354. end
  355. iup_open.set_callback (Current, "ENTERWINDOW_CB", "NONEEDED", operation)
  356. end
  357. set_cb_leave_window (act: detachable FUNCTION[TUPLE[IUP_TABS], STRING])
  358. -- Action generated when the mouse leaves the native element.
  359. local
  360. operation: INTEGER
  361. do
  362. cb_leavewindow := act
  363. if cb_leavewindow /= Void then
  364. operation := 1
  365. else
  366. operation := 0
  367. end
  368. iup_open.set_callback (Current, "LEAVEWINDOW_CB", "NONEEDED", operation)
  369. end
  370. set_cb_k_any (act: detachable FUNCTION[TUPLE[IUP_TABS, INTEGER], STRING])
  371. -- Action generated when a keyboard event occurs.
  372. -- IUP_WIDGET the element that activated the event.
  373. -- INTEGER identifier of typed key. Please refer to the Keyboard
  374. -- Codes table for a list of possible values.
  375. --
  376. -- Returns: If IUP_IGNORE is returned the key is ignored and not
  377. -- processed by the control and not propagated. If returns
  378. -- IUP_CONTINUE, the key will be processed and the event will be
  379. -- propagated to the parent of the element receiving it, this is
  380. -- the default behavior. If returns IUP_DEFAULT the key is processed
  381. -- but it is not propagated. IUP_CLOSE will be processed.
  382. local
  383. operation: INTEGER
  384. do
  385. cb_k_any := act
  386. if cb_k_any /= Void then
  387. operation := 1
  388. else
  389. operation := 0
  390. end
  391. iup_open.set_callback (Current, "K_ANY", "NONEEDED", operation)
  392. end
  393. set_cb_help (act: detachable PROCEDURE[TUPLE[IUP_TABS]])
  394. -- Action generated when the user press F1 at a control. In Motif
  395. -- is also activated by the Help button in some workstations
  396. -- keyboard.
  397. -- Returns: IUP_CLOSE will be processed.
  398. local
  399. operation: INTEGER
  400. do
  401. cb_help := act
  402. if cb_help /= Void then
  403. operation := 1
  404. else
  405. operation := 0
  406. end
  407. iup_open.set_callback (Current, "HELP_CB", "NONEEDED", operation)
  408. end
  409. -- Extra
  410. set_cb_tab_change (act: detachable FUNCTION[TUPLE[IUP_TABS, IUP_WIDGET, IUP_WIDGET], STRING])
  411. -- Callback called when the user shifts the active tab.
  412. local
  413. operation: INTEGER
  414. do
  415. cb_tabchange := act
  416. if cb_tabchange /= Void then
  417. operation := 1
  418. else
  419. operation := 0
  420. end
  421. iup_open.set_callback (Current, "TABCHANGE_CB", "NONEEDED", operation)
  422. end
  423. set_cb_tab_change_position (act: detachable FUNCTION[TUPLE[IUP_TABS, INTEGER, INTEGER], STRING])
  424. -- Callback called when the user shifts the active tab. Called only when
  425. -- TABCHANGE_CB is not defined.
  426. local
  427. operation: INTEGER
  428. do
  429. cb_tabchangepos := act
  430. if cb_tabchangepos /= Void then
  431. operation := 1
  432. else
  433. operation := 0
  434. end
  435. iup_open.set_callback (Current, "TABCHANGEPOS_CB", "NONEEDED", operation)
  436. end
  437. set_cb_tab_close (act: detachable FUNCTION[TUPLE[IUP_TABS, INTEGER], STRING])
  438. -- [Windows and GTK Only]: Callback called when the user clicks on the
  439. -- close button. Called only when SHOWCLOSE=Yes.
  440. local
  441. operation: INTEGER
  442. do
  443. cb_tabclose := act
  444. if cb_tabclose /= Void then
  445. operation := 1
  446. else
  447. operation := 0
  448. end
  449. iup_open.set_callback (Current, "TABCLOSE_CB", "NONEEDED", operation)
  450. end
  451. set_cb_right_click (act: detachable FUNCTION[TUPLE[IUP_TABS, INTEGER], STRING])
  452. -- Callback called when the user clicks on some tab using the right mouse
  453. -- button.
  454. local
  455. operation: INTEGER
  456. do
  457. cb_rightclick := act
  458. if cb_rightclick /= Void then
  459. operation := 1
  460. else
  461. operation := 0
  462. end
  463. iup_open.set_callback (Current, "RIGHTCLICK_CB", "NONEEDED", operation)
  464. end
  465. set_cb_focus (act: detachable FUNCTION[TUPLE[IUP_TABS, INTEGER], STRING])
  466. -- Called when a child of the container gets or looses the focus. It is
  467. -- called only if PROPAGATEFOCUS is defined in the child.
  468. local
  469. operation: INTEGER
  470. do
  471. cb_focus := act
  472. if cb_focus /= Void then
  473. operation := 1
  474. else
  475. operation := 0
  476. end
  477. iup_open.set_callback (Current, "FOCUS_CB", "NONEEDED", operation)
  478. end
  479. -- Validations
  480. is_valid_tabtype (type: STRING): BOOLEAN
  481. do
  482. if type.is_equal("TOP") or
  483. type.is_equal("BOTTOM") or
  484. type.is_equal("LEFT") or
  485. type.is_equal("RIGHT") then
  486. Result := True
  487. else
  488. Result := False
  489. end
  490. end
  491. feature {ANY}
  492. -- Callbacks
  493. execute_map: STRING
  494. do
  495. if attached cb_map as int_cb then
  496. Result := int_cb.item([Current])
  497. else
  498. Result := "IUP_DEFAULT"
  499. end
  500. end
  501. execute_unmap: STRING
  502. do
  503. if attached cb_unmap as int_cb then
  504. Result := int_cb.item([Current])
  505. else
  506. Result := "IUP_DEFAULT"
  507. end
  508. end
  509. execute_destroy: STRING
  510. do
  511. if attached cb_destroy as int_cb then
  512. Result := int_cb.item([Current])
  513. else
  514. Result := "IUP_DEFAULT"
  515. end
  516. end
  517. execute_getfocus: STRING
  518. do
  519. if attached cb_getfocus as int_cb then
  520. Result := int_cb.item([Current])
  521. else
  522. Result := "IUP_DEFAULT"
  523. end
  524. end
  525. execute_killfocus: STRING
  526. do
  527. if attached cb_killfocus as int_cb then
  528. Result := int_cb.item([Current])
  529. else
  530. Result := "IUP_DEFAULT"
  531. end
  532. end
  533. execute_enterwindow: STRING
  534. do
  535. if attached cb_enterwindow as int_cb then
  536. Result := int_cb.item([Current])
  537. else
  538. Result := "IUP_DEFAULT"
  539. end
  540. end
  541. execute_leavewindow: STRING
  542. do
  543. if attached cb_leavewindow as int_cb then
  544. Result := int_cb.item([Current])
  545. else
  546. Result := "IUP_DEFAULT"
  547. end
  548. end
  549. execute_k_any (c: INTEGER): STRING
  550. do
  551. if attached cb_k_any as int_cb then
  552. Result := int_cb.item([Current, c])
  553. else
  554. Result := "IUP_DEFAULT"
  555. end
  556. end
  557. execute_help
  558. do
  559. if attached cb_help as int_cb then
  560. int_cb.call([Current])
  561. end
  562. end
  563. execute_tabchange (new_tab, old_tab: IUP_WIDGET): STRING
  564. do
  565. if attached cb_tabchange as int_cb then
  566. Result := int_cb.item([Current, new_tab, old_tab])
  567. else
  568. Result := "IUP_DEFAULT"
  569. end
  570. end
  571. execute_tabchangepos (new_pos, old_pos: INTEGER): STRING
  572. do
  573. if attached cb_tabchangepos as int_cb then
  574. Result := int_cb.item([Current, new_pos, old_pos])
  575. else
  576. Result := "IUP_DEFAULT"
  577. end
  578. end
  579. execute_tabclose (pos: INTEGER): STRING
  580. do
  581. if attached cb_tabclose as int_cb then
  582. Result := int_cb.item([Current, pos])
  583. else
  584. Result := "IUP_DEFAULT"
  585. end
  586. end
  587. execute_rightclick (pos: INTEGER): STRING
  588. do
  589. if attached cb_rightclick as int_cb then
  590. Result := int_cb.item([Current, pos])
  591. else
  592. Result := "IUP_DEFAULT"
  593. end
  594. end
  595. execute_focus (focus: INTEGER): STRING
  596. do
  597. if attached cb_focus as int_cb then
  598. Result := int_cb.item([Current, focus])
  599. else
  600. Result := "IUP_DEFAULT"
  601. end
  602. end
  603. feature {NONE}
  604. -- For Tabs callbacks
  605. cb_map: detachable FUNCTION[TUPLE[IUP_TABS], STRING]
  606. cb_unmap: detachable FUNCTION[TUPLE[IUP_TABS], STRING]
  607. cb_destroy: detachable FUNCTION[TUPLE[IUP_TABS], STRING]
  608. cb_getfocus: detachable FUNCTION[TUPLE[IUP_TABS], STRING]
  609. cb_killfocus: detachable FUNCTION[TUPLE[IUP_TABS], STRING]
  610. cb_enterwindow: detachable FUNCTION[TUPLE[IUP_TABS], STRING]
  611. cb_leavewindow: detachable FUNCTION[TUPLE[IUP_TABS], STRING]
  612. cb_k_any: detachable FUNCTION[TUPLE[IUP_TABS, INTEGER], STRING]
  613. cb_help: detachable PROCEDURE[TUPLE[IUP_TABS]]
  614. cb_action: detachable FUNCTION[TUPLE[IUP_TABS], STRING]
  615. cb_tabchange: detachable FUNCTION[TUPLE[IUP_TABS, IUP_WIDGET, IUP_WIDGET], STRING]
  616. cb_tabchangepos: detachable FUNCTION[TUPLE[IUP_TABS, INTEGER, INTEGER], STRING]
  617. cb_tabclose: detachable FUNCTION[TUPLE[IUP_TABS, INTEGER], STRING]
  618. cb_rightclick: detachable FUNCTION[TUPLE[IUP_TABS, INTEGER], STRING]
  619. cb_focus: detachable FUNCTION[TUPLE[IUP_TABS, INTEGER], STRING]
  620. -- Internals
  621. int_tabs_empty (arguments: POINTER): POINTER
  622. external
  623. "C inline use %"eiffel-iup.h%""
  624. alias
  625. "return IupTabs ($arguments);"
  626. end
  627. int_tabs (arguments: POINTER): POINTER
  628. external
  629. "C inline use %"eiffel-iup.h%""
  630. alias
  631. "return IupTabsv ($arguments);"
  632. end
  633. end
  634. -- The MIT License (MIT)
  635. -- Copyright (c) 2016, 2017, 2019, 2020 by German A. Arias
  636. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  637. -- of this software and associated documentation files (the "Software"), to deal
  638. -- in the Software without restriction, including without limitation the rights
  639. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  640. -- copies of the Software, and to permit persons to whom the Software is
  641. -- furnished to do so, subject to the following conditions:
  642. --
  643. -- The above copyright notice and this permission notice shall be included in
  644. -- all copies or substantial portions of the Software.
  645. --
  646. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  647. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  648. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  649. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  650. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  651. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  652. -- SOFTWARE.