haxeui / haxeui-hxwidgets Goto Github PK
View Code? Open in Web Editor NEWThe hxWidgets backend of the HaxeUI framework -
Home Page: http://haxeui.org
License: MIT License
The hxWidgets backend of the HaxeUI framework -
Home Page: http://haxeui.org
License: MIT License
Hi. I tried to compile simple application with one button, but compilation was finished with exception:
Error: ./src/hx/widgets/HardBreakWrapper.cpp:6:37: fatal error: custom/hardbreakwrapper.h: No such file or directory
compilation terminated.
Here is one of tested samples
I'm on Linux Mint 18.2 x64
Haxe 3.4.4
Hxcpp 3.4.188
haxeui-core, hxWidgets and haxeui-hxwidgets from git
And list of my installed wxWidgets packages:
Thanks.
Hi, I have some troubles with positioning and sizing of elements into VBox.
For example:
<vbox width="100%" height="100%">
<hscroll pos="25" width="100" height="25" />
<hprogress pos="75" width="100" height="25" />
<hslider pos="50" width="100" height="25" />
</vbox>
if try use default value of height the result will not be correctly, too:
<vbox width="100%" height="100%">
<hscroll pos="25" width="100" />
<hprogress pos="75" width="100" />
<hslider pos="50" width="100" />
</vbox>
(all of these samples are correctly works with haxeui-html5, haxeui-kha and haxeui-openfl)
Thanks.
Hello,
just a quick question, is that project also has a dependency to openfl ? Or it can be used directly with hxcpp ?
(maybe a demo somewhere?)
Thanks !
Hi. When I have exception, when I trying to load Image from file.
UI.xml
<?xml version="1.0" encoding="utf-8"?>
<image resource="Tux.jpg" />
Exception:
$ ./Main
15:05:40: Debug: wxColour::Set - couldn't set to colour string 'MEDIUM GREY'
Screen.hx:314: WARNING: Screen event "KeyDown" not supported
Screen.hx:314: WARNING: Screen event "KeyDown" not supported
Error : Could not load bitmap from null bytes
Linux Mint 18.1 x64
Haxe 3.4.0
CPP target
haxeui-core from git
haxeui-hxwidgets from git
Thanks.
Hi, I noticed a small defect: the size of component can't be changed if width and height is setted into syle field.
For example, this will be shown correctly:
<textfield
id="display"
width="100"
height="100"
style="font-size:22;text-align:right"
text="0" />
But will not be displayed with these samples of markup (I think because it size will be 0width 0height by default):
<textfield
id="display"
width="100"
style="height:100;font-size:22;text-align:right"
text="0" />
or
<textfield
id="display"
height="100"
style="width:100;font-size:22;text-align:right"
text="0" />
or
<textfield
id="display"
style="width:100;height:100;font-size:22;text-align:right"
text="0" />
(all of these samples are correctly works with haxeui-html5, haxeui-kha and haxeui-openfl)
Thanks.
Thanks a lot for HaxeUI!
I'm wondering if you have made a template for native (wxWidget) yet?
I want to convert a Qt C++ app I made to HaxeUI but I can't find the most basic example using the hxWidgets backend.
Simply adding the dependencies to my project results in the following error...
Type not found : haxe.ui.backend.ComponentImpl
Edit: Using Haxe 4 on MacOS
I would like to run the hxWdgets template project. But that is for flash develop on windows. How to do the same on linux (command-line version).
The website is unfortunately not very informative and most entries in the API section don't have any descriptions (A simple search feature for the API would probably be a huge boon). Also the guides linked in here are all empty Markdown files for some reason.
https://github.com/haxeui/haxeui-guides
I was specifically looking for:
@:bind
being used but according to the haxe docs that's only supported in the Flash/SWF platform?@:bind
does work outside of SWFhaxeui-hxwidgets.properties
file?Sorry if these are a lot!
Most of the styles of wxTextCtrl can only bet set on creation (especially on windows).
This means that TextField is always single line with text wrapping and TextArea always multiline without text wrapping.
There should be a possibility to set which style are preferred when creating a TextArea/TextField.
It crashes
#1 0x000055555643c42b in wxBookCtrlBase::DeletePage(unsigned long) ()
#2 0x00005555563ff967 in wxNotebook::DeleteAllPages() ()
#3 0x00005555563ffee8 in wxNotebook::~wxNotebook() ()
I have no idea. But a workaround is to hide the tabview instead.
import haxe.ui.containers.VBox;
import haxe.ui.events.MouseEvent;
@:xml('
<vbox width="100%" height="100%">
<button id="button" text="remove tab"/>
<tabview id="tab" width="100%" height="100%">
<vbox id="text_editor_tab" text ="TEXT_PREVIEW" width="100%" height="100%">
</vbox>
</tabview>
</vbox>')
class A003 extends VBox {
@:bind(button, MouseEvent.CLICK)
private function removeTab(e) {
removeComponent(tab);
}
}
Clicking on the button makes the app crash.
MxLinux 22
wxwidgets 3.2.1
Hi.
The new Haxe 3.4 version doesn't compile the classes in the native.xml file. The haxe.ui.backend.hxwidgets.size.*
and haxe.ui.backend.hxwidgets.behaviours.*
. With 3.2.1 it works fine.
Stacktrace:
Called from hxcpp::__hxcpp_main
Called from Main::main Main.hx line 13
Called from haxe.ui.HaxeUIApp::ready haxe/ui/HaxeUIApp.hx line 16
Called from haxe.ui.HaxeUIApp::init haxe/ui/HaxeUIApp.hx line 25
Called from haxe.ui.backend.AppBase::init haxe/ui/backend/AppBase.hx line 69
Called from Main::main Main.hx line 149
Called from haxe.ui.components.Button::new haxe/ui/components/Button.hx line 21
Called from haxe.ui.core.InteractiveComponent::new haxe/ui/core/InteractiveComponent.hx line 11
Called from haxe.ui.core.Component::new haxe/ui/core/Component.hx line 59
Called from haxe.ui.core.Component::addClass haxe/ui/core/Component.hx line 705
Called from haxe.ui.core.Component::invalidateStyle haxe/ui/core/Component.hx line 1609
Called from haxe.ui.components.Button::applyStyle haxe/ui/components/Button.hx line 80
Called from haxe.ui.core.Component::applyStyle haxe/ui/core/Component.hx line 1633
Called from haxe.ui.core.Component::set_native haxe/ui/core/Component.hx line 220
Called from haxe.ui.components.Button::create haxe/ui/components/Button.hx line 39
Called from haxe.ui.core.Component::create haxe/ui/core/Component.hx line 83
Called from haxe.ui.core.Component::createLayout haxe/ui/core/Component.hx line 115
Error : Null Object Reference
MenuItem's onClick
doesn't get called in wxwidgets. I was able to get events working in openfl though.
I am playing around with the hxWidgets target and wanted to try out the TableView in virtual mode, but without success.
The component creation throws an exception: invalid cast.
my xml
<vbox style="padding: 5px;" width="100%" height="100%">
<tableview width="100%" height="200" virtual="true">
<header width="100%">
<column id="colA" text="Column A" />
<column id="colB" text="Column B" width="200" />
<column id="colC" text="Column C" width="100%" />
</header>
<data>
<item colA="Item 1A" colB="Item 1B" colC="Item 1C" />
</data>
</tableview>
</vbox>
and I use it like that:
class Main {
public static function main() {
Toolkit.init();
var app = new HaxeUIApp();
app.ready(function() {
var main = ComponentMacros.buildComponent("assets/main-view.xml"); // throws here with invalid cast
app.addComponent(main);
app.start();
});
}
}
as soon as I remove the virtual, it works.
Cheers, Adrian.
Error: While running :g++ -I/home/jonas/haxe/haxeui-test/bin/obj/linux64/pch/haxe -Iinclude -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK -pthread -DwxUSE_WEBVIEW_WEBKIT -c -fvisibility=hidden -O2 -fpic -fPIC -DHX_LINUX -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=330 -m64 -DHXCPP_M64 -I/home/jonas/hxcpp/include -x c++ -frtti -Wno-invalid-offsetof ./src/boot.cpp -o/home/jonas/haxe/haxeui-test/bin/obj/linux64/aea44ed0___boot__.o
In file included from /home/jonas/hxcpp/include/hxcpp.h:310:0:
include/hx/widgets/AnyButton.h:12:30: error: invalid suffix "L_obj" on integer constant
HX_DECLARE_CLASS2(hx,widgets,AnyButton)
^
/home/jonas/hxcpp/include/hx/Macros.h:16:8: note: in definition of macro ‘HX_DECLARE_CLASS0’
class klass##_obj;
^
/home/jonas/hxcpp/include/hx/Macros.h:19:58: note: in expansion of macro ‘HX_DECLARE_CLASS1’
#define HX_DECLARE_CLASS2(ns2,ns1,klass) namespace ns2 { HX_DECLARE_CLASS1(ns1,klass) }
Hello all,
I'm considering compiling a test project with this nice library, but under OSX.
I'm using a compiled version of wxWidgets, using the latest git version.
Haxe 3.4.2
hxcpp: [3.4.188]
hxWidgets: [1.0.0]
haxeui-core: [0.0.3]
haxeui-hxwidgets: [0.0.2]
- src/wx/widgets/styles/TextCtrlStyle.cpp
Error: In file included from ./src/wx/widgets/styles/WindowStyle.cpp:5:
In file included from include/wx/widgets/styles/WindowStyle.h:11:
In file included from /usr/local/include/wx-3.1/wx/window.h:18:
In file included from /usr/local/include/wx-3.1/wx/event.h:16:
In file included from /usr/local/include/wx-3.1/wx/object.h:19:
In file included from /usr/local/include/wx-3.1/wx/memory.h:15:
In file included from /usr/local/include/wx-3.1/wx/string.h:37:
/usr/local/include/wx-3.1/wx/strvararg.h:27:18: fatal error: 'tr1/type_traits' file not found
#include <tr1/type_traits>
^~~~~~~~~~~~~~~~~
1 error generated.
Error: Build failed
Le processus du terminal s'est achevé avec le code de sortie 1
I saw some people here with compiled project under OSX, so I'm pretty sure it is doable, but for some reasons I can't figure it out how to fix that compilation error (checked the web before, but didn't manage to apply the fix correctly if valid)
Thanks
So i've set up hxWidgets and that works fine. I also have HaxeUI set up correctly and the openfl backend works like it should. But when i try to create a haxeui project for haxeui-hxwidgets.. i get an empty window.. and if the frame.fit() function is run, the window collapses down to a tiny tiny box....
What could be wrong, since the controls are not being added? Neither building from xml or adding manually seem to work...
Hxcpp 3.4.49 , Haxe 3.4
Error: While running :g++ -I/home/jonas/haxe/haxeui-test/bin/obj/linux64/pch/haxe -Iinclude -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK -pthread -DwxUSE_WEBVIEW_WEBKIT -c -fvisibility=hidden -O2 -fpic -fPIC -DHX_LINUX -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=330 -m64 -DHXCPP_M64 -I/home/jonas/hxcpp/include -x c++ -frtti -Wno-invalid-offsetof ./src/hx/widgets/GLCanvas.cpp -o/home/jonas/haxe/haxeui-test/bin/obj/linux64/edf3cd3c_GLCanvas.o
./src/hx/widgets/GLCanvas.cpp: In member function ‘void hx::widgets::GLCanvas_obj::__construct(hx::widgets::Window, Array, hx::Null, hx::Null)’:
./src/hx/widgets/GLCanvas.cpp:47:66: error: conversion from ‘int’ to non-scalar type ‘cpp::Pointer’ requested
HXLINE( 14) HX_VARI( ::cpp::Pointer< Int >,attribList) = (int)0;
^
Error: Build failed
Testcase in testcase.zip, see Main.hx and main-view.xml.
The project was generated using '''haxelib run haxeui-core create hxwidgets''' from scratch.
platform Windows 10
haxe version = 4.2.1+bf9ff69
Hi. Is it possible to evaluate default size of vslider and hslider?
For example this markup will not wirks correctly:
<hslider pos="50" width="100"/>
needed to set value height manually:
<hslider pos="50" width="100" height="25" />
Same defect actually for vslider and property width.
(all of these samples are correctly works with haxeui-html5, haxeui-kha and haxeui-openfl)
Thanks.
The mouse down event doesn't seem to work.
It is required with InteractiveComponents, in special TextField
and TextArea
with placeholderText
property.
It doesn't dispatch the mouse event down.
It could be a problem with hxWidgets. If it isn't possible to fix in hxWidgets, haxeui-hxwidgets should do it possible.
An example code is here haxeui/haxeui-core#69
Press in a textfield/textarea with default text. It should dissapear.
The application should start
The application not start at all without errors.
Create a xml with padding! (without padding it works)
package ;
import haxe.ui.containers.VBox;
@:build(haxe.ui.ComponentBuilder.build("assets/main-view.xml"))
class MainView extends VBox {
public function new() {
super();
}
}
<vbox style="padding: 5px;" width="100%">
<tabview width="240" height="100">
<box text="Page1">
<button text="Page 1" />
</box>
<box text="Page2">
<button text="Page 2" />
</box>
<box text="Page3">
<button text="Page 3" />
</box>
</tabview>
</vbox>
Hi. I can't change text in TextField.
UI.xml:
<?xml version="1.0" encoding="utf-8" ?>
<textfield width="100" text="hello world..."/>
Linux Mint 18.1 x64
Haxe 3.4.0
CPP target
haxeui-core from git
haxeui-hxwidgets from git
Thanks.
If you have a table in your app, you will have a popup
ASSERT INFO:
../src/gtk/window.cpp(2479): assert "m_wxwindow" failed in AddChildGTK(): Cannot add a child to a window without a client area
BACKTRACE:
[1] wxWindow::AddChildGTK(wxWindow*)
[2] wxStaticText::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)
[3] __libc_start_main
[4] _start
Add
if ("" + id == "button-label") return;
at the beginning
The problem is the "button-label" of the columns.
Somehow the static text cannot be added to hx widget buttons because they are a "window without a client area".
Following haxeui/haxeui-core#27
needs something similar to haxeui/haxeui-nme@28d4ebe
Not sure if that's actually possible, but at least need a stub.
The label should increase in size to fit the text inside it instead of clipping the text. This is the behavior observed in other backends I've tried (html5
, heaps-hl
); it only seems to clip while using the hxwidgets
backend.
The label doesn't scale to fit the text it contains if you change the font size via CSS. The label retains its dimensions as if the default font size were used, thus clipping the text if the font size is bigger than default. This only seems to occur if the width of the label isn't specified.
hxwidgets
backend (haxelib run haxeui-core create hxwidgets
)assets/main-view.xml
(e.g. <label text="this text will clip" style="font-size:30px" />
)Using the heaps-hl
backend (no clipping):
Same code using the hxwidgets
backend (clipping):
Code that produced these screenshots below.
Default hxwidgets
app with the following modifications:
assets/main-view.xml
:
<hbox width="100%" height="100%">
<style>
.label {
font-size: 25px;
}
.label.clipped {
background-color: red;
color: white;
}
.label.not-clipped {
background-color: green;
color: white;
width: 100%;
}
</style>
<label text="clipped" styleName="clipped" />
<label text="not clipped" styleName="not-clipped"/>
</hbox>
src/MainView.hx
:
package;
import haxe.ui.containers.HBox;
@:build(haxe.ui.ComponentBuilder.build("assets/main-view.xml"))
class MainView extends HBox {
public function new() {
super();
}
}
$ haxe --version
4.2.5
$ wx-config --version
3.2.2
$ gtk4-launch --version
4.10.4
$ haxelib list
format: [3.6.0]
haxeui-core: [1.6.0]
haxeui-heaps: [1.6.0]
haxeui-html5: [1.6.0]
haxeui-hxwidgets: [1.6.0]
heaps: [1.10.0]
hlopenal: [1.5.0]
hlsdl: [1.13.0]
hxcpp: [4.3.2]
hxWidgets: [1.11.0]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.