/* * Scol Voyager * * Author : The Scol Team : http://www.scolring.org/ * * This file is a part of the Scol Voyager * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307, USA, or go to * http://www.gnu.org/copyleft/lesser.txt * * For others informations, please contact us from http://www.scolring.org/ * */ /* * Update 2014 12, 16 : S.BISARO ($IRI) : new code with the 2dos library * instead of 2dgraphic library * */ typeof winAddressBar = ObjWin;; typeof txtAddressBar = ObjText;; typeof butAddressBar = ObjButton;; var widthAddressBar = 400;; var heightAddressBar = 30;; var marginAddressBar = 5;; var widthButtonAddressBar = 40;; fun endAddressBar ()= _DStext txtAddressBar; set txtAddressBar = nil; _DSbutton butAddressBar; set butAddressBar = nil; if winAddressBar != nil then ( _DSwindow winAddressBar; set winAddressBar = nil ); 0;; fun cbCloseAddressBar (o, u)= endAddressBar;; fun cbGoAddressBar (o, u, url)= contact url nil; endAddressBar;; fun showAddressBar(url)= if winAddressBar != nil then ( _TOPwindow winAddressBar; _SETtext txtAddressBar url; 0; ) else ( let _GETscreenSize -> [ws hs] in set winAddressBar = _CRwindow _channel nil (ws/2)-(widthAddressBar/2) (hs/2)-(heightAddressBar/2) widthAddressBar heightAddressBar WN_NOCAPTION|WN_NOBORDER "Scol Address Bar"; set txtAddressBar = _CReditLine _channel winAddressBar marginAddressBar marginAddressBar widthAddressBar-(3*marginAddressBar)-widthButtonAddressBar heightAddressBar-(2*marginAddressBar) ET_AHSCROLL|ET_ALIGN_LEFT ""; set butAddressBar = _CRbutton _channel winAddressBar widthAddressBar-marginAddressBar-widthButtonAddressBar marginAddressBar widthButtonAddressBar heightAddressBar-(2*marginAddressBar) 0 loc_get "CLOSE"; _CBbutton butAddressBar @cbCloseAddressBar 0; _CBlineOk txtAddressBar @cbGoAddressBar 0; _CBwinDestroy winAddressBar @cbCloseAddressBar 0; 0 );;