revUp - Updates and news for the Revolution community
Issue 95 | June 25th 2010 Contact the Editor | How to Contribute

NativeGeometry: Get Strict
Use this strict geometry manager to create pixel perfect UI's on all platforms

by Damien Girard

You may be asking yourself, "what is a strict geometry manager?" The answer is simple: a strict geometry manager is a geometry manager that has strictly defined geometry relations. It enables objects to relate to each other in terms of their size and position.

Your next question might be: "Why I would need a strict geometry manager?"

To answer to that question, I ask you to think about these situations:
  • - The end users screen is a high resolution one with 120dpi instead of 96
  • - The end user is using a big custom font for accessibility due to poor eyesight
  • - The client wants to localize the application after it is released
  • - The client wants to run the application on Linux as well as Mac or Windows

So how do you tackle these situations?

  • - You can design a special version for that customer? This may not be cost effective for just one customer...
  • - You can create a magical script that does a few fixes... could be time consuming
  • - You can rewrite all your application geometry inside the "resizeStack" handler? Now you are using strict geometry management!

But these fixes do not solve the problem, they are just temporary fixes, and they are really time consuming. As all developers know, time is money. But if you do nothing, a customer may launch your application, decide it does not look good, and simply throw it away. You've lost a sale.

These few little screenshots show the problem, this is the same sample stack; one is running NativeGeometry, the other one is using the classical Rev geometry manager:

- On Windows 7, the development platform, the application looks good, it is normal as the application has been developed on Windows 7. But, let's see on Windows 98 and Linux...

- On Windows 98/2000/XP, you have to manually update the fonts of your objects in order to make them look good on Windows classic UI. You can see that the button size is not the same. NativeGeometry automatically adapts object sizes in order to look right on all platforms, you can see this well on Linux:

- On Linux, the application without NativeGeometry looks alien compared to the other window, the buttons are small, the spacing between buttons is incorrect, and you have to manually set the font.

Currently many developers write all their geometry relations in the resizeStack handler, what a time consuming thing! And imagine that you want to quickly update the layout of your application? By writing all your scripts in the resizeStack handler you are losing the main advantage of Revolution, that is to design at the speed of the thought!

The two following screenshot show how easy it is to use NativeGeometry:

- Simply select an object, click "Set Object Geometry" in the NativeGeometry palette, and here you go!

- NativeGeometry also supports multiple objects editing, in order to work even faster!

If you would like to learn more about what NativeGeometry can do for you, please visit the NativeSoft website.

You can try NativeGeometry for free, but it is limited to 3 objects. You can try the sample stack to see more of what NativeGeometry can do.

You can purchase the program via revSelect here.

Over the coming months I will be writing a series of article that will talk more in depth about what NativeGeometry can do. These will cover:

  • The automatic dependencies solver
  • Working with geometry relations conditions
  • Cross-platform applications development
  • Tips and tricks with NativeGeometry

See you soon! Damien Girard

About the Author

Damien Girard started programming at 7. He began writing Rev solutions at 12. Now he works for a company as an embedded Linux expert and C/C++/C#/RevTalk programmer. He continues to release extensions for Rev in his spare time.

Main Menu

What's New

Get the early release of revServer!