Hi every one,
I wonder is there any way to create a component that we can use everywhere? (Cross-platform version of Microsoft COM?)
For example, we have a wxChartCtrl and then we can use it in vb6, c#.net, c++/mfc, qt, wxwidgets, gtk, cocoa... Is there any way to do it?
Thankyou all.
Cross platform component
-
- Knows some wx things
- Posts: 39
- Joined: Sun Oct 10, 2010 1:02 am
Re: Cross platform component
You are a little vague, so I'm not sure i understood correctly what you want. But I don't think you can have a single code base provide Qt, MFC, WinForms, Cocoa... all at the same time.
That being said, it is possible to have a reusable core that can then be shared by various thin frontends (one for each targeted platform possibly).
That being said, it is possible to have a reusable core that can then be shared by various thin frontends (one for each targeted platform possibly).
"Keyboard not detected. Press F1 to continue"
-- Windows
-- Windows
-
- Knows some wx things
- Posts: 39
- Joined: Sun Oct 10, 2010 1:02 am
Re: Cross platform component
Hi Auria, let me explain some more details.
Suppose that we have a wxChartCtrl. It is a wxWidgets GUI component and it works well with wxWidgets application.
Then, my question is, can I bring that control into an MFC application without any modification?
In MFC/Windows application, I know that I can create an ActiveX Control for reusable purpose. In general, on Windows, ActiveX Control can reuse in VB6, .NET, C++/MFC, Mathlab, Python... And I wonder that do we have something like the ActiveX technology but can run on all platform (Windows, Linux, Mac).
I do some research and I think Mozilla XPCOM is something like that, but I am not sure.
Thankyou all.
Suppose that we have a wxChartCtrl. It is a wxWidgets GUI component and it works well with wxWidgets application.
Then, my question is, can I bring that control into an MFC application without any modification?
In MFC/Windows application, I know that I can create an ActiveX Control for reusable purpose. In general, on Windows, ActiveX Control can reuse in VB6, .NET, C++/MFC, Mathlab, Python... And I wonder that do we have something like the ActiveX technology but can run on all platform (Windows, Linux, Mac).
I do some research and I think Mozilla XPCOM is something like that, but I am not sure.
Thankyou all.
Re: Cross platform component
No that's not directly possible. Though you can write a portable core in standard C++, and then bind this core to the various toolkits you target
"Keyboard not detected. Press F1 to continue"
-- Windows
-- Windows
-
- Knows some wx things
- Posts: 39
- Joined: Sun Oct 10, 2010 1:02 am
Re: Cross platform component
Thankyou Auria, I do googled, and saw lot of companies out there have to port theirs code on varying platform. This guy is an example: http://www.advsofteng.com/
Re: Cross platform component
I've heard of someone who used OpenGL to creates a complete portable interface, designing forms, menus and so on with OpenGL directives.
You can surely write C++ portable classes (i've done by myself for db Handling, sockets, threads, odbc and so on) but you need some pure virtual class to handle screen and keyboard/mouse events, then specylize them to Windows/mac/Linux...
At the end, is simpler to choose a portable environment, like wxWidgets and similar. I use codelite as the ide for Win/Mac and with no work i can just copy project files to Win or to Mac and just compile and debug.
What you ask is not directly possible.
You can surely write C++ portable classes (i've done by myself for db Handling, sockets, threads, odbc and so on) but you need some pure virtual class to handle screen and keyboard/mouse events, then specylize them to Windows/mac/Linux...
At the end, is simpler to choose a portable environment, like wxWidgets and similar. I use codelite as the ide for Win/Mac and with no work i can just copy project files to Win or to Mac and just compile and debug.
What you ask is not directly possible.
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: Cross platform component
Hello. Here, the way I understand, you ask for a cross-toolkit code rather than a cross-platform one. So, it sounds like your code as firstly to be cross-platform AND toolkit-independent before to add a toolkit interface one by one... So, it means you have to write your own cross-platform code in first place.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]