W3DTabControl.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. /*
  2. ** Command & Conquer Generals Zero Hour(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. ////////////////////////////////////////////////////////////////////////////////
  19. // //
  20. // (c) 2001-2003 Electronic Arts Inc. //
  21. // //
  22. ////////////////////////////////////////////////////////////////////////////////
  23. // FILE: W3DTabControl.cpp ///////////////////////////////////////////////////
  24. //-----------------------------------------------------------------------------
  25. //
  26. // Westwood Studios Pacific.
  27. //
  28. // Confidential Information
  29. // Copyright (C) 2001 - All Rights Reserved
  30. //
  31. //-----------------------------------------------------------------------------
  32. //
  33. // Project: RTS3
  34. //
  35. // File name: projects\RTS\code\gameenginedevice\Source\W3DDevice\GameClient\GUI\Gadget\W3DTabControl.cpp
  36. //
  37. // Created: Graham Smallwood, November 2001
  38. //
  39. // Desc: W3D methods needed to implement the TabControl UI control
  40. //
  41. //-----------------------------------------------------------------------------
  42. ///////////////////////////////////////////////////////////////////////////////
  43. // SYSTEM INCLUDES ////////////////////////////////////////////////////////////
  44. #include <stdlib.h>
  45. // USER INCLUDES //////////////////////////////////////////////////////////////
  46. #include "GameClient/GameWindowGlobal.h"
  47. #include "GameClient/GameWindowManager.h"
  48. #include "GameClient/GadgetTabControl.h"
  49. #include "W3DDevice/GameClient/W3DGameWindow.h"
  50. #include "W3DDevice/GameClient/W3DGadget.h"
  51. #include "W3DDevice/GameClient/W3DDisplay.h"
  52. // DEFINES ////////////////////////////////////////////////////////////////////
  53. // PRIVATE TYPES //////////////////////////////////////////////////////////////
  54. // PRIVATE DATA ///////////////////////////////////////////////////////////////
  55. // PUBLIC DATA ////////////////////////////////////////////////////////////////
  56. // PRIVATE PROTOTYPES /////////////////////////////////////////////////////////
  57. // PRIVATE FUNCTIONS //////////////////////////////////////////////////////////
  58. ///////////////////////////////////////////////////////////////////////////////
  59. // PUBLIC FUNCTIONS ///////////////////////////////////////////////////////////
  60. ///////////////////////////////////////////////////////////////////////////////
  61. // W3DGadgetRadioButtonDraw ===================================================
  62. /** Draw tabs with standard graphics */
  63. //=============================================================================
  64. void W3DGadgetTabControlDraw( GameWindow *tabControl, WinInstanceData *instData )
  65. {
  66. ICoord2D origin, size;
  67. // get window position and size
  68. tabControl->winGetScreenPosition( &origin.x, &origin.y );
  69. tabControl->winGetSize( &size.x, &size.y );
  70. W3DGameWinDefaultDraw(tabControl, instData);//draw the background
  71. if( BitTest( tabControl->winGetStatus(), WIN_STATUS_BORDER ) == TRUE &&
  72. !BitTest( tabControl->winGetStatus(), WIN_STATUS_SEE_THRU ) )
  73. {//draw border if desired
  74. tabControl->winDrawBorder();
  75. }
  76. TabControlData *tabData = (TabControlData *)tabControl->winGetUserData();
  77. Int tabX, tabY, tabWidth, tabHeight, tabDeltaX, tabDeltaY;
  78. tabX = origin.x + tabData->tabsLeftLimit;
  79. tabY = origin.y + tabData->tabsTopLimit;
  80. tabWidth = tabData->tabWidth;
  81. tabHeight = tabData->tabHeight;
  82. if( (tabData->tabEdge == TP_TOP_SIDE) || (tabData->tabEdge == TP_BOTTOM_SIDE) )
  83. {
  84. tabDeltaX = tabWidth;
  85. tabDeltaY = 0;
  86. }
  87. else
  88. {
  89. tabDeltaX = 0;
  90. tabDeltaY = tabHeight;
  91. }
  92. Color color, border;
  93. if( tabData->tabCount >= 1 )//Does exist
  94. {
  95. if( tabData->subPaneDisabled[0] )
  96. {//Disabled
  97. color = GadgetTabControlGetDisabledColorTabZero( tabControl );
  98. border = GadgetTabControlGetDisabledBorderColorTabZero( tabControl );
  99. }
  100. else if( tabData->activeTab == 0 )
  101. {//Hilited/Active
  102. color = GadgetTabControlGetHiliteColorTabZero( tabControl );
  103. border = GadgetTabControlGetHiliteBorderColorTabZero( tabControl );
  104. }
  105. else
  106. {//Just enabled
  107. color = GadgetTabControlGetEnabledColorTabZero( tabControl );
  108. border = GadgetTabControlGetEnabledBorderColorTabZero( tabControl );
  109. }
  110. // box and border
  111. if( border != WIN_COLOR_UNDEFINED )
  112. {
  113. TheWindowManager->winOpenRect( border, WIN_DRAW_LINE_WIDTH,
  114. tabX, tabY, tabX + tabWidth, tabY + tabHeight );
  115. }
  116. if( color != WIN_COLOR_UNDEFINED )
  117. {
  118. TheWindowManager->winFillRect( color, WIN_DRAW_LINE_WIDTH,
  119. tabX + 1, tabY + 1, tabX + tabWidth - 1, tabY + tabHeight - 1 );
  120. }
  121. }
  122. tabX += tabDeltaX;
  123. tabY += tabDeltaY;
  124. if( tabData->tabCount >= 2 )//Does exist
  125. {
  126. if( tabData->subPaneDisabled[1] )
  127. {//Disabled
  128. color = GadgetTabControlGetDisabledColorTabOne( tabControl );
  129. border = GadgetTabControlGetDisabledBorderColorTabOne( tabControl );
  130. }
  131. else if( tabData->activeTab == 1 )
  132. {//Hilited/Active
  133. color = GadgetTabControlGetHiliteColorTabOne( tabControl );
  134. border = GadgetTabControlGetHiliteBorderColorTabOne( tabControl );
  135. }
  136. else
  137. {//Just enabled
  138. color = GadgetTabControlGetEnabledColorTabOne( tabControl );
  139. border = GadgetTabControlGetEnabledBorderColorTabOne( tabControl );
  140. }
  141. // box and border
  142. if( border != WIN_COLOR_UNDEFINED )
  143. {
  144. TheWindowManager->winOpenRect( border, WIN_DRAW_LINE_WIDTH,
  145. tabX, tabY, tabX + tabWidth, tabY + tabHeight );
  146. }
  147. if( color != WIN_COLOR_UNDEFINED )
  148. {
  149. TheWindowManager->winFillRect( color, WIN_DRAW_LINE_WIDTH,
  150. tabX + 1, tabY + 1, tabX + tabWidth - 1, tabY + tabHeight - 1 );
  151. }
  152. }
  153. tabX += tabDeltaX;
  154. tabY += tabDeltaY;
  155. if( tabData->tabCount >= 3 )//Does exist
  156. {
  157. if( tabData->subPaneDisabled[2] )
  158. {//Disabled
  159. color = GadgetTabControlGetDisabledColorTabTwo( tabControl );
  160. border = GadgetTabControlGetDisabledBorderColorTabTwo( tabControl );
  161. }
  162. else if( tabData->activeTab == 2 )
  163. {//Hilited/Active
  164. color = GadgetTabControlGetHiliteColorTabTwo( tabControl );
  165. border = GadgetTabControlGetHiliteBorderColorTabTwo( tabControl );
  166. }
  167. else
  168. {//Just enabled
  169. color = GadgetTabControlGetEnabledColorTabTwo( tabControl );
  170. border = GadgetTabControlGetEnabledBorderColorTabTwo( tabControl );
  171. }
  172. // box and border
  173. if( border != WIN_COLOR_UNDEFINED )
  174. {
  175. TheWindowManager->winOpenRect( border, WIN_DRAW_LINE_WIDTH,
  176. tabX, tabY, tabX + tabWidth, tabY + tabHeight );
  177. }
  178. if( color != WIN_COLOR_UNDEFINED )
  179. {
  180. TheWindowManager->winFillRect( color, WIN_DRAW_LINE_WIDTH,
  181. tabX + 1, tabY + 1, tabX + tabWidth - 1, tabY + tabHeight - 1 );
  182. }
  183. }
  184. tabX += tabDeltaX;
  185. tabY += tabDeltaY;
  186. if( tabData->tabCount >= 4 )//Does exist
  187. {
  188. if( tabData->subPaneDisabled[3] )
  189. {//Disabled
  190. color = GadgetTabControlGetDisabledColorTabThree( tabControl );
  191. border = GadgetTabControlGetDisabledBorderColorTabThree( tabControl );
  192. }
  193. else if( tabData->activeTab == 3 )
  194. {//Hilited/Active
  195. color = GadgetTabControlGetHiliteColorTabThree( tabControl );
  196. border = GadgetTabControlGetHiliteBorderColorTabThree( tabControl );
  197. }
  198. else
  199. {//Just enabled
  200. color = GadgetTabControlGetEnabledColorTabThree( tabControl );
  201. border = GadgetTabControlGetEnabledBorderColorTabThree( tabControl );
  202. }
  203. // box and border
  204. if( border != WIN_COLOR_UNDEFINED )
  205. {
  206. TheWindowManager->winOpenRect( border, WIN_DRAW_LINE_WIDTH,
  207. tabX, tabY, tabX + tabWidth, tabY + tabHeight );
  208. }
  209. if( color != WIN_COLOR_UNDEFINED )
  210. {
  211. TheWindowManager->winFillRect( color, WIN_DRAW_LINE_WIDTH,
  212. tabX + 1, tabY + 1, tabX + tabWidth - 1, tabY + tabHeight - 1 );
  213. }
  214. }
  215. tabX += tabDeltaX;
  216. tabY += tabDeltaY;
  217. if( tabData->tabCount >= 5 )//Does exist
  218. {
  219. if( tabData->subPaneDisabled[4] )
  220. {//Disabled
  221. color = GadgetTabControlGetDisabledColorTabFour( tabControl );
  222. border = GadgetTabControlGetDisabledBorderColorTabFour( tabControl );
  223. }
  224. else if( tabData->activeTab == 4 )
  225. {//Hilited/Active
  226. color = GadgetTabControlGetHiliteColorTabFour( tabControl );
  227. border = GadgetTabControlGetHiliteBorderColorTabFour( tabControl );
  228. }
  229. else
  230. {//Just enabled
  231. color = GadgetTabControlGetEnabledColorTabFour( tabControl );
  232. border = GadgetTabControlGetEnabledBorderColorTabFour( tabControl );
  233. }
  234. // box and border
  235. if( border != WIN_COLOR_UNDEFINED )
  236. {
  237. TheWindowManager->winOpenRect( border, WIN_DRAW_LINE_WIDTH,
  238. tabX, tabY, tabX + tabWidth, tabY + tabHeight );
  239. }
  240. if( color != WIN_COLOR_UNDEFINED )
  241. {
  242. TheWindowManager->winFillRect( color, WIN_DRAW_LINE_WIDTH,
  243. tabX + 1, tabY + 1, tabX + tabWidth - 1, tabY + tabHeight - 1 );
  244. }
  245. }
  246. tabX += tabDeltaX;
  247. tabY += tabDeltaY;
  248. if( tabData->tabCount >= 6 )//Does exist
  249. {
  250. if( tabData->subPaneDisabled[5] )
  251. {//Disabled
  252. color = GadgetTabControlGetDisabledColorTabFive( tabControl );
  253. border = GadgetTabControlGetDisabledBorderColorTabFive( tabControl );
  254. }
  255. else if( tabData->activeTab == 5 )
  256. {//Hilited/Active
  257. color = GadgetTabControlGetHiliteColorTabFive( tabControl );
  258. border = GadgetTabControlGetHiliteBorderColorTabFive( tabControl );
  259. }
  260. else
  261. {//Just enabled
  262. color = GadgetTabControlGetEnabledColorTabFive( tabControl );
  263. border = GadgetTabControlGetEnabledBorderColorTabFive( tabControl );
  264. }
  265. // box and border
  266. if( border != WIN_COLOR_UNDEFINED )
  267. {
  268. TheWindowManager->winOpenRect( border, WIN_DRAW_LINE_WIDTH,
  269. tabX, tabY, tabX + tabWidth, tabY + tabHeight );
  270. }
  271. if( color != WIN_COLOR_UNDEFINED )
  272. {
  273. TheWindowManager->winFillRect( color, WIN_DRAW_LINE_WIDTH,
  274. tabX + 1, tabY + 1, tabX + tabWidth - 1, tabY + tabHeight - 1 );
  275. }
  276. }
  277. tabX += tabDeltaX;
  278. tabY += tabDeltaY;
  279. if( tabData->tabCount >= 7 )//Doesn't exist
  280. {
  281. if( tabData->subPaneDisabled[6] )
  282. {//Disabled
  283. color = GadgetTabControlGetDisabledColorTabSix( tabControl );
  284. border = GadgetTabControlGetDisabledBorderColorTabSix( tabControl );
  285. }
  286. else if( tabData->activeTab == 6 )
  287. {//Hilited/Active
  288. color = GadgetTabControlGetHiliteColorTabSix( tabControl );
  289. border = GadgetTabControlGetHiliteBorderColorTabSix( tabControl );
  290. }
  291. else
  292. {//Just enabled
  293. color = GadgetTabControlGetEnabledColorTabSix( tabControl );
  294. border = GadgetTabControlGetEnabledBorderColorTabSix( tabControl );
  295. }
  296. // box and border
  297. if( border != WIN_COLOR_UNDEFINED )
  298. {
  299. TheWindowManager->winOpenRect( border, WIN_DRAW_LINE_WIDTH,
  300. tabX, tabY, tabX + tabWidth, tabY + tabHeight );
  301. }
  302. if( color != WIN_COLOR_UNDEFINED )
  303. {
  304. TheWindowManager->winFillRect( color, WIN_DRAW_LINE_WIDTH,
  305. tabX + 1, tabY + 1, tabX + tabWidth - 1, tabY + tabHeight - 1 );
  306. }
  307. }
  308. tabX += tabDeltaX;
  309. tabY += tabDeltaY;
  310. if( tabData->tabCount >= 8 )//Doesn't exist
  311. {
  312. if( tabData->subPaneDisabled[7] )
  313. {//Disabled
  314. color = GadgetTabControlGetDisabledColorTabSeven( tabControl );
  315. border = GadgetTabControlGetDisabledBorderColorTabSeven( tabControl );
  316. }
  317. else if( tabData->activeTab == 7 )
  318. {//Hilited/Active
  319. color = GadgetTabControlGetHiliteColorTabSeven( tabControl );
  320. border = GadgetTabControlGetHiliteBorderColorTabSeven( tabControl );
  321. }
  322. else
  323. {//Just enabled
  324. color = GadgetTabControlGetEnabledColorTabSeven( tabControl );
  325. border = GadgetTabControlGetEnabledBorderColorTabSeven( tabControl );
  326. }
  327. // box and border
  328. if( border != WIN_COLOR_UNDEFINED )
  329. {
  330. TheWindowManager->winOpenRect( border, WIN_DRAW_LINE_WIDTH,
  331. tabX, tabY, tabX + tabWidth, tabY + tabHeight );
  332. }
  333. if( color != WIN_COLOR_UNDEFINED )
  334. {
  335. TheWindowManager->winFillRect( color, WIN_DRAW_LINE_WIDTH,
  336. tabX + 1, tabY + 1, tabX + tabWidth - 1, tabY + tabHeight - 1 );
  337. }
  338. }
  339. } // end W3DGadgetTabControlDraw
  340. // W3DGadgetRadioButtonImageDraw ==============================================
  341. /** Draw tabs with user supplied images */
  342. //=============================================================================
  343. void W3DGadgetTabControlImageDraw( GameWindow *tabControl,
  344. WinInstanceData *instData )
  345. {
  346. ICoord2D origin, size;
  347. // get window position and size
  348. tabControl->winGetScreenPosition( &origin.x, &origin.y );
  349. tabControl->winGetSize( &size.x, &size.y );
  350. W3DGameWinDefaultDraw(tabControl, instData);//draw the background
  351. if( BitTest( tabControl->winGetStatus(), WIN_STATUS_BORDER ) == TRUE &&
  352. !BitTest( tabControl->winGetStatus(), WIN_STATUS_SEE_THRU ) )
  353. {//draw border if desired
  354. tabControl->winDrawBorder();
  355. }
  356. TabControlData *tabData = (TabControlData *)tabControl->winGetUserData();
  357. Int tabX, tabY, tabWidth, tabHeight, tabDeltaX, tabDeltaY;
  358. tabX = origin.x + tabData->tabsLeftLimit;
  359. tabY = origin.y + tabData->tabsTopLimit;
  360. tabWidth = tabData->tabWidth;
  361. tabHeight = tabData->tabHeight;
  362. if( (tabData->tabEdge == TP_TOP_SIDE) || (tabData->tabEdge == TP_BOTTOM_SIDE) )
  363. {
  364. tabDeltaX = tabWidth;
  365. tabDeltaY = 0;
  366. }
  367. else
  368. {
  369. tabDeltaX = 0;
  370. tabDeltaY = tabHeight;
  371. }
  372. const Image *image = NULL;
  373. if( tabData->tabCount >= 1 )//Does exist
  374. {
  375. if( tabData->subPaneDisabled[0] )
  376. {//Disabled
  377. image = GadgetTabControlGetDisabledImageTabZero( tabControl );
  378. }
  379. else if( tabData->activeTab == 0 )
  380. {//Hilited/Active
  381. image = GadgetTabControlGetHiliteImageTabZero( tabControl );
  382. }
  383. else
  384. {//Just enabled
  385. image = GadgetTabControlGetEnabledImageTabZero( tabControl );
  386. }
  387. if( image != NULL )
  388. {
  389. TheWindowManager->winDrawImage( image,
  390. tabX,
  391. tabY,
  392. tabX + tabWidth,
  393. tabY + tabHeight
  394. );
  395. }
  396. }
  397. tabX += tabDeltaX;
  398. tabY += tabDeltaY;
  399. if( tabData->tabCount >= 2 )//Does exist
  400. {
  401. if( tabData->subPaneDisabled[1] )
  402. {//Disabled
  403. image = GadgetTabControlGetDisabledImageTabOne( tabControl );
  404. }
  405. else if( tabData->activeTab == 1 )
  406. {//Hilited/Active
  407. image = GadgetTabControlGetHiliteImageTabOne( tabControl );
  408. }
  409. else
  410. {//Just enabled
  411. image = GadgetTabControlGetEnabledImageTabOne( tabControl );
  412. }
  413. if( image != NULL )
  414. {
  415. TheWindowManager->winDrawImage( image,
  416. tabX,
  417. tabY,
  418. tabX + tabWidth,
  419. tabY + tabHeight
  420. );
  421. }
  422. }
  423. tabX += tabDeltaX;
  424. tabY += tabDeltaY;
  425. if( tabData->tabCount >= 3 )//Does exist
  426. {
  427. if( tabData->subPaneDisabled[2] )
  428. {//Disabled
  429. image = GadgetTabControlGetDisabledImageTabTwo( tabControl );
  430. }
  431. else if( tabData->activeTab == 2 )
  432. {//Hilited/Active
  433. image = GadgetTabControlGetHiliteImageTabTwo( tabControl );
  434. }
  435. else
  436. {//Just enabled
  437. image = GadgetTabControlGetEnabledImageTabTwo( tabControl );
  438. }
  439. if( image != NULL )
  440. {
  441. TheWindowManager->winDrawImage( image,
  442. tabX,
  443. tabY,
  444. tabX + tabWidth,
  445. tabY + tabHeight
  446. );
  447. }
  448. }
  449. tabX += tabDeltaX;
  450. tabY += tabDeltaY;
  451. if( tabData->tabCount >= 4 )//Does exist
  452. {
  453. if( tabData->subPaneDisabled[3] )
  454. {//Disabled
  455. image = GadgetTabControlGetDisabledImageTabThree( tabControl );
  456. }
  457. else if( tabData->activeTab == 3 )
  458. {//Hilited/Active
  459. image = GadgetTabControlGetHiliteImageTabThree( tabControl );
  460. }
  461. else
  462. {//Just enabled
  463. image = GadgetTabControlGetEnabledImageTabThree( tabControl );
  464. }
  465. if( image != NULL )
  466. {
  467. TheWindowManager->winDrawImage( image,
  468. tabX,
  469. tabY,
  470. tabX + tabWidth,
  471. tabY + tabHeight
  472. );
  473. }
  474. }
  475. tabX += tabDeltaX;
  476. tabY += tabDeltaY;
  477. if( tabData->tabCount >= 5 )//Does exist
  478. {
  479. if( tabData->subPaneDisabled[4] )
  480. {//Disabled
  481. image = GadgetTabControlGetDisabledImageTabFour( tabControl );
  482. }
  483. else if( tabData->activeTab == 4 )
  484. {//Hilited/Active
  485. image = GadgetTabControlGetHiliteImageTabFour( tabControl );
  486. }
  487. else
  488. {//Just enabled
  489. image = GadgetTabControlGetEnabledImageTabFour( tabControl );
  490. }
  491. if( image != NULL )
  492. {
  493. TheWindowManager->winDrawImage( image,
  494. tabX,
  495. tabY,
  496. tabX + tabWidth,
  497. tabY + tabHeight
  498. );
  499. }
  500. }
  501. tabX += tabDeltaX;
  502. tabY += tabDeltaY;
  503. if( tabData->tabCount >= 6 )//Does exist
  504. {
  505. if( tabData->subPaneDisabled[5] )
  506. {//Disabled
  507. image = GadgetTabControlGetDisabledImageTabFive( tabControl );
  508. }
  509. else if( tabData->activeTab == 5 )
  510. {//Hilited/Active
  511. image = GadgetTabControlGetHiliteImageTabFive( tabControl );
  512. }
  513. else
  514. {//Just enabled
  515. image = GadgetTabControlGetEnabledImageTabFive( tabControl );
  516. }
  517. if( image != NULL )
  518. {
  519. TheWindowManager->winDrawImage( image,
  520. tabX,
  521. tabY,
  522. tabX + tabWidth,
  523. tabY + tabHeight
  524. );
  525. }
  526. }
  527. tabX += tabDeltaX;
  528. tabY += tabDeltaY;
  529. if( tabData->tabCount >= 7 )//Doesn't exist
  530. {
  531. if( tabData->subPaneDisabled[6] )
  532. {//Disabled
  533. image = GadgetTabControlGetDisabledImageTabSix( tabControl );
  534. }
  535. else if( tabData->activeTab == 6 )
  536. {//Hilited/Active
  537. image = GadgetTabControlGetHiliteImageTabSix( tabControl );
  538. }
  539. else
  540. {//Just enabled
  541. image = GadgetTabControlGetEnabledImageTabSix( tabControl );
  542. }
  543. if( image != NULL )
  544. {
  545. TheWindowManager->winDrawImage( image,
  546. tabX,
  547. tabY,
  548. tabX + tabWidth,
  549. tabY + tabHeight
  550. );
  551. }
  552. }
  553. tabX += tabDeltaX;
  554. tabY += tabDeltaY;
  555. if( tabData->tabCount >= 8 )//Doesn't exist
  556. {
  557. if( tabData->subPaneDisabled[7] )
  558. {//Disabled
  559. image = GadgetTabControlGetDisabledImageTabSeven( tabControl );
  560. }
  561. else if( tabData->activeTab == 7 )
  562. {//Hilited/Active
  563. image = GadgetTabControlGetHiliteImageTabSeven( tabControl );
  564. }
  565. else
  566. {//Just enabled
  567. image = GadgetTabControlGetEnabledImageTabSeven( tabControl );
  568. }
  569. if( image != NULL )
  570. {
  571. TheWindowManager->winDrawImage( image,
  572. tabX,
  573. tabY,
  574. tabX + tabWidth,
  575. tabY + tabHeight
  576. );
  577. }
  578. }
  579. } // end W3DGadgetTabControlImageDraw