C++/libsigc++ interface for QNX(r) Photon

Check it out on

sourceforge.net/projects/photon-cxx

This is ‘planing’ preview release, so if you find my ideas intersting (bringed by gtkmm interface for GTK+) let me know here or email at iakovz@gmail.com

It is assumed that you coded Photon in C, because of the lack of any documentation in the package (im working on it).

thanks in advance!

with best regards,

Yakov &

phab now can’t use the language of C++ ? oh my god . I have created a phab project from IDE. can I use the c++ , because now I have serval c++ files (which contain class and exception). and I want to use them in ths phab project .

how can I solve this problem . Thanks a lot

I have downloaded the interface you provided , and I have a try .still not solve my problem . In proto.h ,may errors occur. such as :
void A::b() ;// error: parse error before ‘:’
any advice will be appreciated .Thanks!

Hi,

I have downloaded the interface you provided , and I have a try .still not solve my problem . In proto.h ,may errors occur. such as :
void A::b() ;// error: parse error before ‘:’
who can help me .Thanks!

There several ways to use C++ with PhAB projects. One of them if doing like this. You create project, setup to use C++ source, make callbacks static AND DO NOT generate proto.h (there was option in PhAB, you should check it out). This is a rather nasty way…

The second way is to use my interface. Like this

  1. create dummy project
  2. draw you GUI modules in PhAB in this dummy Project
  3. save all changes
  4. extract *.wgt? files from project (you’ll need them only)
  5. write code using my interface:
    5a. when you want to realize GUI module from your code you write

Wgt* myModule = Wgt::create ("path to the module .wgt? file", “root container widget name”);
Here you’v created copy of widget from your module. Now you can extract widgets and realize/reparent them where you want:
like so:
Window
main_window;
myModule->get_widget (“base”, main_window);
… / arrange main_window – bear in mind that all design from PhAB is already in main_window widget hierarchy /

main_window->realize ();

You can access properties of widgets (see: headers).
There also compatible interface to load PtWidget_t* from files: see Wgt.h

Feel free to post here any suggestions comments!!

//wbr

hi yakov , firstly very Thanks for your help! But I still can’t understand fully. I am a little beef-witted, :laughing:

I will express the structure of my program clearly now. I have created a phab project from IDE. the question is I have some classes with exception in my.h and my.cpp. now I still not use these classes. just import them. then I try to compile the project. but in proto.h. some errors like int A:b() occur. the next step is that I will use these classes in some callback function.

the second method I am very confused . can you give me a example code . Thanks :slight_smile: my email is: dxwang@mail.ustc.edu.cn
I have put libphotonmm.so.0.1.0 under the directory /usr/local/lib .
and put proc prop.h photonmm photomm.h under the /usr/local/include which directory I created.
In IDE,I have added the extra libs path and include path.

Thank again!

[quote=“dxwang”]
hi yakov , firstly very Thanks for your help! But I still can’t understand fully. I am a little beef-witted, :lol:

I will express the structure of my program clearly now. I have created a phab project from IDE. the question is I have some classes with exception in my.h and my.cpp. now I still not use these classes. just import them. then I try to compile the project. but in proto.h. some errors like int A:b() occur. the next step is that I will use these classes in some callback function.

[quote=“yakov”]

Proto.h is included by all .c and .cc file. Obviously if you have C++ code included from proto.h it will create problem when proto.h is included from a C file.

Maybe the solution would be to wrap the C++ code in #if __cplusplus / #endif.

Then make sure the callback that will call C++ object are .cc files

Mario

Proto.h is included by all .c and .cc file. .cc also a c++ file . can I change the .cpp to .cc . if do this, it’s necessary to add#if __cplusplus / #endif.
if not, the whole .h .cpp are all c++ code . where to add #if __cplusplus / #endif is reasonable ? Thanks

Hi,

dxwang, you’v requested for examples. I’m planing to produce 0.2.0 release wich would include:

Docs:

  • short tutorial on writing with photonmm from scratch

  • tutorial on how to integrate photonmm classes in your current project (PhAB/or other based)

  • probably HTML reference in doxygen

  • manual on writing custom widgets, custom widget classes with photon/photonmm

Code:

  • more widgets would be covered (in progress)

  • build system would stabilize

This will be released on 02 June 2006

// wbr

Yakov &

.cc files are considered to be C++ files.

yakov: now I just to wait for your produce 0.2.0 release?
Do you have some examples about the latest release . Thanks

dxwang, check out tracker system here sourceforge.net/tracker/?func=ad … tid=828504
You should submit your requests there! ;)

Thanks in advance

// wbr
Yakov &

yakov: my qnx 6.3.0 isn’t formal version . is yours formal and 6.3.0 ?
Thanks

what do you mean “formal”. I have QNX 6.3.2 professional with service pack level 2.

ofcourse i have formal version.

it is does not matter anyway ;)

:sunglasses:

some documentation now is available from photon-cxx.sourceforge.net/.
I’m working on examples now…

Feel free to send any comment, suggestions pizza to Yakov iakovz@gmail.com

// wbr

Yakov &

Please tell me more detail! :smiley: I’m not a intelligent man :laughing:

My host is window xp and certainly target is QNX.
There’re some /lib directory in C drive.
Momentic’s workspace is at c:\C:\QNX630\

I downloaded both source code and lib but I don’t know to where I have to extact them

The link is died.