https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • f

    fierce-soccer-8550

    12/06/2022, 6:51 AM
    As far as your question of going from an html5 backend to a desktop app, you could write your html5 application in a way so that it is downloadable and can be used while offline. I believe its referred to as PWA - progressive web app it seems. But on the haxe website you can look at how to compile to multiple platforms, there is an article or two there in the how-to or manual.
  • p

    purple-businessperson-14467

    12/06/2022, 8:11 AM
    Haxeui has some sample projects. haxeui create electron haxeui create tauri you may need to do a haxelib run haxeui create electron haxelib run haxeui create tauri I havent played with electron sample. Tauri is Rust great, but required 4gb of dev code, final output is 4mb? Tauri and tryphotino are using Webview2 (photino is C# but no haxeui sample) I also tried haxeui inside Maui using WebView2
  • p

    purple-businessperson-14467

    12/06/2022, 8:16 AM
    Electron distributes the full brower so fairly large install but all of the OSes get the same browser. Tauri, Photino, Maui use Webview2 so it uses the engine that resides on OS. Webkit used for OSX and Edge for windows. Webview2 is installed by default with windows 11. So final app can be 4mb since the "browser" is already installed. You can also distribute webview2 rather than use shared install.
  • b

    bright-gpu-74537

    12/06/2022, 8:31 AM
    can you repro it in HL and send it? Doesnt have to be in the builder, its just convenient
  • b

    bright-gpu-74537

    12/06/2022, 8:33 AM
    so, for electron (or tauri) you just use the haxeui-html5 backend inside the container... as Hosey mentioned you can do
    haxelib run haxeui-core create electron
    or
    haxelib run haxeui-core create tauri
    , that will create the skeleton project for (note for both these you'll need a number of other things installed, like tauri / electron itself) - lemme know if you get stuck, i can walk you through it (i really need to make some more guides!)
  • b

    bright-gpu-74537

    12/06/2022, 8:34 AM
    no worries, tbh, it got me too... i was like "hmmm, where the hell is the white box" 😄
  • f

    fierce-soccer-8550

    12/06/2022, 8:36 AM
    I never noticed the haxeui electron or tauri, nice to know. My apologies, was just trying to be helpful.
  • b

    bright-gpu-74537

    12/06/2022, 8:37 AM
    so, yeah, you can do: *
    foo.customStyle.borderColor = ...
    (you'll probably need an
    .invalidateComponentStyle()
    currently if you make changes to this and the component isnt invalidated) *
    foo.customStyle = { borderColor: ...}
    (keep in mind this will wipe all other properties) *
    foo.styleString = "border-color:...";
    *
    foo.addClass("some-css-class")
    (now you can use things like
    #foo.some-css-class
    in an external style sheet if you want) *
    foo.styleNames = "some-css-class another-css-class"
    (same as above but for multiples, shortcut basically)
  • w

    worried-boots-85466

    12/06/2022, 8:38 AM
    thank you for the info, definitely appreciated. past my bedtime lol, but will give these a go. thanks again all
  • b

    bright-gpu-74537

    12/06/2022, 8:39 AM
    you can certainly leverage ids, and psudo classes, this is perfect valid css in haxeui:
    .a > .b.c #d.e #f.h.i .j:hover
  • b

    bright-gpu-74537

    12/06/2022, 8:57 AM
    so yeah, that looks "promising", in the sense that that smells like a loop - if you could get a repro (HL, cpp, whatever, doesnt matter), then i can take a look - it maybe that haxeui-openfl is doing something different to haxeui-html5... it shouldnt be the case, but especially things like text input are insanely different between backends
  • f

    famous-alarm-22563

    12/06/2022, 9:01 AM
    Where do I put my externel style sheet and how do I load it?
  • f

    famous-alarm-22563

    12/06/2022, 9:03 AM
    I suck at looking through haxeui docs.. still can't figure this bit out after attempting to look for it half a dozen times
  • b

    bright-gpu-74537

    12/06/2022, 9:04 AM
    ok, so you have a few of options 😄 * if you have an xml file, you can do
    <style> ... </style>
    * if you have an xml file, you can do
    <style resource="..." />
    * if you have a module.xml you can add a style sheet to the default theme (or any theme) or "global" * if you have a module.xml you can add raw css data to the default theme (or any theme) or "global"
  • b

    bright-gpu-74537

    12/06/2022, 9:04 AM
    i dont think its a you problem, its a haxeui doc problem, im not sure if it is documented, and if it is... where... i really need to get all this stuff into the API docs section somewhere, somehow
  • b

    bright-gpu-74537

    12/06/2022, 9:06 AM
    what i really need to do, is have some type of GH repo, that when the docs get build adds the data here:
  • b

    bright-gpu-74537

    12/06/2022, 9:06 AM
    then its all nice and central
  • b

    bright-gpu-74537

    12/06/2022, 9:07 AM
    but i havent had time to play with that yet
  • f

    fierce-soccer-8550

    12/06/2022, 9:07 AM
    This is older, but, some of it is still useful..... https://keyreal-code.github.io/haxecoder-tutorials/64_using_xml_layouts_in_haxeui.html
  • b

    bright-gpu-74537

    12/06/2022, 9:08 AM
    yeah, defo verrrry old... alot of the info is still probably valid, but id be cautious about any site that has images of that "blue button" version, since that is haxeui v1... and its 100% legacy (and alot is verrrrry different)
  • f

    fierce-soccer-8550

    12/06/2022, 9:10 AM
    true lol, i have that site and a couple others pulled up so I can update some of the info and repost somewhere. Figured it would be helpful. Came across unexpected-vortices site as well which I think is older.... http://www.unexpected-vortices.com/haxe/haxeui-tut/code-to-widgets.html
  • b

    bright-gpu-74537

    12/06/2022, 9:11 AM
    thats defo newer since its talking about wxwidgets... and haxeui v1 was and openfl only lib
  • f

    famous-alarm-22563

    12/06/2022, 9:29 AM
    Does haxe have docstrings or something similar? If so, then setting up a git hook to publish those to a gh-pages project to show your markdown shouldn't take too long.. I've set up something like this for internal docs once.. it took 2 days of full time work. The best implementation of the kind of docs I'm referring to would be Elixir Their @doc decorators go above your function and you describe what the function does in markdown inside a heredoc... the exDoc package then takes alll those @doc declerations and converts them into a simple html site... Its super neat. Other languages have similar things but elixir has the best implementation by far.. and I just realized that I went on a tangent for no good reason. Thanks for making it to the end of my text wall.
  • b

    bright-gpu-74537

    12/06/2022, 9:31 AM
    yeah, i mean, i already have a doc gen that will take docs from the source, but i think it needs to be "enhanced" to pull in .md files (from haxeui-guides) turn them into html and whack them in the api docs too... so everything is nice and central
  • b

    bright-gpu-74537

    12/06/2022, 9:38 AM
    something like this... all very rough poc atm:
  • b

    bright-gpu-74537

    12/06/2022, 9:39 AM
    i think ill have it as like "Getting Started", "Guides", "{api tree}" though... although, it will all be driven from the structure in haxeui-guides so can be easily changed
  • f

    famous-alarm-22563

    12/06/2022, 9:40 AM
    You should extract that to its own seperate proeject
  • b

    bright-gpu-74537

    12/06/2022, 9:40 AM
    what do you mean?
  • f

    famous-alarm-22563

    12/06/2022, 9:40 AM
    the bit that extracts docs from your code should be its own project
  • b

    bright-gpu-74537

    12/06/2022, 9:41 AM
    well, its a full document generator (its what generates these: http://haxeui.org/api/haxe/ui/components/button/index.html), it is a seperate project, but its insanely messy, and insanely slow (for what it does)
1...132113221323...1687Latest