CToolbarButton.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. /********************************************************************************************************************************
  2. * Licensed Materials - Property of IBM *
  3. * *
  4. * IBM Cognos Products: AGS *
  5. * *
  6. * (C) Copyright IBM Corp. 2005, 2014 *
  7. * *
  8. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. *
  9. *********************************************************************************************************************************/
  10. /*-----------------------------------------------------------------------------------------------------
  11. Class : CToolbarButton
  12. Description :
  13. -----------------------------------------------------------------------------------------------------*/
  14. var tbUniqueId = 0;
  15. function makeId() {
  16. return tbUniqueId++;
  17. }
  18. gDropDownButtonStyle = new CUIStyle('dropDownArrow','dropDownArrowOver','','','');
  19. function CToolbarButton(parent, action, iconPath, toolTip, style, bHideDropDown, label, dropDownToolTip, iconWidth, capability) {
  20. this.m_id = 'tbbutton'+makeId();
  21. this.m_bVisible = true;
  22. this.m_action = action;
  23. this.m_toolTip = toolTip;
  24. this.m_capability = capability;
  25. this.m_icon = (iconPath) ? new CIcon(iconPath, toolTip) : null;
  26. if(iconWidth!=null && iconPath!=null){
  27. this.m_icon.setWidth(iconWidth);
  28. }
  29. this.m_parent = parent;
  30. this.m_menu = null;
  31. if (typeof bHideDropDown == "boolean")
  32. this.m_bHideDropDown = bHideDropDown;
  33. else
  34. this.m_bHideDropDown = false;
  35. this.m_style = new CUIStyle(style.getNormalState(),style.getRolloverState(),style.getDepressedState(),style.getDepressedRolloverState(),style.getDisabledState());
  36. this.m_observers = new CObserver(this);
  37. if(typeof this.m_parent == "object" && typeof this.m_parent.add == "function")
  38. this.m_parent.add(this);
  39. this.m_label = (label) ? label : null;
  40. this.m_dropDownToolTip = (dropDownToolTip) ? dropDownToolTip : this.m_toolTip;
  41. }
  42. function CToolbarButton_getId() {
  43. return this.m_id;
  44. }
  45. function CToolbarButton_draw() {
  46. var html='';
  47. var tabindexVal = -1 ;
  48. if (AccessibilityHandler.isEnabled()) {
  49. tabindexVal = AccessibilityHandler.getTabindex(this);
  50. }
  51. html += '<div style="margin-right:3px;"><button type="button" role="menuitem" id="';
  52. html += this.m_id;
  53. html += '"';
  54. html += 'tabindex='+ tabindexVal +'';
  55. if(typeof this.getStyle() == "object") {
  56. html += ' class="' + this.getStyle().getActiveState() + '"';
  57. if (this.getStyle().getActiveState() != this.getStyle().getDisabledState())
  58. {
  59. html += ' hideFocus="true" accessKey="1"';
  60. }
  61. }
  62. if (this.m_toolTip != "")
  63. {
  64. html += ' title="' + this.m_toolTip + '"';
  65. }
  66. html += '>';
  67. if (this.m_icon != null)
  68. {
  69. html += this.m_icon.draw();
  70. }
  71. if (this.m_label != null)
  72. {
  73. html += this.m_label;
  74. }
  75. html += '</button>';
  76. if(this.m_menu != null && !this.m_bHideDropDown) {
  77. html += '<button type="button" role="menuitem" id="';
  78. html += ('menu' + this.getId());
  79. html += '"';
  80. html += 'tabindex='+ tabindexVal +'';
  81. if(typeof this.getStyle() == "object") {
  82. html += ' class="'+gDropDownButtonStyle.getActiveState() + '"';
  83. if (this.getStyle().getActiveState() != this.getStyle().getDisabledState())
  84. {
  85. html += ' hideFocus="true" accessKey="1"';
  86. }
  87. }
  88. if (this.m_dropDownToolTip != "")
  89. {
  90. html += ' title="' + this.m_dropDownToolTip + '"';
  91. }
  92. html += '><img border="0" src="../ags/images/toolbar_drop_arrow.gif"';
  93. if (this.m_dropDownToolTip != "")
  94. {
  95. html += ' alt="' + this.m_dropDownToolTip + '"';
  96. html += ' title="' + this.m_dropDownToolTip + '"';
  97. }
  98. html += ' width="7" height="16"/></button>';
  99. }
  100. html += '</div>';
  101. return html;
  102. }
  103. function CToolbarButton_attachEvents() {
  104. if(typeof this.getParent().getHTMLContainer != "function")
  105. return; // this method must be implemented by the parent
  106. htmlContainer = this.getParent().getHTMLContainer();
  107. if(htmlContainer == null)
  108. return;
  109. if(document.all && typeof(htmlContainer.document) != 'undefined'){
  110. hTbItem = eval(htmlContainer.document.getElementById(this.m_id));
  111. }else{
  112. hTbItem = eval(htmlContainer.ownerDocument.getElementById(this.m_id));
  113. }
  114. if(hTbItem == null)
  115. return; // just to be safe
  116. hTbItem.onmouseover = this.onmouseover;
  117. hTbItem.onmouseout = this.onmouseout;
  118. hTbItem.onmouseup = this.onmouseup;
  119. hTbItem.onkeypress = this.onkeypress;
  120. hTbItem.onfocus = this.onfocus;
  121. hTbItem.onblur = this.onblur;
  122. hTbItem.tbItem = eval(this);
  123. // attach the drop down arrow event handlers to the toolbar button as well
  124. if(this.m_menu != null && !this.m_bHideDropDown) {
  125. if(document.all && typeof(htmlContainer.document) != 'undefined'){
  126. hmenu = eval(htmlContainer.document.getElementById('menu'+this.getId()));
  127. }else{
  128. hmenu = eval(htmlContainer.ownerDocument.getElementById('menu'+this.getId()));
  129. }
  130. //hmenu = eval(document.all ? htmlContainer.document.getElementById('menu'+this.getId()) : htmlContainer.ownerDocument.getElementById('menu'+this.getId()));
  131. hmenu.onmouseover = this.onmouseover;
  132. hmenu.onmouseout = this.onmouseout;
  133. hmenu.onmouseup = this.onmouseup;
  134. hmenu.onkeypress = this.onkeypress;
  135. hmenu.onfocus = this.onfocus;
  136. hmenu.onblur = this.onblur;
  137. hmenu.tbItem = eval(this);
  138. }
  139. }
  140. function CToolbarButton_createDropDownMenu(menuStyle, dropDownToolTip) {
  141. this.m_dropDownToolTip = (dropDownToolTip) ? dropDownToolTip : this.m_toolTip;
  142. this.m_menu = new CMenu('dropDown'+this.getId(),menuStyle);
  143. this.m_menu.setParent(this);
  144. return this.m_menu;
  145. }
  146. function CToolbarButton_addOwnerDrawControl(control) {
  147. this.m_menu = control
  148. if(typeof control.setParent != "undefined")
  149. this.m_menu.setParent(this);
  150. }
  151. function CToolbarButton_getParent() {
  152. return this.m_parent;
  153. }
  154. function CToolbarButton_setParent(parent) {
  155. this.m_parent = parent;
  156. }
  157. function CToolbarButton_getAction() {
  158. return this.m_action;
  159. }
  160. function CToolbarButton_setAction(action) {
  161. this.m_action = action
  162. }
  163. function CToolbarButton_getToolTip() {
  164. return this.m_toolTip;
  165. }
  166. function CToolbarButton_setToolTip(tooltip) {
  167. this.m_toolTip = tooltip;
  168. }
  169. function CToolbarButton_getDropDownToolTip() {
  170. return this.m_dropDownToolTip;
  171. }
  172. function CToolbarButton_setDropDownToolTip(tooltip) {
  173. this.m_dropDownToolTip = tooltip;
  174. }
  175. function CToolbarButton_getIcon() {
  176. return this.m_icon;
  177. }
  178. function CToolbarButton_setIcon(iconPath) {
  179. this.m_icon.setPath(iconPath);
  180. }
  181. function CToolbarButton_enableTabindex() {
  182. this.getHTMLElement().setAttribute("tabindex", "0");
  183. }
  184. function CToolbarButton_disableTabindex() {
  185. this.getHTMLElement().setAttribute("tabindex", "-1");
  186. }
  187. function CToolbarButton_onfocus(evt) {
  188. //get the event in a cross-browser fashion
  189. evt = (evt) ? evt : ((event) ? event : null);
  190. var toolbarButton = this.tbItem;
  191. if(toolbarButton == null || !(toolbarButton instanceof CToolbarButton) || !toolbarButton.isEnabled())
  192. return;
  193. var parent = toolbarButton.getParent();
  194. if (toolbarButton.getMenu() != null && toolbarButton.getMenu().isVisible()) {
  195. toolbarButton.getMenu().remove();
  196. }
  197. if (AccessibilityHandler.isEnabled()) {
  198. for (var i=0; i<parent.getNumItems(); i++) {
  199. if (parent.get(i) instanceof CToolbarButton) {
  200. if (toolbarButton == parent.get(i)) {
  201. parent.get(i).enableTabindex();
  202. if(toolbarButton.getMenu() != null && !toolbarButton.m_bHideDropDown && ('menu'+toolbarButton.getId()) == this.id) {
  203. this.className = gDropDownButtonStyle.getActiveRolloverState();
  204. } else {
  205. this.className = toolbarButton.getStyle().getActiveRolloverState();
  206. }
  207. }
  208. else
  209. parent.get(i).disableTabindex();
  210. }
  211. }
  212. }
  213. }
  214. function CToolbarButton_onmouseover(evt) {
  215. var toolbarButton = this.tbItem;
  216. if(typeof toolbarButton == "object") {
  217. if(!toolbarButton.isEnabled())
  218. return;
  219. if(toolbarButton.getMenu() != null && !toolbarButton.m_bHideDropDown && ('menu'+toolbarButton.getId()) == this.id) {
  220. this.className = gDropDownButtonStyle.getActiveRolloverState();
  221. } else {
  222. if(typeof toolbarButton.getStyle() == "object")
  223. this.className = toolbarButton.getStyle().getActiveRolloverState();
  224. if(toolbarButton.getMenu() != null && !toolbarButton.m_bHideDropDown) {
  225. var dropDownArrow = null;
  226. if(document.all && typeof(this.document) != 'undefined'){
  227. dropDownArrow = this.document.getElementById('menu'+toolbarButton.getId());
  228. }else{
  229. dropDownArrow = this.ownerDocument.getElementById('menu'+toolbarButton.getId());
  230. }
  231. //var dropDownArrow = document.all ? this.document.getElementById('menu'+toolbarButton.getId()) : this.ownerDocument.getElementById('menu'+toolbarButton.getId());
  232. if(typeof dropDownArrow == "object")
  233. dropDownArrow.className = gDropDownButtonStyle.getActiveRolloverState();
  234. }
  235. }
  236. // send the message up to our parent
  237. if(toolbarButton.getParent() != null && typeof toolbarButton.getParent().onmouseover == "function")
  238. toolbarButton.getParent().onmouseover(evt);
  239. // notify our observers of this event
  240. toolbarButton.getObservers().notify(CToolbarButton_onmouseover);
  241. }
  242. }
  243. function CToolbarButton_onmouseout(evt) {
  244. toolbarButton = this.tbItem;
  245. if(typeof toolbarButton == "object") {
  246. if(!toolbarButton.isEnabled())
  247. return;
  248. if(toolbarButton.getMenu() != null && !toolbarButton.m_bHideDropDown && ('menu'+toolbarButton.getId()) == this.id) {
  249. this.className = gDropDownButtonStyle.getActiveState();
  250. } else {
  251. if(typeof toolbarButton.getStyle() == "object")
  252. this.className = toolbarButton.getStyle().getActiveState();
  253. if(toolbarButton.getMenu() != null && !toolbarButton.m_bHideDropDown) {
  254. if(document.all && typeof(this.document) != 'undefined'){
  255. dropDownArrow = this.document.getElementById('menu'+toolbarButton.getId());
  256. }else{
  257. dropDownArrow = this.ownerDocument.getElementById('menu'+toolbarButton.getId());
  258. }
  259. //dropDownArrow = document.all ? this.document.getElementById('menu'+toolbarButton.getId()) : this.ownerDocument.getElementById('menu'+toolbarButton.getId());
  260. if(typeof dropDownArrow == "object")
  261. dropDownArrow.className = gDropDownButtonStyle.getActiveState();
  262. }
  263. }
  264. // send the message up to our parent
  265. if(toolbarButton.getParent() != null && typeof toolbarButton.getParent().onmouseout == "function")
  266. toolbarButton.getParent().onmouseout(evt);
  267. // notify our observers of this event
  268. toolbarButton.getObservers().notify(CToolbarButton_onmouseout);
  269. }
  270. }
  271. function CToolbarButton_onmouseup(evt) {
  272. //get the event in a cross-browser fashion
  273. evt = (evt) ? evt : ((event) ? event : null);
  274. var buttonValue = (document.all && typeof(this.document) != 'undefined')?1:0;
  275. if (evt.button != buttonValue) {
  276. //Only do it for left click
  277. return;
  278. }
  279. // get the toolbar button from the html element
  280. var toolbarButton = this.tbItem;
  281. if(toolbarButton != null) {
  282. if(!toolbarButton.isEnabled())
  283. return;
  284. var menu = toolbarButton.getMenu();
  285. if(menu != null && ((this.id == ('menu'+toolbarButton.getId())) || (toolbarButton.m_bHideDropDown && this.id == toolbarButton.getId()))) {
  286. if(menu.isVisible()) {
  287. menu.remove();
  288. } else {
  289. // the user clicked the drop down arrow
  290. if(typeof menu.setHTMLContainer != "undefined")
  291. menu.setHTMLContainer((document.all && typeof(this.document) != 'undefined')? this.document.body : this.ownerDocument.body);
  292. toolbarButton.showMenu(menu);
  293. }
  294. } else {
  295. eval(this.tbItem.m_action);
  296. }
  297. // send the message up to our parent
  298. if(toolbarButton.getParent() != null && typeof toolbarButton.getParent().onmouseup == "function")
  299. toolbarButton.getParent().onmouseup(evt);
  300. // notify our observers of this event
  301. toolbarButton.getObservers().notify(CToolbarButton_onmouseup);
  302. }
  303. if (this.blur && this.hasFocus && this.hasFocus()){
  304. this.blur();
  305. }
  306. evt.cancelBubble = true;
  307. return false;
  308. }
  309. function CToolbarButton_onkeypress(evt) {
  310. //get the event in a cross-browser fashion
  311. evt = (evt) ? evt : ((event) ? event : null);
  312. var keyCode = evt.keyCode || evt.which;
  313. if(AccessibilityHandler.isEnabled()) {
  314. //check the listener belong to CToolBar menu.
  315. if(!this.hasOwnProperty('tbItem')){
  316. return;
  317. }
  318. var toolbarButton = this.tbItem;
  319. //check for the Tab key press, transfer the event to HTML body.
  320. if (keyCode == 9) {
  321. return true;
  322. }
  323. //check for the space key press
  324. if (keyCode == 32) {
  325. var menu = toolbarButton.getMenu();
  326. if (menu != null) {
  327. toolbarButton.showMenu(menu);
  328. }
  329. }
  330. //check for the Left and Right key press
  331. else if (keyCode == 37 || keyCode == 39) {
  332. var nextItem = AccessibilityHandler.getNextItem(toolbarButton,keyCode);
  333. nextItem.setFocus();
  334. }
  335. else if (keyCode == 40) {
  336. var menu = toolbarButton.getMenu();
  337. if (menu != null && toolbarButton.getMenuType() == "dropDown") {
  338. toolbarButton.showMenu(menu);
  339. }
  340. }
  341. //check for the Enter key press
  342. else if (keyCode == 13) {
  343. if(toolbarButton != null) {
  344. if(!toolbarButton.isEnabled())
  345. return;
  346. var menu = toolbarButton.getMenu();
  347. if(menu != null && ((this.id == ('menu'+toolbarButton.getId())) || (toolbarButton.m_bHideDropDown && this.id == toolbarButton.getId()))) {
  348. if(menu.isVisible()) {
  349. menu.remove();
  350. } else {
  351. // the user clicked the drop down arrow
  352. if(typeof menu.setHTMLContainer != "undefined")
  353. menu.setHTMLContainer((document.all && typeof this.document != 'undefined') ? this.document.body : this.ownerDocument.body);
  354. toolbarButton.showMenu(menu);
  355. }
  356. } else {
  357. eval(toolbarButton.m_action);
  358. }
  359. // send the message up to our parent
  360. if(toolbarButton.getParent() != null && typeof toolbarButton.getParent().onkeypress == "function")
  361. toolbarButton.getParent().onkeypress(evt);
  362. // notify our observers of this event
  363. toolbarButton.getObservers().notify(CToolbarButton_onkeypress);
  364. }
  365. }
  366. }
  367. evt.cancelBubble = true;
  368. return false;
  369. }
  370. function CToolbarButton_showMenu(menu) {
  371. menu.draw();
  372. menu.show();
  373. if(menu.get(0) != null) {
  374. menu.get(0).setFocus();
  375. }
  376. }
  377. function CToolbarButton_getHTMLElement() {
  378. var htmlElement = null;
  379. if(this.getParent && typeof this.getParent().getHTMLContainer == "function") {
  380. var htmlContainer = this.getParent().getHTMLContainer();
  381. if(htmlContainer != null) {
  382. if(document.all && typeof htmlContainer.document != 'undefined'){
  383. htmlElement = htmlContainer.document.getElementById(this.getId());
  384. }else{
  385. htmlElement = htmlContainer.ownerDocument.getElementById(this.getId());
  386. }
  387. //htmlElement = document.all ? htmlContainer.document.getElementById(this.getId()) : htmlContainer.ownerDocument.getElementById(this.getId());
  388. }
  389. }
  390. return htmlElement;
  391. }
  392. function CToolbarButton_getMenu() {
  393. return this.m_menu;
  394. }
  395. function CToolbarButton_getMenuType() {
  396. // current toolbar buttons only support drop down menus
  397. return 'dropDown';
  398. }
  399. function CToolbarButton_setStyle(style) {
  400. this.m_style = style;
  401. }
  402. function CToolbarButton_getStyle() {
  403. return this.m_style;
  404. }
  405. function CToolbarButton_isVisible() {
  406. return this.m_bVisible;
  407. }
  408. function CToolbarButton_hide() {
  409. this.m_bVisible = false;
  410. }
  411. function CToolbarButton_show() {
  412. this.m_bVisible = true;
  413. }
  414. function CToolbarButton_setCapability(capability) {
  415. this.m_capability = capability;
  416. }
  417. function CToolbarButton_getCapability() {
  418. return this.m_capability;
  419. }
  420. function CToolbarButton_enable() {
  421. this.getStyle().setActiveState('normal');
  422. this.getStyle().setActiveRolloverState('normal');
  423. if (this.getIcon())
  424. {
  425. this.getIcon().enable();
  426. }
  427. this.updateHTML();
  428. }
  429. function CToolbarButton_disable() {
  430. this.getStyle().setActiveState('disabled');
  431. this.getStyle().setActiveRolloverState('disabled');
  432. if (this.getIcon())
  433. {
  434. this.getIcon().disable();
  435. }
  436. this.updateHTML();
  437. }
  438. function CToolbarButton_isEnabled() {
  439. if (this.getIcon())
  440. {
  441. return this.getIcon().isEnabled();
  442. }
  443. else
  444. {
  445. return true;
  446. }
  447. }
  448. function CToolbarButton_pressed() {
  449. this.getStyle().setActiveState('depressed');
  450. this.getStyle().setActiveRolloverState('depressed');
  451. this.updateHTML();
  452. }
  453. function CToolbarButton_reset() {
  454. this.getStyle().setActiveState('normal');
  455. this.getStyle().setActiveRolloverState('normal');
  456. this.updateHTML();
  457. }
  458. function CToolbarButton_updateHTML() {
  459. if(typeof this.getStyle() == "object") {
  460. if(typeof this.getParent().getHTMLContainer == "function") {
  461. var htmlContainer = this.getParent().getHTMLContainer();
  462. if(htmlContainer != null) {
  463. var htmlElement = null;
  464. if(document.all && typeof htmlContainer.document != "undefined"){
  465. htmlElement = htmlContainer.document.getElementById(this.getId());
  466. }else{
  467. htmlElement = htmlContainer.ownerDocument.getElementById(this.getId());
  468. }
  469. //var htmlElement = document.all ? htmlContainer.document.getElementById(this.getId()) : htmlContainer.ownerDocument.getElementById(this.getId());
  470. if(htmlElement != null) {
  471. var toolbarImage = htmlElement.getElementsByTagName("img");
  472. if(typeof toolbarImage != 'undefined') {
  473. if (this.getIcon())
  474. {
  475. if(this.getIcon().isEnabled()) {
  476. toolbarImage[0].src = this.getIcon().getPath();
  477. } else {
  478. toolbarImage[0].src = this.getIcon().getDisabledImagePath();
  479. }
  480. }
  481. }
  482. if(this.getStyle().getActiveState() != this.getStyle().getDisabledState()) {
  483. htmlElement.tabIndex = 0;
  484. if (this.getMenu() != null && !this.m_bHideDropDown) {
  485. htmlElement.nextSibling.tabIndex = 0;
  486. htmlElement.nextSibling.accessKey = 1;
  487. }
  488. } else {
  489. if (htmlElement.tabIndex != 'undefined') {
  490. htmlElement.removeAttribute("tabIndex");
  491. htmlElement.removeAttribute("accessKey");
  492. if (this.getMenu() != null) {
  493. htmlElement.nextSibling.removeAttribute("tabIndex");
  494. htmlElement.nextSibling.removeAttribute("accessKey");
  495. }
  496. }
  497. }
  498. htmlElement.className = this.getStyle().getActiveState();
  499. }
  500. }
  501. }
  502. }
  503. }
  504. function CToolbarButton_getObservers() {
  505. return this.m_observers;
  506. }
  507. function CToolbarButton_setFocus() {
  508. if (this.m_menu != null && !this.m_bHideDropDown)
  509. document.getElementById(this.m_id).nextSibling.focus();
  510. else
  511. document.getElementById(this.m_id).focus();
  512. }
  513. CToolbarButton.prototype.draw = CToolbarButton_draw;
  514. CToolbarButton.prototype.attachEvents = CToolbarButton_attachEvents;
  515. CToolbarButton.prototype.onblur = CToolbarButton_onmouseout;
  516. CToolbarButton.prototype.onfocus = CToolbarButton_onfocus;
  517. CToolbarButton.prototype.onkeypress = CToolbarButton_onkeypress;
  518. CToolbarButton.prototype.onmouseover = CToolbarButton_onmouseover;
  519. CToolbarButton.prototype.onmouseout = CToolbarButton_onmouseout;
  520. CToolbarButton.prototype.onmouseup = CToolbarButton_onmouseup;
  521. CToolbarButton.prototype.setParent = CToolbarButton_setParent;
  522. CToolbarButton.prototype.getParent = CToolbarButton_getParent;
  523. CToolbarButton.prototype.getAction = CToolbarButton_getAction;
  524. CToolbarButton.prototype.setAction = CToolbarButton_setAction;
  525. CToolbarButton.prototype.getToolTip = CToolbarButton_getToolTip;
  526. CToolbarButton.prototype.setToolTip = CToolbarButton_setToolTip;
  527. CToolbarButton.prototype.getDropDownToolTip = CToolbarButton_getDropDownToolTip;
  528. CToolbarButton.prototype.setDropDownToolTip = CToolbarButton_setDropDownToolTip;
  529. CToolbarButton.prototype.getIcon = CToolbarButton_getIcon;
  530. CToolbarButton.prototype.setIcon = CToolbarButton_setIcon;
  531. CToolbarButton.prototype.getMenu = CToolbarButton_getMenu;
  532. CToolbarButton.prototype.getMenuType = CToolbarButton_getMenuType;
  533. CToolbarButton.prototype.getId = CToolbarButton_getId;
  534. CToolbarButton.prototype.setStyle = CToolbarButton_setStyle;
  535. CToolbarButton.prototype.getStyle = CToolbarButton_getStyle;
  536. CToolbarButton.prototype.createDropDownMenu = CToolbarButton_createDropDownMenu;
  537. CToolbarButton.prototype.addOwnerDrawControl = CToolbarButton_addOwnerDrawControl;
  538. CToolbarButton.prototype.getObservers = CToolbarButton_getObservers;
  539. CToolbarButton.prototype.update = new Function("return true");
  540. CToolbarButton.prototype.isVisible = CToolbarButton_isVisible;
  541. CToolbarButton.prototype.hide = CToolbarButton_hide;
  542. CToolbarButton.prototype.show = CToolbarButton_show;
  543. CToolbarButton.prototype.isEnabled = CToolbarButton_isEnabled;
  544. CToolbarButton.prototype.enable = CToolbarButton_enable;
  545. CToolbarButton.prototype.disable = CToolbarButton_disable;
  546. CToolbarButton.prototype.pressed = CToolbarButton_pressed;
  547. CToolbarButton.prototype.reset = CToolbarButton_reset;
  548. CToolbarButton.prototype.setFocus = CToolbarButton_setFocus;
  549. CToolbarButton.prototype.updateHTML = CToolbarButton_updateHTML;
  550. CToolbarButton.prototype.setCapability = CToolbarButton_setCapability;
  551. CToolbarButton.prototype.getCapability = CToolbarButton_getCapability;
  552. CToolbarButton.prototype.getHTMLElement = CToolbarButton_getHTMLElement;
  553. CToolbarButton.prototype.showMenu = CToolbarButton_showMenu;
  554. CToolbarButton.prototype.enableTabindex = CToolbarButton_enableTabindex;
  555. CToolbarButton.prototype.disableTabindex = CToolbarButton_disableTabindex;