A little bit about FireMonkey and Delphi XE2
FireMonkey is going to be a whole new world of possibilities for Delphi and C++Builder developers. The platform itself is flexible, customizable and multi-platform, all components behave the same on Windows and Mac. In this post I will give you a general idea of some very powerful concepts related with components in FireMonkey, during the RAD Studio XE2 World Tour you will see much more.
Components in FireMonkey are containers; it means you can embed any component inside any other component. Just to give you an idea, the Button component is composed of 9 components. When together, they look and behave like a Button, let’s see how it works.
[ilink style=”tick”]Starts with a TLayout component, which helps to organize all of the controls[/ilink]
[ilink style=”tick”]Three TRectangle are responsible for the button look and feel, like: border, background and foreground color[/ilink]
[ilink style=”tick”]A Label represents the Button text[/ilink]
[ilink style=”tick”]And ends with four components, two for animation and other two for effects. Why effects and animations? Animations will happen when you move the mouse over/out the button, effects will happen when button is pressed or has a focus, the glow effect is responsible for that.[/ilink]
As you can see, a number of different features has been used to create a button, this is what happen with all of FireMonkey components.
And one more think, components’ look and feel can be changed and reused using Styles. Imagine a web page that use CSS, you change the web page look and feel just updating the CSS, right? In FireMonkey is the same, instead CSS you will use Styles to change the application look and feel.
Apps and components look and work properly on the respective native platform, but you can also style them to look or behave differently. below an example.
More to come, stay tuned to this blog, other Embarcadero blogs and Embarcadero web site.
[button link=”http://www.embarcadero.com/world-tour” size=”large” style=”note” color=”red” border=”white” text=”light” window=”yes”]Register today for the RAD Studio XE2 World Tour[/button]
What technology is this based on? OpenGL? If yes, which version?
Also, will this be available for Linux later on?
Reason I’m asking is because I’d love to use this on an embedded device.
ARM would be perfect, but Atom is fine too.
Looks amazing! Here are a few questions:
I assume Firemonkey applications are native – can you confirm?
Will there be a Mac IDE?
If not – how will debugging work?
It is important to stick to Windows styles as far as possible. Because a user may select a theme that has poor contrast with the colors you selected.
And … whats happen with third components like devexpress, fast-report……. and so on in FireMonkey ??
I hope 3rd party component developers will adapt soon to this new way of designing components!
Will be available native Windows style?
Now I also may enjoy this ressource without headache 🙂 Seems good.
FireMonkey apps are completely native ccode.
3rd party technology partners are working on FireMonkey component and tool support.
We will ship with several style files you can choose including Windows and Macintosh style. And you can create, share, sell custom styles too,
Regarding graphics rendering:
If you use HD forms and components on Windows – we use Direct2D
if you use 3D forms and components on Windows – we use Direct3D
On Macintosh HD and 3D – we use OpenGL
RAD Studio XE2 IDE runs on windows and can cross compile (using our compilers) to OS X. You install a small Platform Assistant on the Macintosh. Then when you hit run or run with debug – the executable is sent to the Mac (or you can copy it) and debugging starts. Similar but different implementation to our Remote Debugging that has been available for years for the IDE.
For my configuration – I have a MacBook Pro and run VMWare Fusion 3.1.3 with Windows 64-bit ultimate as a guest OS. Some R&D team members have a Mac Mini sitting along side their PC.
It seems this was the vgscene evolution. Is there a DBGrid available?
Any chance of more details around the 3D capabilities?
Looks great! I’ve been hoping for Delphi for the Mac (and C++ Builder too!) for a long time.
One thing I’m worried about is the native feel of the controls, especially on the Mac. Are the styles implemented via Cocoa? Ie, is it using the system’s rendering or even better the system’s controls under the hood?
I’d really like to see a screenshot or two of the Windows and OSX themes, if you’re able to post them.
Hi David M,
I’m glad you like. Answering your questions. FireMonkey render all components through OpenGL on Mac and apply the styles, for Windows it will use Direct2D for HD apps, and Direct3D for 3D apps.
Yes, I will publish some screenshots of the Windows and OSX styles. This one you see on this post is the Dark and iOS styles 🙂
Thanks – I’d be very interested.
What I meant about rendering was that although it renders through OpenGL or Direct2D/3D, was whether the style code that generated the underlying images is implemented by hooking into the native system, or if it’s completely emulated. For example, I’d expect an OSX style running on Windows to just copy the look, but the best situation for an OSX style when running on OSX would be to use Cocoa to generated the control bitmaps, or even better for standard controls to instantiate actual Cocoa controls inside the FireMonkey control classes.
Or, is it possible to create Cocoa windows and use a mix of Cocoa controls and FireMonkey controls hosted in the same window? Can you link to Objective-C code easily, or can you even mix the two languages in a project, handing over to Apple’s compiler for the Objective-C elements?
I’m afraid I’ve got heaps of questions – take it as a sign of how excited I am Delphi’s finally arrived for the Mac 🙂
By the way, do you know if there’ll be a Starter edition of XE2? My work’s unlikely to upgrade from 2010 until the 64-bit C++ compiler comes out, but I personally would like to install it at home and Starter seems more suitable for at-home hobbyist (I’m only a professional at work!) playing around sort of use.
You should be prepared to support the new Windows Runtime framework in Windows vNext.
Its based on COM vNext and uses Xaml, supports native C++ RAD UI development.
@Guest, don’t worry we will
How work this advanced draw under Remote Desktop and Terminal Server ?
is very slow ?
>>If you use HD forms and components on Windows – we use Direct2D
>if you use 3D forms and components on Windows – we use Direct3D
>>On Macintosh HD and 3D – we use OpenGL
VMs are making improvements to have better support for D2D, D3D and GPU, also we are using VMs in our internal tests, so far is going very well
I think this is going to be amazing new GUI for the world of Desktop apps. Keep up brothers, sisters, uncle, and auty.
But how can is it going to possible to deployed to 3rd party an app for Mac OSX users?
There is a new Deploy tool for Win, Mac, and Cloud integrated in the IDE, easy to use. 🙂
Hi David M
Starter Edition will be available right from the start along with Pro, Enterprise and Architect.
For more info go through this page http://www.deltics.co.nz/blog/?p=735
When do you think lis frame work would be done ?
Fantastic news is Firemonkey! and support for Mac even better.
One question: if Firemonkeys uses Direct2D and since this is available only for Windows 7 and Windows Server 2008 (and also Vista with a Platform Update Supplement) it won’t run on previous plataforms? said XP?
Cases where Direct2D is not supported, like Win XP FireMonkey will use GDI+.
>> Or, is it possible to create Cocoa windows and use a mix of Cocoa controls and FireMonkey
>> controls hosted in the same window?
FireMonkey client area controls are rendered by OpenGL on Mac, but appear and work just like Cocoa controls – or however you want them to. There are many different Cocoa UI styles in OSX apps, and Firemonkey can render any of them – including iTunes, or Prokit which is an Apple UI style for Pro apps like Final Cut, not available to devs via Cocoa. Windows are Cocoa Windows and the client areas and all user controls are rendered by OpenGL in HD(2D) or 3D. Menus are std and rendered by Cocoa in the menu bar, and common dialogs are rendered by Cocoa. If the “true OSX” look isn’t for you, you’re welcome to use any included Style, download a custom style, or create your own custom style.
>> What technology is this based on? OpenGL? If yes, which version?
HD and 3D rendering on Mac is OpenGL, and Direct2D/3D on Windows.
>> Also, will this be available for Linux later on?
We do plan Linux and Android. But no eta yet until we get Win/OSX/iOS out. We would also like to provide language bindings for other languages.
>> ARM would be perfect, but Atom is fine too.
Today you can use FPC for ARM and Delphi compiler for Atom.
>> if Firemonkeys uses Direct2D and since this is available only
on Windows if D2D is not available, FM will use GDI+ for HD vector forms/controls.
>> But how can is it going to possible to deployed to 3rd party an app for Mac OSX users?
Developer requires a PC and a Mac (or Mac with VM running Windows). You will develop on Windows, and use the platform assistant (PA running on your Mac) to compile natively to your Mac and the PA handles debugging communication between the Mac and your IDE running on Windows. Delphi (or C++Builder) and Firemonkey create compiled stand alone OSX executables that you can sell/distribute to your users. They are native Mac apps. They “copy install” and run like any other Mac app, or you can use a Mac installer if you like.
Can you also use Parallels Desktop for Mac instead of VM? I have that up and running om my MacBook Pro (Windows7 64bit with RAD Studio XE Enterprise) with no problems!
@Rob, yes you can Parallels as well, I use VMWare Fusion
@Michael: thanks for the reply! Makes sense and sounds a good way to do it.
Cant you see it looks oldfasion … I looks like something made in JAVA ?
ola.. esse FireMonkey roda no delphi xe? ou somente o xe2?
Marcos, FireMonkey é compatível com Delphi XE2 e C++Builder XE2
i have a question:
can we make animation or game with firemonkey?
You can do anything with firemonkey including games, we just don’t provide a game engine, but all the resources to build a game are there.
Where can I find some documentation on building my first firemonkey app? I tried a couple of days ago and I got an error message saying no .res file.
@Lan visit the RAD Studio documentation on this link http://docwiki.embarcadero.com/RADStudio/en/FireMonkey_Application_Platform
Related with the error message, please try the Build all option.
does delphi support android in this version?
@a-h Not in this release, but it’s in our roadmap to support Android
Hi, excellent article, but I was with a doubt, which are the options of available reports in the FireMonkey?
I know some of our technology partners are working in a Report components for FireMonkey.
Hi mr Andreano Lanusse
i never think FireMonkey does’nt support RTL mode:(
please add that to your next roadmap. because my fellows can’t use that 🙁
my country has 76 million inhabitants!!
thank you for you’r trying
We support RTL in FireMonkey applications, just look my recent posts showing how to use RTL in C++, the same applies for Delphi applications
Thank You for Answer. But I mean ,can we use RTL languages(Farsi,.. etc) in FM without any problems?
Can we use that without this problems –> http://vcldeveloper.com/news/firemonkey-and-support-for-bi-directional-text/
Yes you can use FireMonkey and RTL, the post you mention talks about bi-directional support, which is supported by the framework, we need to improve the RTL support and bi-directional text, we are aware of that. This is not something that will block you to use FireMonkey.
Nice post Andreano!
We also released a very useful component for those who are working with Firemonkey. It converts any FireMonkey application to the Web (HTML5).
Take a look on the WebFMX product page: http://www.cybelesoft.com/webfmx