OCCViewer OpenCASCADE Viewer with GTK+ GUI

N. Sharjith



This is a port of the OpenCASCADE Qt IESample provided with the installation of OpenCASCADE. This is an effort to give the OCC community a sample based on GTK+ which is one of the leading gui toolkit for linux which is also cross platform and under the LGPL license. The main difference you will find in this example compared to the original IESample example provided by OpenCASCADE is that this example is not an MDI (Multiple Document Interface) application.

This is also not having the Document/View architecture as in IESample. It can be probably made to use Document/View architecture as well as MDI using gtk notebook widget. Someone can give a try! The Adobe Reader 7x series for linux is made using the Gtk+ toolkit and sports a nice MDI child widget in a workspace like in Qt applications. I don't know to achieve that. Someone can give a try! And tell me too, if possible.


This program requires the

I have used gcc version 4.1.0, gtk+ version 2.8.20, gtkglext version 1.2.0, glade-2 2.12.1. Anything greater than or equal to these versions must work.


Be careful about the implications of the glade gui builder. The glade project file generates files for C but I have set it to generate .cpp files and added AM_PROG_CXX macro to convert the project to C++. This is a kind of cheating glade because to generate C++ project itself from glade you have to have gtkmm, gtkglextmm etc... But it still works fine. Only I had to manually rename main.c to main.cpp when the source was built for the first time. Glade overwrites the Interface files but not Callback, Support or main file. So you can freely extend the gui using glade. New callbacks will be appended to the Callback files. Anyone who makes this program better or finds any problem with it please let me know. I am more interested to know the MDI part if someone does it.


The Linux version of the OCCViewer can be downloaded here (223kb).


This is free software; There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This page last edited 29 Nov 2006