Difference between revisions of "Gestinux util"

From Gestinux Wiki
Jump to navigation Jump to search
 
(43 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Gestinux_util is an utility package containing visual and non-visual components.
+
Gestinux_util is a set of utility packages containing visual and non-visual components. It is the base of Gestinux and it allows even quicker developments.
  
It is the base of Gestinux and it allows even quicker developments.
+
== Package location ==
  
Currently, it is a part of Gestinux, and sources are located in on of it's subdirectory. In the future, it could become more independant.
+
Each version of Gestinux uses a specific version of Gestinux_util package(s).
  
 +
The 1.5 version requires gestinux_util 1.5.
 +
 +
Starting with version 1.5, gestinux_util has been splitted in 2 different packages, both required : gestinux_base and gestinux_util.  gestinux_base is runtime only and required by gestinux_util, so you have only to install gestinux_util.
 +
 +
''This was done to make console or web application using these components, and some gestinux units (unit*base.pas), without trying to link user-interface code. This is still impossible with ZeosLib 7.2.6 and PowerPdf. A new version of ZeosLib packages was submitted to the team to allow that. There is some work to use all Gestinux unit*base units and Zeos in a web or console application.''
 +
 +
== Translations location ==
 +
 +
Sources and translation files are located in subdirectories of the main Gestinux directory.
 +
 +
But, since the package can be used for other applications, its sources, including its translations, can be located anywhere outside the application sources. To have appropriate translations when running from within Lazarus EDI, you must have in the run parameters (Menu : Run > Run parameters) this qualifier :
 +
 +
  -u ${GESTINUX_UTIL}
 +
 +
It refer to the macro ${GESTINUX_UTIL}, which is set automatically to the right value when you install the package gestinux_util or gestinux_base and is used to find the appropriate translation files, possibily outside project  sources.
 +
 +
This is only for execution with EDI.
 +
 +
If you are wanting to compile and execute gestinux, you have nothing to add, this parameter is saved in the project file.
  
 
== Database Non-Visual components ==
 
== Database Non-Visual components ==
  
They are only for database connection and management.  
+
They are only for database connection and management.
  
 
Currently based on Zeos Dbo components, with some methods added to create (and update) table structure from the datamodule.
 
Currently based on Zeos Dbo components, with some methods added to create (and update) table structure from the datamodule.
Line 21: Line 40:
 
* [[TGQuery]]
 
* [[TGQuery]]
 
* [[TGTable]]
 
* [[TGTable]]
 +
 +
== Forms ==
 +
 +
[[TGForm]] is a descendant of TForm with some common code handling keys and translations.
 +
 +
To create a new form, use File > New, and select '''only''' Module : GForm.
 +
 +
This will help to have a consistent handling of all forms in the application, and will allow future changes.
  
 
== Visual components ==
 
== Visual components ==
=== Data Entry components ===
 
  
These components are containing a label and an entry component. In Gestinux, Data entry must use only TGxxxx components, because these components are handling translations, and should handle soon text orientation (LTR/RTL) automatically.
+
These components are based on LCL Controls.  
 +
 
 +
All these visual components are enabling dynamic translation of their captions and other texts.
 +
 
 +
We have started in version 1.5 to manage text orientation (LTR/RTL) automatically.  
 +
This is definitely not fully finished.
 +
Sample hebraic translation files are provided in the trunk version, but not finished. If you can complete it, or provide other RTL language, you are welcome.
 +
 
 +
=== Display only components ===
  
* [[TGPanel]] and [[TGPanel|TGEntryPanel]]
 
 
* [[TGLabel]]
 
* [[TGLabel]]
 +
* [[TGMainMenu]] : a descendant of TMainMenu with automatic translation of captions and hints of all menu items, from the language file.
 +
* [[TGPopupMenu]] : a similar descendant of TPopupMenu
 +
* [[TGPageControl]] : a descendant of TPageControl with automatic translation of captions and hints of tabsheets, from the language file.
 +
* [[TGPanel]] and [[TGEntryPanel]]
 +
* [[TGDbGrid]]
 +
* [[TGNavButtons]] : a set of buttons, similar to DbNavigator to manage table data.
 +
* [[TGButton]] and [[TGSpeedButton]]
 +
 +
=== Data Entry components ===
 +
 +
These components are containing a label and an entry component.
 
* [[TGEdit]]
 
* [[TGEdit]]
 
* [[TGEditButton]]
 
* [[TGEditButton]]
* [[TGDateEdit]]
+
* [[TGDateEdit]] and [[TGDateTimeEdit]]
* [[TGPeriodEdit]]
+
* [[TGComboBox]]
 
* [[TGColorEdit]]
 
* [[TGColorEdit]]
 
* [[TGCheckBox]]
 
* [[TGCheckBox]]
 +
* [[TGPeriodEdit]]
 
* [[TGRadioGroup]]
 
* [[TGRadioGroup]]
* [[TGComboBox]]
+
* [[TGFileEdit]] and [[TGFolderEdit]]
 
* [[TGSpinEdit]]
 
* [[TGSpinEdit]]
 
* [[TGMemo]]
 
* [[TGMemo]]
 +
* [[TGImage]]
 +
* [[TGGrid]]
  
=== Grids ===
+
The first 7 (and more in the future) are usable in the [[TGEntryPanel]] for a quick integration with database.
  
Translation or columms titles is searched in language files.
+
=== Others ===
Column widths and order are saved in the user's inifile when changed.
 
Other useful things are specific to each grid
 
 
 
* [[TGGrid]] : read-write TStringGrid with methods to insert and delete lines.
 
* [[TGDbGrid]] : read-only TDbGrid connected to a [[TGQuery]], with column sorting.
 
 
 
=== Buttons ===
 
All are reading translation of caption and hint in the translation file.
 
 
 
* [[TGNavButtons]] : a set of buttons, similar to DbNavigator to manage table data.
 
* [[TGButton]] : a TBitBtn.
 
* [[TGSpeedButton]] : a TSpeedButton.
 
  
=== Menus and others ===
+
* [[TGFrame]]
* TGMainMenu : a descendant of TMainMenu with automatic translation of Caption and Hint of all menu items from the language file.
 
* TGPopupMenu : a similar descendant of TPopupMenu
 
* TGPageControl : aPageControl with TabSheets
 
* TGFrame : aTFrame
 

Latest revision as of 21:26, 9 August 2022

Gestinux_util is a set of utility packages containing visual and non-visual components. It is the base of Gestinux and it allows even quicker developments.

Package location

Each version of Gestinux uses a specific version of Gestinux_util package(s).

The 1.5 version requires gestinux_util 1.5.

Starting with version 1.5, gestinux_util has been splitted in 2 different packages, both required : gestinux_base and gestinux_util. gestinux_base is runtime only and required by gestinux_util, so you have only to install gestinux_util.

This was done to make console or web application using these components, and some gestinux units (unit*base.pas), without trying to link user-interface code. This is still impossible with ZeosLib 7.2.6 and PowerPdf. A new version of ZeosLib packages was submitted to the team to allow that. There is some work to use all Gestinux unit*base units and Zeos in a web or console application.

Translations location

Sources and translation files are located in subdirectories of the main Gestinux directory.

But, since the package can be used for other applications, its sources, including its translations, can be located anywhere outside the application sources. To have appropriate translations when running from within Lazarus EDI, you must have in the run parameters (Menu : Run > Run parameters) this qualifier :

 -u ${GESTINUX_UTIL}

It refer to the macro ${GESTINUX_UTIL}, which is set automatically to the right value when you install the package gestinux_util or gestinux_base and is used to find the appropriate translation files, possibily outside project sources.

This is only for execution with EDI.

If you are wanting to compile and execute gestinux, you have nothing to add, this parameter is saved in the project file.

Database Non-Visual components

They are only for database connection and management.

Currently based on Zeos Dbo components, with some methods added to create (and update) table structure from the datamodule.

Gestinux uses only descendants of TZConnection, TZQuery and TZTable.

Other midleware, specially the interface provided with Lazarus are said to be faster. One bad point is that components are specific to only one DBMS, and not following DBMS versions quickly enough. However, if someone wants to develop the same functionnalities and compare, he is welcome !

Forms

TGForm is a descendant of TForm with some common code handling keys and translations.

To create a new form, use File > New, and select only Module : GForm.

This will help to have a consistent handling of all forms in the application, and will allow future changes.

Visual components

These components are based on LCL Controls.

All these visual components are enabling dynamic translation of their captions and other texts.

We have started in version 1.5 to manage text orientation (LTR/RTL) automatically. This is definitely not fully finished. Sample hebraic translation files are provided in the trunk version, but not finished. If you can complete it, or provide other RTL language, you are welcome.

Display only components

Data Entry components

These components are containing a label and an entry component.

The first 7 (and more in the future) are usable in the TGEntryPanel for a quick integration with database.

Others