Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ben Clayton
    @ben-clayton
    I haven't had much time to work on GXUI as of late, but it is in my TODO list
    I am however happy to accept pull requests if anyone fancies implementing more types of Containers.
    cor-bos
    @cor-bos
    @umren Hi, I work with "portaudio-go". I use raw audio pcm to mix and process with portaudio-go. You can still find it at https://code.google.com/p/portaudio-go as long as it's available. I couldn't find it at github.
    eflauzo
    @eflauzo
    Gentleman, I looked through library seams like all OpenGL code is abstracted into "Driver". Im interested to build application that uses OpenGL for 3D visualization, I been interested whether there is an abstraction for OpenGL calls that would preserve state within a GXUI Control. So I could implement my code within Control for 3d visualization, and used GXUI for everything else. Possible? what do you guys think about it?. Some examples would be very appreciated.
    Ben Clayton
    @ben-clayton
    Hi @eflauzo. You are correct that all the GL logic is abstracted away - this is intentional so that other non-GL implementations could be written, and I'd like to keep it that way. That said, you are not the first person to request this (see #142) and I've been thinking about how we can expose this functionality.
    I think the right way to do this is to keep all the OpenGL logic still in the drivers/gl package, but perhaps have the gl package expose a special Control, which requires the driver to be one created with gl.StartDriver()
    This special control would have some callbacks for performing the GL logic, but set up to be drawn within the control's bounds
    Ben Clayton
    @ben-clayton
    Considerations we'd have to make:
    • GXUI lazily redraws, and I'm assuming that most OpenGL requests are for interactive animations. This should be doable, but some optimisation might be required
    • The custom GL control would likely have full access to all the GL state - I'm not sure whether we'd be able to sanely 'preserve state' like you suggest, to avoid the custom GL logic from breaking other GXUI draws. It's possible we could create a new GL context for each of these control, and display that in the GXUI context, but we're venturing into extension territory there, which is likely to cause compatibility issues.
    • We'd also want to avoid breaking compatibility with the WebGL backend. To support WebGL, we have another layer of abstraction in the https://github.com/goxjs/gl package. As far as I'm aware, this exposes a significant subset of desktop GL in order to be able to transparently support desktop GL and WebGL (and GLES possibly in the future). @shurcooL would be able to describe more on this.
    eflauzo
    @eflauzo
    Thanks for comment. I personally would be happy with bare bones GLES / WebGL. I would guess that most of the uptakes of this library are people who want potentially run their software in web so WebGL sounds the way to go. As for preservation of state I would guess maybe not most performant, but most safe way would be each (GLCanvas Widget) would have it own context, where it would draw his content to glFrameBuffer -> Texture which would be then binded to that GLWIdget. If i think about it, I would think that most of the people who would needed it would need some visualization where it is not the main goal of application, so they would be willing to sacrifice on performance, otherwise they would write whole thing in WebGL.
    As for updates, it widget just handle onPaint event, scheduling would be still done by gxui
    carlTLR
    @carlTLR
    Hi, I'd like to know the rationale behind making the theme definition a part of gxui and not allowing a theme to be modified once it is created?
    Specifically, if I wanted to change the color of a button when it is pressed, I have to modify the theme, which means modifying gxui. It seems like a theme could be specified by the user, since the light and dark themes are really a collection of colours.
    Is there a reason why users of the library were not allowed to specify a theme at runtime?
    cor-bos
    @cor-bos
    Hi, If I want to open a sub window while in the main window, what is the right way to connect the sub window to the main window? Also catching the close event of the sub window so that the adjustments in the sub window can be processed. I couldn't find any examples. If anyone could give me an example that would be nice. Thanks.
    Ben Clayton
    @ben-clayton
    @carlTLR there was no decision to lock-down the apperance
    of controls - the original goal was that the dark package provided a very simple example of implementing a theme
    The light theme was pretty much a fork of that
    I'm not opposed to making the theme colors controllable at runtime, but it sounds like you're wanting to control a button's colors on a per-instance basis
    In that case, I'd probably recommend 'deriving' your own version of Button and overriding the Paint method as you see fit
    Ben Clayton
    @ben-clayton
    @cor-bos I'm not sure I understand what you mean by "connect the sub window to the main window"
    Theme has CreateWindow() to spawn new windows. You can add listeners to that window's OnClose event.
    You probably know all this, so I'm probably just not understanding your question
    Samuel Nelson
    @nelsam

    What is the correct method to overwrite text (for completions, snippets, electric braces, or other forms of automatic code writing) in a mixins.CodeEditor without access to mixins.CodeEditor.TextBox.controller? I see the code editor using the controller field to apply code suggestions and indentation, but the field isn't exported and doesn't have any getters, so far as I can see. I suppose I can use SetText, but that seems overkill.

    On a similar note, how bad an idea would it be to export access to that controller field? I find myself wanting access to it more and more as I go on; but that may just mean that I should be implementing my own gxui.CodeEditor without using the mixins.

    carlTLR
    @carlTLR
    @ben-clayton No, not aiming to control things per instance. Being able to specify a theme structure once at startup would be enough for me. I like that the design basically gives you consistent looking elements.
    cor-bos
    @cor-bos
    @ben-clayton When I put my question on the board I didn't but in the meantime I found out how. But now a strange problem pops up. On my linux labtop everything run as it should be but when compile for Windows the main window is fine but the second window stays black. The controls are missing. Could it be a memory problem? The windows pc has 2GB of ram memory, that should be enough for such a simple program is my guess.
    kelwang
    @kelwang
    for some reason, label.setText, won't work for utf-8 chars, not sure what I was missing
    guess I missed the font, seems font is an interface, what's easiest way to add the font?
    sol
    @s-ol
    are there screenshots available somewhere?
    Ben Clayton
    @ben-clayton
    You can use custom fonts by using Driver.CreateFont:
    https://github.com/google/gxui/blob/master/driver.go#L29
    @S0lll0s - sorry I haven't got around to uploading screenshots. I see you've found the PR, I think adding them to another branch is a good idea. There is the gh-pages branch which is what gxui.io points to. Perhaps that is the most sensible place for them
    www.gxui.io that is
    sol
    @s-ol
    @ben-clayton "> I see you've found the PR" uh.... I haven't...?
    sol
    @s-ol
    now I have though.
    Ben Clayton
    @ben-clayton
    ah, sorry, my bad.
    My main account
    @git123hub
    Gitter
    devin5411
    @devin5411
    This message was deleted
    chitra
    @Chitratech
    hi
    Rosen Lu
    @lucumt
    Hi
    I am a new gopher
    Enea Marius
    @eneamarius
    dasdcs1
    @dasdcs1
    This message was deleted
    manyak12345
    @manyak12345
    hello
    Sherrin John
    @sherrinjv_twitter
    Test
    Roy Charles
    @kYsShu
    hi everyone :)
    alberto.garcia
    @albertog
    Can someone confirm me if gxui is discontinued?
    Ben Clayton
    @ben-clayton
    @albertog - for the time being yes. If I find myself with some free time, I'd love to revisit it, but until then I'm afraid so.
    Sherrin John
    @sherrinjv_twitter
    Testing