An Introductıon to Pcynlitx Graphical User Interface

The document which is named as "GUI_Tutorial.pdf" includes the same content and it can be downloaded as PDF from the link depicted as PDF Documents on the Documentation menu. In this tutorial, it has been assumed that the reader has basic knowledge about object oriented C++ programming. This tutorial documentation has been divided two pages.

In Pcynlitx, the GUI can be easily used as a code editor. But, in fact, it is more than a code editor and it is an integrated development environment for multi-thread C++ applications. In the following of this tutorial, the GUI will be explained briefly. In this section, the elements of the GUI will explained and if you wish, you can directly pass to the next section ( Section – II : Practical example ) that gives a practical example. In below, a screen-shot is shown for the GUI.

1. The Elements of The Graphical User Interface

The GUI has some classical menus such as file menu, help menu, edit menu and view menu. Edit and View menu includes some properties that can be used for code styling. However, in GUI, there are some menus that are used especially for meta-programming. These menus are “Meta Programming” menu, “Meta Library Descriptions” menu and “Compiler Descriptions” menu. The Meta Library Descriptions menu is used to enter the properties of the applications specific threading library to the descriptor file. By means of Meta Library Descriptions menu, you can easily enter many information such as what will be the name of the thread functions be, how many thread will be used in the program, the classes that will be used between the threads and the smart pointers that will be constructed by pcynlitx. The programmer can use the Compiler Descriptions menu when the program is ready to compilation process. In meta programming menu, the items perform some meta-programming tasks such as library construction and executable file construction. From section 1.1 to 1.4 , these menus will be introduced.

1.1 Pcynlitx Icons

1.2 Meta Library Descriptions Menu

The programmer can enter the descriptions about the application specific threading library into the descriptor file by means of this menu. In this menu, there are some dialog that selects the locations and files. The programmers enter their own preferences to these dialog and then pcynlitx automatically codes these preferences to the descriptor file. Beside to this, the syntax of the descriptor file is very simple and the programmers can directly write their preferences to the descriptor file as well. However, for a beginner, the usage of the descriptions menus can be more efficient way. On this menu, the programmers can select files that belong to the inter-thread classes and the smart pointers ( header files and source files ). Let we start to explore meta library descriptions menu.

1.2.1 Main Descriptions

Enter Construction Point:

The programmer selects the location in which the application specific library will be constructed ( The construction point of the library which will be constructed ).

Enter thread function name:

The programmer enters the name of a thread function that will be executed by the threads.

Enter thread number:

The programmer enters the number of the thread that will run on the process.

1.2.2 Inter-Thread Class Descriptions

Enter Inter-Thread Class Header

The programmer selects a header file of an inter-thread class from a dialog.

Enter Inter-Thread class source file:

The programmer selects the source file of the inter-thread class.

1.2.3 Smart Pointer Descriptions

Enter data type header:

From a file dialog, the programmer can select the header file path of a data type in order to be produced a smart pointer. If the data type is a C++ key word, there is no need to enter any information.

Enter data type (Basic Types):

The programmer enters the name of the data type by means of this menu if data type is a C++ key word.

Enter data type source file name:

From a file dialog, the programmer can select the source file path of a data type in order to be produced a smart pointer. If the data type is a C++ key word, there is no need to enter any information.

1.2.4 Libraries For Linking

Enter Library Paths For linking:

The programmer selects a library which includes implementation of either an inter-thread class or smart pointer data type.

1.2.5 Namespace Setting

Enter Namespace Information

The programmer selects the namespace of the library to be constructed. If the description is empty ( the programmer does not enter anything to this section of the descriptor file, the default namespace which is "pcynlitx" is set by the platform automatically.

1.3 Compiler Descriptions Menu

In fact, the main purpose of the pcynlitx is to build application specific library and the programmer can use the outcome library in other IDE’s ( Integrated development environments ). However, pcynlitx has also a compiler option can be used in order to produce an executable file. After the application specific threading library ( meta-library ) has been constructed, the programmer can writes the codes. Then, by means of the “Compiler Descriptions Menu”, the programmer can add the other source files that will be used in the compilation process.

Enter new header file:

The programmer selects a header file which will be used by compiler.

Enter Source File:

The programmer selects a source file which will be used by the compiler.

Enter library for linking:

The programmer selects a library which will be used in the project.

Enter executable file name:

The programmer enters the name of the file which is the outcome of the project. In other words, the name of the binary file is determined.

1.4 Meta-Programming Menu

Meta programming menu includes items that is used in project development. The programmer uses this menu in all stage of the code development. In the process of descriptor file construction, “New Empty Descriptor File” and “Select Descriptor File” items can be used. Then, after all necessary data has been entered the descriptor file, the application-specific library can be easily constructed. Meanwhile, the programmer can be easily illustrate some information such as the library construction directory, descriptor file location and descriptor file name. Let we start to explore meta-programming menu.

Build Library:

The programmer can construct the application specific library with this menu item. There is a short-cut icon on the menu bar that performs the same action.

This icon performs the same thing

Build Binary:

After the application-specific library constructed and all of the necessary source files has been coded, the programmer can compile the application with this menu item.

This icon performs the same thing

Open Terminal:

It opens a terminal window.

This icon performs the same thing

Select Descriptor File

It selects an existing descriptor file from a location

This icon performs the same thing

New Empty Descriptor File:

It selects a location and construct a new empty descriptor file.

This icon performs the same thing

Project Directory Tree View

It divides the screen of the pcynlitx and show the file and directories that place on the library construction point in the tree form.

This icon performs the same thing

Print Your Descriptions:

Prints the user preferences that are entered to the descriptor file.

This icon performs the same thing

Show Descriptor File:

It opens descriptor file if it is already selected

Show Descriptor file location

It shows the location of the project descriptor file.

Show Construction Point:

It shows the library construction point.

1.5 Directory Tree View Property

In pcynlitx, you can select a directory and visualize its sub-directories and files in a tree form. In View menu, “Open Directory List” item perform this task. The start screen of the pcynlitx is shown in below. “Open Directory List” menu item works as follows. When you click the “Open Directory List” item from View menu, a directory selection dialog is opened. Then, you can select a directory form the dialog. After selection, the screen of the Pcynlitx will be divided in two parts and in the right side of the Pcynlitx’s main window, the selected directory and its sub-directories with their sub-files will be listed.

In fact, in Pcynlitx, the directory which is selected for library construction will be listed automatically after library construction. From that list, The programmer can easily see what kind of files and directories has been constructed after library construction process. The programmer can select a file from this menu. After selection, the file will be loaded into the text frame. A sample figure has been shown in below in order to illustrate this form of Pcynlitx. A sample illustration of the three view is shown in below.

Beside to this, three view panel can be closed by means of the “close icon [x] ” which places on top of the tree view. There is a last one menu item that controls three view control. This item is “Project Directory Tree View” that places the Meta Programming menu. However, this item is used to re-open the directory that is defined as the construction point of the application-specific library after construction.

2. A Practical Example

Perhaps, the best way of learning a program is to use it. Let we start to use pcynlitx with a simple application. In the example, we will examine how a simple library will be constructed and how the main controls of the Pcynlitx can be used. In addition, we will also investigate the classes to be constructed on the library construction process. In the example, there will be two ( 2 ) threads that run separately and they will execute two thread functions named as “Function_1” and “Function_2”. We can illustrate the structure of the application in below.

Now, first of all, let we define a new directory on the home directory such as,

Next page: GUI Programming Tutorial Page -2

Next Page