|
|
Home » Developing U++ » UppHub » X11 Windowed control and others
X11 Windowed control and others [message #12883] |
Sun, 25 November 2007 01:41 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
I made some patches / files added to :
1- Support X11 windowed controls (DHCtrl for X11)
2- Allow DHCtrl (only for X11 by now) to host childs as normal controls
3- Made X11 OpenGL control derived from newly created X11 DHCtrl for more consistent coding, plus some advantages.
Here are the patched files from 2296 today UVS release.
Files included in zip are :
CtrlCore.zip Patched core files + added X11DHCtrl.cpp
GlCtrl.zip Patched GlCtrl control
TestOpenGL.zip Test file for both X11 DHCtrl control and new OpenGL control.
TestOpenGL.png Screenshot of the demo
The demo shows a main window with inside an OpenGL control, a windowed panel with mouse coordinates on top of it and a kind of aerial view (another OpenGL control on top of first one).
For the moment, the demo is only for X11, aka Linux. If the patches are accepted I'll complete it with a Windows version.
Technical note : the most work of all that was in CtrlCore packages, as UPP didn't allow windowed controls as child controls, i.e.
if(parent == NULL) ==> the control has NO window handle
That leaded to the mixed use of "!parent" and "top != NULL" for the tests if a control has an handle; more, "top" structure was unioned with other pointers used only in child controls.
Thus I had to separate 'top' from union and check all uses of 'parent' member to check if a control has handle and replace all with a check on 'top' member.
Quite all the work already done should be ok for windows version too, with only some more patches to apply.
Code is fully commented, so it should be selc-documenting.
Ciao
Max
[Updated on: Sun, 25 November 2007 01:43] Report message to a moderator
|
|
|
Re: X11 Windowed control and others [message #12971 is a reply to message #12883] |
Sat, 01 December 2007 16:41 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
New version (some bugs corrected of the control.
The zip file here contains a diff file (X11DHctrl.diff) that must be applied to core classes.
In UPP main folder (NOT in uppsrc subfolder) copy the X11DHCtrl.diff file and do :
patch -p0 < X11DHCtrl.diff
Patched files are :
CtrlCore/Ctrl.cpp
CtrlCore/CtrlCore.h
CtrlCore/CtrlCore.upp
CtrlCore/CtrlDraw.cpp
CtrlCore/X11Proc.cpp
CtrlCore/X11Wnd.cpp
GLCtrl/GLCtrl.cpp
GLCtrl/GLCtrl.h
Plus an added file :
Inside zip file is include a demo; just create a folder in MyApps named TestGL, unzip TestGL archive into it and compile in TheIDE.
As before, the files are *only* for X11 version.... Win version coming soon !
Files are patched from the latest 2304 Uvs devel code.
Ciao
Max
[Updated on: Sat, 01 December 2007 16:42] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: X11 Windowed control and others - Latest release [message #27050 is a reply to message #26885] |
Wed, 23 June 2010 13:58 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
Hi Koldo
Sorry for delay answering, I'm quite busy on these days....
DHCtrl is since long embedded in upp.... also on linux side.
IIRC somebody did some mods on it, so I'm not sure it works exactly as before....
I'll put here my opencascade demo, but...
1) I did a lot of work on Opencascade tree, it's ugly like it is and almost unmanageable, having a bunch of thousends include in a single folder, making it awfully slow to compile.
I've somewhere an Opencascade re-packer, which separates includes by cathegory in subfolders, but I don't remember how it works
2) You must put the patched opencascade tree inside an upp assembly.
So, if you've (a lot of) time experimenting with it and you're brave enough, I'll put here also my opencascade reformatters/packers, but no time to remember on how to use them and not sure at all if they worked or where in unusable state... sorry
Last thing I was trying to do was to put ALL opencascade lib into an own namespace, but it's so badly written that it's an hopeless task. So, be prepared to name clashes, and, BTW, blitz do have problems with it, of course.
Here the demo, on next post the (hopefully working) opencascade reformatter. Remember, take out the namespace stuff, it won't work, that's for sure
Ciao
Max
|
|
|
|
|
|
|
Re: X11 Windowed control and others [message #27295 is a reply to message #12883] |
Sun, 11 July 2010 10:57 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
Hi Koldo,
here an opencascade demo which works with opencascade libs on ubuntu repository.
Just install all opencascade-dev stuffs and run the app.
Due to changes in DHCtrl for linux, now it's not possible anymore to have a control embedded on a DHCtrl window (no windows controls in native windows, as it was before my patches, sigh....), so I had to simplify the demo.
Anyways.... run the app, zoom with mouse wheel, pan clicking the middle button, rotate view with ctrl+shift+mouse wheel.
Tested only on ubuntu 10.04, I guess it'll need some small changes for windows, but not sure.
Ciao
Max
|
|
|
|
Goto Forum:
Current Time: Sat Jun 08 08:26:29 CEST 2024
Total time taken to generate the page: 0.01474 seconds
|
|
|