|
Post by Chris Iverson on Jul 9, 2019 17:04:19 GMT -5
That's what it sounds like to me.
By far not the first people to mention such an idea.
Heck, that's why the Electron Framework even exists: to let you create desktop applications just like you would a website, using HTML, CSS, and Javascript, without needing to host them on a server.
If it's just wanting to design UIs like you would a webpage, you might be able to get away with using something like Alyce's LB Browser DLL to just locally display HTML pages. Full interactivity would be a bigger issue, though, since LB wouldn't receive event notifications from the interacted page.
The only issue with fully including that functionality in LB is that writing an HTML renderer is a massive undertaking, that not even the big three browser engines get right. And that's just HTML; to say nothing of the added styling capabilities of CSS(which is another whole undertaking), and the interactivity of Javascript(if you're dealing with anything that requires Javascript, which is another whole huge headache).
|
|
|
Post by mystic on Jul 9, 2019 18:40:52 GMT -5
I would love to use RB but I cannot install the server program that runs RB. As it is, I skirt the gray area writing and running my own code on work computers. If my program began by launching it's own webserver that would be a serious red flag. If it were built into my LB .exe (and not as a webserver), I could get away with it. Oh well, the trials of working on critical networks. This is in regard only to the dynamic layout of user interfaces then? Someone else was asking me to add HTTP serving features. Exactly. I would like the HTTP type ability for the GUI, but I don't really need it to be accessed by a client. I suppose you can still utilize a pretend HTTP "link" as a real link that called your browser if you want, but I would just like the look and feel of HTTP without the need of it being on a server. Something like when you click on a link it would behave like an HTTP link (turn a color, open a new page, or whatever). I have seen some folks providing some creative ways to possibly achieve this, but it requires .DLL's, and some more complicated programming. Sort of like a "LINK" command. So instead of "PRINT", "LINK" would mean that the text you add to the screen will react just like an HTTP link does. Turns a color then reacts to what you want to make it do. Clear screen and show a new screen, open a new screen, play a video. Sort of like just a call function type command.
|
|
|
Post by mystic on Jul 9, 2019 18:48:51 GMT -5
That's what it sounds like to me. By far not the first people to mention such an idea. Heck, that's why the Electron Framework even exists: to let you create desktop applications just like you would a website, using HTML, CSS, and Javascript, without needing to host them on a server. If it's just wanting to design UIs like you would a webpage, you might be able to get away with using something like Alyce's LB Browser DLL to just locally display HTML pages. Full interactivity would be a bigger issue, though, since LB wouldn't receive event notifications from the interacted page. The only issue with fully including that functionality in LB is that writing an HTML renderer is a massive undertaking, that not even the big three browser engines get right. And that's just HTML; to say nothing of the added styling capabilities of CSS(which is another whole undertaking), and the interactivity of Javascript(if you're dealing with anything that requires Javascript, which is another whole huge headache). Although it would be cool to integrate and entire HTML system into LB, that would literally be insane. LOL Basically, I would be happy with just the LINK ability mentioned in my other post. Heck even if someone could create a function that can be added to any text I would like to do this with, that would work. It's a bit above my skill level.
|
|
|
Post by meerkat on Jul 9, 2019 19:36:04 GMT -5
Maybe some kind of link similar to this would work?? Yes Android WebView handles the display. Maybe there is a DLL somewhere to do something similar?? rfobasic.miraheze.org/wiki/HTML
|
|
|
Post by Rod on Jul 10, 2019 5:46:08 GMT -5
Well I can start a browser using LBPE code samples. I can point this at local html files and hop about at will using links. But I am in the browser, which is great for presenting html, but how to get info back to Liberty? I see I need a PHP script to take input, I can create an input form with a button but the input is thrown back to the PHP server. I get page not found errors. I know zilch about html or PHP, but perhaps someone knows how to push info back to Liberty?
These are the three html files I started with, put them in a directory and set the correct path in the browser program. first.htm
second.htm
input.htm
And this is a extract from the LBPE, the minimal browser
'the minimal browser
nomainwin
WindowWidth=DisplayWidth-100 WindowHeight=DisplayHeight-100 UpperLeftX=1:UpperLeftY=1 menu #main, "&File","E&xit", [quit]
graphicbox #main.g, 0, 0, 100, 100
Open "Liberty Basic Browser ATL Demo" For Window_nf As #main #main "TrapClose [quit]"
Open "atl" For DLL As #atl CallDLL #atl, "AtlAxWinInit", Ret As long
hWndViewer = hWnd(#main.g) 'Windows handle of graphicbox hMain = hWnd(#main) 'Windows handle of main window
STRUCT Rect,_ 'struct for storing client area rectangle leftX as long,_ 'upper left x upperY as long,_ 'upper left y rightX as long,_ 'lower right x lowerY as long 'lower right y
calldll #user32,"GetClientRect",_ hMain as ulong,_ 'window handle Rect as struct,_ 'name of struct r as long 'return cw = Rect.rightX.struct ch = Rect.lowerY.struct
'resize graphicbox to fill client area of window #main.g "locate 0 0 ";cw+2;" ";ch+2 #main "refresh"
CallDLL #user32, "GetWindowLongA", _ hWndViewer As ulong, _ 'handle of graphicbox _GWL_HINSTANCE As long, _ 'flag to get instance handle hInst As ulong 'returns instance handle of graphicbox
style = _WS_CHILD or _WS_VISIBLE or _WS_VSCROLL
url$ = "c:\atemp\links\first.htm" CallDLL #user32, "CreateWindowExA", _ _WS_EX_STATICEDGE As long, _ 'extended type "AtlAxWin" As ptr, _ 'class name url$ As ptr, _ 'URL, or progID or CLSID style As long, _ 'window style 0 As long, _ 'left x pos 0 As long, _ 'top y pos cw As long, _ 'width ch As long, _ 'height hWndViewer As ulong, _ 'handle of parent = graphicbox 100 As long, _ 'handle to menu or child window ID hInst As ulong, _ 'parent instance handle 0 As long, _ 'window creation data hATL As ulong 'handle of active template library control wait
[quit] Close #main close #atl 'close DLL after closing window end
I will repeat, I have no web skills at all, so just wanting to understand what functionality we have and what needs added.
|
|
|
Post by mystic on Jul 11, 2019 12:46:14 GMT -5
Launching an html file into a browser is not a problem, but once that is done you have lost control of LB.
I already have programs that create very detailed web pages, but these are all just static pages because I cannot have any type of backend web server.
Essentially I would just like the ability for LB to create a similar look and feel of an HTML link for menus or to move the program along. (just the link, not the full complement of the HTML abilities).
|
|
|
Post by mystic on Jul 11, 2019 13:12:54 GMT -5
Since this sort of went off the rails of the original post, I created a new thread to address this specifically. New thread
|
|