GUI Tutorial Page -2

Then, let we construct an empty descriptor file in that location. This operation is shown in the following figures. As a first step, the programmer clicks descriptor file icon on the toolbar. Then a directory manager window is opened on the screen such as in below.

When you click the open button on the dialog, an empty descriptor file will be placed on the inside of "Pcynlitx_First_Example" directory and it will be opened automatically as a new page. This operation has been illustrated on the next page.

Now, you can enter your preferences to the descriptor file by means of "Meta Library Description" menu. For instance, you can enter the construction point of the library, the names of the thread functions and how many thread will be on the program such as in below. Now, let we start construction point selection.

When you click the construction point selection on the meta-library descriptions menu, a directory selection dialog is opened such as in below.

After selection, the directory path of the construction point is written to the descriptor file automatically. After that, you can select the number of the thread to be created from the meta-programming menu.

Then a dialog box is opened such as in below.

Just as the other information, the thread number is written to the descriptor file automatically. For a minimal application, you must also determine the name of the functions which will be executed by the threads. In order to do this, you must click the thread function names section on the meta-library descriptions menu.

Then a dialog box is opened such as in below.

You can also enter some other preferences such as the inter-thread classes and the libraries to be linked. After your preferences has been entered, if you wish, you can print your preferences to the screen by means of a sample click to the related icon such as in the below.

If you click the print icon which is shown in above figure, then, your preferences will be listed such as in below figure. In the figure, in each section, a property of the application which will be developed is shown.

Now, you are ready to construct the application specific threading library by a sample click to the related icon such as in the below.

If you click the library construction icon, at first pcynlitx checks the declarations on the descriptor file and the syntax of the class declarations. If the pcynlitx can not obtain any error on the declarations, the library construction process starts. Otherwise, pcynlitx gives you the errors which are obtained. The progress bar of the library construction process is shown in below.

After library construction, a window appears in order to report the operation that was performed on the library construction. This list shows the classes that was built by the pcynlitx.

Then, with the closing of the window, on the right side of the pcynlitx, the library constructed is shown in tree list form. Now, your fist application specific multi-threading library is ready to use.

When you look at the main file, you can easily realize that the name of the server class is "Thread_Server". The Pcynlitx sets this name automatically for the server class. But, optionally, you can set your own server class name to the descriptor file before library construction process. The name of the directory including the generated header files is a combination of server class name and "_Include_Directory" sub-fix. In this example, of course, it is constructed as "Thread_Server_Include_Directory”. After that, you can open any file by clicking to the icons on the list. For instance let we try to look the files staying on the Thread_Server_Include_Directory. The server class is shown in below figure.

As you can see from the figure, when you click the icon names as Thread_Server.h, a new notebook page is opened. Although you don’t have to know the implementation details of the Thread_Server class, some little information can be useful. Let we take a closer look to the Thread_Server.h. The declaration of the Thread_Server.h has been shown in below.

On the beginning of the tutorial, it has been indicated that a data structure is used in order to pass the information from the main thread to the threads to be created. You can see this data structure on the header file which is named as itds.h

Previous Page: GUI Tutorial Page- 1

Previous Page