C++ Boot Camp Tuesday: Fast Responsive User Interface Effects and Animations
Day 2 of C++ Boot Camp covers creating fast and responsive user interfaces with effects and animations.
Today we will mostly focus on FireMonkey with lots of practical examples of different user interface considerations. While we will focus on Windows user interfaces, we will also discuss how to plan for mobile.
- User Interface Considerations
- Discuss some common user interface paradigms and common elements.
- Working with Animations
- Animations are a great way to add movement to your user interface. Especially useful when it comes to bringing your user interface to life to help your users discover how to interact with it.
- Creating Effects
- Effects can be as simple as a drop shadow on a button, or as complex as a page curl. They add depth to your user interface.
- Avoiding Freezes
- Freezes are bad news for your user interface. Typically the result of long running processes in the main user thread. We will look at a couple technique to avoid freezes to keep your application responsive and your users happy.
- Dealing with Screen Resolutions
- Not everyone is running on 30" High-DPI displays. We will discuss making your user interface responsive to different screen sizes so it always looks good and is easy to use.
- Customizing Styles and Appearance
- The styling system helps your application look great, and simple customizations are a great way to make your application stand out and look fantastic.
- Jim McKeeth
- Lead World Wide Developer Evangelist & Engineer
- Long time software developer
- Invented and patented pattern and swipe to unlock
- US Patent # 8352745 & 6766456, etc.
- Built thought controlled drone with Google Glass
- Host of Podcast at Delphi.org
- Lives near Boise, Idaho, USA with his family
- Improvisational comedy performer with CSz Boise
- Follow on Twitter @JimMcKeeth
Get your free C++Builder Starter license (Limited time)
Understanding and using FireMonkey Layouts
Spacing – Margins and Padding
Why Use Animations, Transitions and Effects?
ShaderFilters Sample (Ships with Delphi & RAD Studio)
Q: Might be early, and maybe not on the topic of C++, but FMX-applications can be written in C++, is it also possible to do in Delphi-language?
A: Yes it is. FMX works with both Delphi and C++Builder equally.
Q: Which edition of RAD Studio provides both C++ & Delphi personalities?
A: All editions of RAD Studio provides both C++ & Delphi personalities.
Q: I know that this is a C++ boot camp but everything I saw yesterday I believe can be done in Delphi. Is that true ? If not, what can you do in C++ that you can't do in Delphi ?
A: You can't write C++ in Delphi. <grin> Tomorrow we will look at some C++11 specific language features that are unique to C++.
Q: I always had the idea FMX was based on a different language
A: FMX is built using Delphi. Under the covers the UI components connect to platform APIs for the user interface - we call this part FireUI. There are other parts of FMX that are related to the connections to 2D and 3D graphics (and the use of the GPU) on Windows, macOS, iOS and Android.
Q: When will we have unique_ptr in c++builder and a similar feature in Delphi in windows programs?
A: C++Builder supports unique_ptr for example: std::unique_ptr<TMyObject> obj(new TMyObject());
Q: where is the tool box to add elements to the form?
A: When you are in the IDE form designer - the Tool Palette shows all of the visual and non-visual components you can use. you can search in the tool palette (for example type button and get all of the components that have button in the name. type edit and see all of the components that have edit in their name.
Q: Can you simulate a panoramic view or a carousel type of UI?
A: Yes you can - in our samples, there is a "FireFlow" sample - which implements a "CoverFlow" type of UI - like you see on iTunes, music carousels, etc. All of our samples are also on SourceForge.
Q: is there anything available in C++ starter Berlin that is not available in XE7
A: Windows 10 styles and components, new UI components. Best way to see what's new between a specific version and the latest version - go to the DocWiki and read through the what's new section on each of the releases since your current version :D
Q: I can access all the FMX controls on Berlin. Why would I need MIDA converter? Do I need it?
A: if you need to convert VCL forms to FMX forms
Q: I can't find the links for the sources, can you paste it here?
Q: Any good books about LiveBindings?
A: http://docwiki.embarcadero.com/RADStudio/Berlin/en/LiveBindings_in_RAD_Studio has a lot of info
Q: GetIt Manager only has 16 items available ( some of those are multiple formats for the same thing ), is there any more coming ?
A: There are more in Pro and we're always open to adding more
Q: Delphi uses direct core function so, it is a platform for high-performance application. Correct?
A: It uses DirectX / Direct2D on Windows, OpenGL on other platforms - so yes, definitely high performance
Q: Can we handle gigabyte images made from applications like photoshop in image control?
A: You may run into DirectX restrictions at that size! Best approach is to tile the image or resample down and show different tiles at various zoom levels
Q: What version is app tethering
A: XE6 and above, I think, though recent versions have some fixes and changes of course
Q: What is the best way to handle string between anscii string and Unicode string in migration from Delphi's older version?
A: Marco Cantu wrote a great whitepaper: https://community.embarcadero.com/images/38980/Delphi_and_Unicode.pdf For C++, use wide strings and streams instead of narrow
Q: Is the complete win32 API available
A: Yes, plus the VCL which is a really nice wrapper over the WinAPI controls (plus custom controls.) The entire WinAPI, including nonvisual APIs, is definitely and easily available
Q: Speaking of mixing Object Pascal supported inline assembly, does C++ support this?
A: Inline assembler in Delphi only. You can link Assembler files into your C++ projects.
Q: is it possible to get separate parts/modules of c++ builder like get GPS module get just android compilation etc. in other words "build your own C++ Builder" version
A: Some parts are modularised - eg Mobile, FireDAC
Q: please suggest place from where we can learn REST from beginning.
Q: Is the starter version and pro version only different in keys? Can I install starter and upgrade to pro by using different keys?
A: Yes, if you buy Pro you get a new license key, then you can use the Feature Installer to install more features
Q: What is the advantage using C++ over python or java
A: we create native code for Intel and ARM processors. We don't create bytecode. I know there are just in time compilers for Java and Python - but we go from source code to optimized machine code for compile apps.
Q: Is TButon may have the appearance of the District , and whether it will have any color
A: You can use FMX Styles to control buttons. you can also place (parent) an image on a tbutton and control color and bitmap on the image.
Q: Do the padding, spacing etc. being discussed apply to vcl as well as fmx?
A: Yes, although in VCL they work very slightly differently. FireMonkey layout strategies - http://docwiki.embarcadero.com/RADStudio/Berlin/en/FireMonkey_Layouts_Strategies
Q: while justifying inside TflowLayout does it depend on tab order?
A: TflowLayout - http://docwiki.embarcadero.com/Libraries/Berlin/en/FMX.Layouts.TFlowLayout. Also, check the TFlowLayout - rules - http://docwiki.embarcadero.com/Libraries/Berlin/en/FMX.Layouts.TFlowLayoutRules
Q: So how do you have a memo expand to the size of a form. I have had what he is describing occur with memos when I try to anchor to the left and right what is the best practice for that.
A: You can align to "client", that is, fill up the entire space available, accounting for spacing, or anchor to left/right/top/bottom
Q: Difference between Tab Control and Page Control?
A: Tab and page control are different in VCL, where a tab control has the same tab content for all tabs, a page control doesn't. In FMX, there's just the tab control, every tab has different content
Q: How can I have a memo follow the right side without filling up the whole client
A: Anchor it to right, and it will stay the same width and stick to the right edge
Q: about the Product RoadMap:
A: Marco Cantu wrote an article on the Embarcadero Community with an update to our Product Roadmap (august 2016) - you can find it at http://community.embarcadero.com/article/news/16418-product-roadmap-august-2016
Q: What does the double colon mean in the code?
A: In something like TForm2::Foo() ? They indicate scope - TForm2 is the class, Foo is the method in that class. You use the same syntax for namespaces, which are a way of grouping classes, methods, variables, etc
Q: When would one still use VCL instead of FMX for a new project?
A: I'd use FMX all the time, but you use VCL if you want Windows only. It has native Windows controls and is a very mature library, one we're still developing and adding to. FMX is for cross-platform and has all the GPU powered stuff, antialiasing display quality, great effects etc - it's the new way
Q: How FireMonkey works inside in relation to rendering? Is it based on Direct2D/DirectWrite as new Win10 approach uses? Can it be somehow compared to WPF/milcore (mostly managed) and SL/agcore (mostly native) ?? Thanks.
A: It uses Direct2D on Windows, OpenGL on other platforms. It is similar to WPF, only with a less XML-esque streaming, native controls (you can have native controls!), and cross-platform
Q: I had some little experience with Delphi and VCL and it seemed that in your world were not much used some advanced algorithms for collections as hash tables and also async processing - so although it's native, it was quite sluggish. Will this be improved throughout whole libraries fo FMX approach? thanks
A: In C++, there are definitely things like hash tables, and async is available through the parallel programming library for both C++ and Delphi. In Delphi, check out the Spring4D library - some great collections and other code
Q: How much allows C++ starter in relation to FMX styles? All editing possible? To make my own "crazy" style for Win at least? Users don't want too much unified skin-like behavior across platforms (in some app types though) - but for some kind of apps, its pixel-perfect rendering of the same UI across platforms (as in games) possible?
A: You can create your own styles, yes! And you can use the same style across platforms, to have the exact same look across several
Q: Long ago, I used QuickReports. This was bundled with Delphi, like FastReports now. If I need to maintain/update that old code under current IDE, what recourse do I have?
A: Quickreports and FastReports both support 10.1 Berlin. If you want just use FastReports - they have a QuickReports converter.
Q: What language are FMX and VCL written in?
A: FMX and VCL are written in Delphi and some assembler
Q: what database interfacing is available to the package : Starter; Pro; Enterprise etc?
A: Database support in Pro and Enterprise - FireDAC docwiki shows you all the SQL databases supported - http://docwiki.embarcadero.com/RADStudio/Berlin/en/FireDAC
Q: What is more used on a global Market : Delphi or C++ Builder?
A: C++ language is used by more developers worldwide. Delphi is used a lot in parts of the world - Brazil, Russia, South Africa, Eastern Europe, etc.
Please login first in order for you to submit comments
- Page :