Renaissance—A Cross-Platform Development Tool for Linux and Mac OS X

Prepare to move to a Linux desktop by writing your apps with this flexible framework now.

In Listing 1, we tell Renaissance to create a closable window with the ID window. Then, we place an image view inside this window with such initial properties as the width and height of 300 points. We also specify that we want this image view to be resizable horizontally and vertically. Renaissance understands this and propagates the information up to the window to make it automatically resizable. We then define the connections for those two UI elements. We connect the window with our window outlet and the imageView with our imageView outlet. Those two outlets previously were defined in the file AppController.h.

Once the creation of the main gsmarkup file has been finished, we create the gsmarkup file (Listing 2) to hold the application menu used under GNUstep. In Listing 2, we define three menu items: Load Image, Hide and Quit. Each of them has an associated action that is invoked if the menu item is clicked on.

Once those two files have been created, we modify our initial GNUmakefile and replace the reference to the Gorm files with our two newly created gsmarkup files. We also add the Renaissance framework in our list of linked frameworks. The GNUmakefile now should look like Listing 3.

Then, we modify our initial TiffViewerInfo.plist to remove the reference to MainMenu.nib. The file now should contain the content shown in Listing 4.

The last step we must take before compiling the application is to implement two delegate methods in our application's controller. Those methods are responsible for loading the main gsmarkup file (TiffViewer.gsmarkup) and the one used for the application menu (GNUstep-Menu.gsmarkup). They need to be invoked automatically upon the application's startup on both GNUstep and Mac OS X. To do so, use an editor to open the AppController.m file and modify it so it has the content shown in Listing 5.

Here, only two methods were added, -applicationDidFinishLaunching: and -applicationWillFinishLaunching:. This shows yet another strength of Renaissance—unobtrusive integration with current code bases.

Finally, compile and start the small application:

# make
# openapp TiffViewer.app

Once the application starts, click on the Load Image menu item and select a TIFF file. It should display the image properly in the window, as shown in Figure 1.

Figure 1. The Image Viewing Application on GNUstep for Linux

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

John Mckay

Anonymous's picture

Has somebody worked with these application development tools?
It seems they have solutions for Linux but I wanted to know if somebody has experience with any of the tools

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix