var sAddressBarBgText = "locked/voyager/img/bgtext.png";; var sAddressBarBtnClose = "locked/voyager/img/btnclose.png";; typeof contAddressBar = ObjContainer;; typeof txtAddressBar = CompText;; fun cbAddressBarDestroy(cont, p)= let p -> [cmbmpAddressBar cmpbtnCloseAddressBar alphabar alphabtn] in ( _DSalphaBitmap alphabar; _DSalphaBitmap alphabtn; _DScompText txtAddressBar; _DScontainer contAddressBar; _DScompBitmap cmbmpAddressBar; _DScompRollOver cmpbtnCloseAddressBar; set contAddressBar = nil; set txtAddressBar = nil; ); 0;; fun cbAddressBarValidation(cmptxt, p, type, url)= if (type != CT_VALIDENTER) || (url == nil) || (!strcmpi url "") then nil else let p -> [cmbmpAddressBar cmpbtnCloseAddressBar alphabar alphabtn] in ( contact url nil; cbAddressBarDestroy contAddressBar p; ); 0;; fun cbAddressBarQuit(roll, p, x, y, btn, mask)= let p -> [cmbmpAddressBar cmpbtnCloseAddressBar alphabar alphabtn] in cbAddressBarDestroy contAddressBar p; 0;; fun showAddressBar(url)= if contAddressBar != nil then ( _TOPcontainer contAddressBar; _SETcompText txtAddressBar url nil nil CT_NOCHANGE; 0; ) else let _LDalphaBitmap _channel _checkpack sAddressBarBgText -> alphabar in let _GETalphaBitmapSize alphabar -> [aw ah] in let _LDalphaBitmap _channel _checkpack sAddressBarBtnClose -> alphabtn in let _GETalphaBitmapSize alphabtn -> [bw bh] in let _GETscreenSize -> [sw sh] in let _CRcontainerFromObjWin _channel nil ((sw / 2) - ((aw + bw + 20) / 2)) ((sh / 2) - ((ah + 20) / 2)) (aw + bw + 20) (ah + 20) CO_NOCAPTION 0xffffff "" -> contBar in let _CRcompBitmap _channel contBar nil [10 10] OBJ_ENABLE|OBJ_VISIBLE nil alphabar 0 0 aw ah -> cmbmpAddressBar in let _CRcompText _channel contBar (_CONVERTcompBitmapToObjNode cmbmpAddressBar) [5 5] CT_LEFT|CT_EDITLINE|OBJ_VISIBLE|OBJ_ENABLE nil (aw - 10) (ah - 10) url _GETdefaultFont [0x000000 0 0 0] [0x000000 80] nil nil -> txtBar in let _CRcompRollOver _channel contBar nil [(aw + 10) 10] ROL_DISABLE|ROL_MASK|OBJ_ENABLE|OBJ_VISIBLE nil alphabtn -> cmpbtnCloseAddressBar in let [cmbmpAddressBar cmpbtnCloseAddressBar alphabar alphabtn] -> p in ( set contAddressBar = contBar; set txtAddressBar = txtBar; _CBcompRollOverClick cmpbtnCloseAddressBar @cbAddressBarQuit p; _CBcompTextValidation txtAddressBar @cbAddressBarValidation p CT_VALIDENTER; _CBcontainerDestroy contAddressBar @cbAddressBarDestroy p; _PAINTcontainer contAddressBar; 0; ); 0;;