Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » X11 Windowed control and others
X11 Windowed control and others [message #12883] Sun, 25 November 2007 01:41 Go to next message
mdelfede is currently offline  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

  • Attachment: X11DHCtrl.zip
    (Size: 66.16KB, Downloaded 402 times)

[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 Go to previous messageGo to next message
mdelfede is currently offline  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 :
CtrlCore/X11DHCtrl.cpp


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
  • Attachment: X11DHCtrl.zip
    (Size: 13.42KB, Downloaded 402 times)

[Updated on: Sat, 01 December 2007 16:42]

Report message to a moderator

Re: X11 Windowed control and others [message #12976 is a reply to message #12971] Sat, 01 December 2007 23:30 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Here a screenshot of OpenCascade solid modeling kernel tutorial inside a DHCtrl control :

index.php?t=getfile&id=875&private=0
X11 Windowed control and others - Latest release [message #12996 is a reply to message #12883] Tue, 04 December 2007 13:16 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Here the latest release, made on UVS2 2311 version.
The zip file contains :

CtrlCore.zip patched core files
GLCtrl.zip patched GLCtrl files
TestGL.zip a demo with new OpenGL and X11 DHCtrl controls

I can't put the OpenCASCADE demo, as it requires too many libraries. If someone is interested on it, I could setup the repo of patched OpenCASCADE source files and libraries for Ubuntu Feisty.

Ciao

Max
Re: X11 Windowed control and others - Latest release [message #15757 is a reply to message #12996] Wed, 07 May 2008 09:59 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

It worked!
Interesting to testing!

[Updated on: Wed, 07 May 2008 10:10]

Report message to a moderator

Re: X11 Windowed control and others - Latest release [message #26780 is a reply to message #12996] Thu, 27 May 2010 11:23 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
mdelfede wrote on Tue, 04 December 2007 13:16

Here the latest release, made on UVS2 2311 version.
The zip file contains :

CtrlCore.zip patched core files
GLCtrl.zip patched GLCtrl files
TestGL.zip a demo with new OpenGL and X11 DHCtrl controls

I can't put the OpenCASCADE demo, as it requires too many libraries. If someone is interested on it, I could setup the repo of patched OpenCASCADE source files and libraries for Ubuntu Feisty.

Ciao

Max


Hello Max

I would like to try your OpenCASCADE demo.

Is it possible now?


Best regards
Iñaki
Re: X11 Windowed control and others - Latest release [message #26880 is a reply to message #26780] Sat, 05 June 2010 12:53 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
koldo wrote on Thu, 27 May 2010 11:23

mdelfede wrote on Tue, 04 December 2007 13:16

Here the latest release, made on UVS2 2311 version.
The zip file contains :

CtrlCore.zip patched core files
GLCtrl.zip patched GLCtrl files
TestGL.zip a demo with new OpenGL and X11 DHCtrl controls

I can't put the OpenCASCADE demo, as it requires too many libraries. If someone is interested on it, I could setup the repo of patched OpenCASCADE source files and libraries for Ubuntu Feisty.

Ciao

Max


Hello Max

I would like to try your OpenCASCADE demo.

Is it possible now?


Hi Koldo Smile
It's a really long time I don't do anything with Opencascade.... it should run anyways, but you've to download and install opencascade stuff, and that's not so easy.....

Max
Re: X11 Windowed control and others - Latest release [message #26885 is a reply to message #26880] Sat, 05 June 2010 21:48 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
mdelfede wrote on Sat, 05 June 2010 12:53

koldo wrote on Thu, 27 May 2010 11:23

mdelfede wrote on Tue, 04 December 2007 13:16

Here the latest release, made on UVS2 2311 version.
The zip file contains :

CtrlCore.zip patched core files
GLCtrl.zip patched GLCtrl files
TestGL.zip a demo with new OpenGL and X11 DHCtrl controls

I can't put the OpenCASCADE demo, as it requires too many libraries. If someone is interested on it, I could setup the repo of patched OpenCASCADE source files and libraries for Ubuntu Feisty.

Ciao

Max


Hello Max

I would like to try your OpenCASCADE demo.

Is it possible now?


Hi Koldo Smile
It's a really long time I don't do anything with Opencascade.... it should run anyways, but you've to download and install opencascade stuff, and that's not so easy.....

Max



Hello Max

If I download and install OpenCASCADE do you upload your DHCtrl?

I cannot sleep remembering your screenshot Smile

index.php?t=getfile&id=2576&private=0


Best regards
Iñaki
Re: X11 Windowed control and others - Latest release [message #27050 is a reply to message #26885] Wed, 23 June 2010 13:58 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Hi Koldo Smile

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 Smile

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 Smile
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 Smile

Ciao

Max
Re: X11 Windowed control and others - Latest release [message #27051 is a reply to message #27050] Wed, 23 June 2010 14:02 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Opencascade libraryzer.... don't know if it's the right one Smile
Re: X11 Windowed control and others - Latest release [message #27053 is a reply to message #27051] Wed, 23 June 2010 14:04 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Or maybe this one is the right one.... sorry, but I don't really remember, it's a loooong time I don't look at these Smile

Ciao

Max
Re: X11 Windowed control and others - Latest release [message #27060 is a reply to message #27053] Wed, 23 June 2010 22:57 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Thank you Massimo for your effort

I have got them. We will see if I get something or not Smile.


Best regards
Iñaki
Re: X11 Windowed control and others - Latest release [message #27073 is a reply to message #27060] Thu, 24 June 2010 13:09 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
koldo wrote on Wed, 23 June 2010 22:57

Thank you Massimo for your effort

I have got them. We will see if I get something or not Smile.


It's not too difficult, you could also use original opencascade install, but it's slow compiling and a bit unconfortable to handle..... and you should also patch my demo.
IIRC the demo uses includes for the "librarized" version of OCC.
One of 2 upp apps I gave you does the separation of include files in a bunch of subfolders, and that one worked good.

After running the "librarizer" you should have something like this in your dest folder :
/home/massimo/sources/uppdev/OpenCascade/ApplicationFramework
/home/massimo/sources/uppdev/OpenCascade/DataExchange
/home/massimo/sources/uppdev/OpenCascade/Draw
/home/massimo/sources/uppdev/OpenCascade/FoundationClasses
/home/massimo/sources/uppdev/OpenCascade/ModelingAlgorithms
/home/massimo/sources/uppdev/OpenCascade/ModelingData
/home/massimo/sources/uppdev/OpenCascade/Others
/home/massimo/sources/uppdev/OpenCascade/Visualization
/home/massimo/sources/uppdev/OpenCascade/WOK

As you seem the includes are spread in a folder hierarchy, much easier to handle and muuuch faster for the compiler.
Then (IIRC) you should add the lib to linking libs (it should already be there in the demo, just check paths).
Of course, the OCC lib must be built....

Looking deeper, the "right" package should be LibCascade. It splits the library in subfolders AND creates an UPP package to build it. Don't remember anything else....

Ciao

Max
Re: X11 Windowed control and others [message #27295 is a reply to message #12883] Sun, 11 July 2010 10:57 Go to previous messageGo to next message
mdelfede is currently offline  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
Re: X11 Windowed control and others [message #27301 is a reply to message #27295] Sun, 11 July 2010 16:05 Go to previous message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Hello Massimo

I will try it Smile


Best regards
Iñaki
Previous Topic: Docking: based on TabBar extension: OrderTitles
Next Topic: BUGFIX: ExpanderFrame
Goto Forum:
  


Current Time: Thu Mar 28 09:25:44 CET 2024

Total time taken to generate the page: 0.01150 seconds