Sign in Join
Wiki copytemporary

MSEide+MSEgui/fr: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11**Information** : Le projet MSEide+MSEgui est continué par les [amis de Martin Schreiber](https://github.com/mse-org). Rejoignez-nous !
22
33La version la plus récente de MSEide+MSEgui peut-être téléchargée sur la page suivante : <https://github.com/mse-org/mseide-msegui>
44
55Biographie de † Martin Schreiber (en anglais) : <https://sites.google.com/view/martin-schreiber-biography/>
66
77# Introduction
88
99MSEide+MSEgui est un outil multiplateforme de développement entièrement écrit en Pascal. La bibliothèque MSEgui n'est pas compatible avec la VCL. La bibliothèque graphique est une interface à win32 et X11. Quoiqu'étant l'œuvre d'une seule personne (Martin Schreiber) l'EDI et la bibliothèque offrent de nombreuses fonctionnalités :
1010
1111- Encodage interne des caractère en UCS2.
1212- Outil d'internationalisation inclus.
1313- Docking forms.
1414- Embedded forms (similar to TFrame).
1515- Visual form inheritance.
1616- Liaison à xlib et à gdi32, sans dépendance à une autre bibliothèque.
1717- Composants pour la gestion de bases de données et composants visuels pour l'édition des données.
1818- Débogage intégré.
1919- Integrated report designer.
2020- Flexible and handy build system with switchable macros.
2121- Et d'autres choses encore...
2222
2323## Mais que faites-vous de Lazarus ?
2424
2525[Lazarus](http://www.lazarus.freepascal.org) est un EDI qui offre un haut degré de compatibilité avec la VCL (la bibliothèque de composants visuels de Delphi) et des applications avec un aspect différent sur de nombreuses plateformes. Cet aspect natif est important pour beaucoup de développeurs. Cependant, le parti pris de la compatibilité avec la VCL nécessite un travail compliqué d'interface avec les différents ensembles de composants visuels (GTK, Win32, Carbon, Qt). L'évolution de ces ensembles (par exemple le passage de GTK1 à GTK2) oblige à des réadaptations continuelles.
2626
2727[MSEide+MSEgui](http://sourceforge.net/projects/mseide-msegui/) n'a ni l'avantage de la compatibilité avec la VCL, ni un style différent pour chaque plateforme. La bibliothèque visuelle fait interface avec Win32 et X11. L'avantage de s'appuyer sur X11 est de pouvoir atteindre durablement un grand nombre de plateformes.
2828
2929Lazarus et MSEide+MSEgui poursuivent donc des objectifs différents. À vous de voir lequel correspond le mieux à vos attentes !
3030
3131## Pourquoi ce wiki
3232
3333La conception de MSEgui est une nouvelle approche. MSEgui apporte des solutions innovantes aux problèmes de toujours. La bibliothèque MSEgui est donc radicalement différente de la VCL/LCL/CLX. Passer de la VCL à MSEgui sera plus difficile que de passer [[Code Conversion Guide|de la VCL à la LCL]]. Ces pages de wiki ont pour but de vous guider dans vos premiers pas.
3434
3535# Installation
3636
3737- Dernière version publiée par Martin Schreiber : 4.6.2
3838- Page d'accueil : [Site de MSEide+MSEgui](http://mseide-msegui.sourceforge.net/)
3939- Téléchargement : [Sourceforge](http://sourceforge.net/projects/mseide-msegui/files/)
4040
4141- Version courante du projet continué par les amis de Martin Schreiber : 5.1.0
4242- Page d'accueil : [Nouveau site de MSEide+MSEgui](https://github.com/mse-org/mseide-msegui)
4343- Téléchargement : [Github](https://github.com/mse-org/mseide-msegui/releases)
4444
4545Les instructions pour l'installation se trouvent sur la page d'accueil.
4646
4747# Premières notions
4848
4949## Ouverture d'un projet
5050
5151Lancez l'EDI et utilisez le menu Project-\>Open pour ouvrir le projet de démonstration msegui/apps/demo/demo.prj. Le nom du projet s'affiche dans le titre de la fenêtre principale. Appuyez sur F9 et (pourvu que vous ayez suivi les consignes d'installation), admirez la rapidité du tandem formé par Free Pascal et MSEide.
5252
5353## Premiers pas dans le développement rapide d'applications
5454
5555Arrêtez l'application en cliquant sur le bouton Exit. Utilisez le menu Project-\>Source pour ouvrir le fichier demo.pas. Appuyez sur la touche Ctrl et simultanément cliquez sur le paramètre mainfo dans la ligne de code suivante :
5656
57-`application.createform(tmainfo,mainfo);`
57+```text
58+application.createform(tmainfo,mainfo);
59+```
5860
5961Le fichier main.pas s'ouvre automatiquement dans l'éditeur et le curseur se positionne à l'endroit où la variable mainfo est déclarée. Cliquez sur F12 pour passer de l'unité à la fiche et inversement. Tout ne sera pas aussi facile : c'est la raison d'être de la page que vous êtes en train de lire. Cliquez sur le bouton : l'éditeur de propriétés s'ouvre (inhabituel mais commode). Nous allons ajouter un deuxième bouton. Si nécessaire, affichons la palette de composants en utilisant l'item de menu View-\>Toolbar-\>Component Palette. Sélectionnons le composant tbutton sur l'onglet Widget (c'est le premier). Cliquons sur la forme pour placer le bouton. Renseignons la propriété caption de la manière habituelle. La création d'une procédure liée à un événement ne se fait pas de la manière accoutumée, par un double clic sur la propriét onexecute. Au lieu de cela, vous devez sélectionner la propriété onexecute dans l'éditeur de propriétés, taper le nom que vous vous avez choisi pour la procédure et appuyer sur Entrée. Le code de la procédure est automatiquement créé et le curseur se place à l'endroit de la définition. Utilisez la combinaison de touches Ctrl-Shift-flèche du bas (ou du haut) pour aller de la définition à l'implémentation. Ajoutez dans le corps de la procédure quelque chose comme writeln('Hello world'); puis appuyez sur F9. Le résultat de l'instruction writeln s'affiche dans la console cible de MSEide, que vous pouvez rendre visible par le menu View-\>Target Console.
6062
6163## Ajouter un menu
6264
6365### Création du menu
6466
6567Sélectionnez le composant `tmainmenu`, dans l'onglet Gui de la palette de composants, et déposez le composant sur la forme principale.
6668
6769![](/wiki-images/8/8f/Tmainmenu1.png)
6870
6971Cliquez sur la forme principale (`mainfo`) pour que l'inspecteur d'objet affiche les propriétés de la forme principale. Utilisez la flèche à droite de la propriété mainmenu, pour sélectionner `tmainmenu1` comme menu principal de la forme principale.
7072
7173![](/wiki-images/d/d2/Tmainmenu2.png)
7274
7375### Création des items de menu
7476
7577Dans l'inspecteur d'objet, développez la branche mainmenu. Dans cette branche, développez la propriété menu. Changez la valeur de submenu.count : remplacez 0 par 1 (ou une valeur supérieure).
7678
7779![](/wiki-images/2/29/Tmainmenu3.png)
7880
7981Développez la propriété submenu.count, qui affichera "Item 0". Dépliez "Item 0" et changez la valeur de la propriété caption : mettez par exemple "&File".
8082
8183![](/wiki-images/7/77/Tmainmenu4.png)
8284
8385Répétez ensuite la même procédure, en changeant la valeur de submenu.count pour "Item 0" : mettez par exemple 1.
8486
8587Développez la propriété submenu.count et changez la valeur de la propriété caption pour le nouvel "Item 0". Mettez par exemple "E&xit". Appuyez sur F9 : votre programme devrait avoir un menu *F*ile avec une entrée E*x*it.
8688
8789![](/wiki-images/0/03/Tmainmenu5.png)
8890
8991### Autre méthode
9092
9193Une autre méthode consiste à cliquer avec le bouton droit de la souris, dans l'inspecteur d'objet, sur la propriété submenu.count, ou sur une propriété "Item n". Vous verrez apparaître un menu contextuel. Utilisez ce menu pour insérer, ajouter ou supprimer des items de menu.
9294
9395Dès que vous avez plus d'un sous-menu, vous pouvez déplacer les items en les faisant glisser avec la souris. Commencez le mouvement de la souris sur la ligne "Item n".
9496
9597## Créer un projet à partir d'un modèle
9698
9799Pour créer un projet à partir d'un modèle (template), utilisez le menu Project-\>New-\>From Template. Pour une application graphique, choisissez "default.prj" ; pour une application console, choisissez "console.prj".
98100
99101# Vue d'ensemble
100102
101103MSEgui est une bibliothèque qui fournit les matériaux permettant de construire des applications avec interface graphique<sup>1</sup>.
102104
103105MSEide est un environnement de développement conçu pour la production de logiciels avec Free Pascal et MSEgui. MSEide peut aussi être utilisé pour produire des applications pour micro-contrôleurs, avec le compilateur GCC.
104106
105107La version courante de MSEide+MSEgui fonctionne sous i386-linux, x86-64-linux, arm-linux, x86-64-freebsd, i386-win32 and x86-64-win64. Les microprocesseurs supportés sont CPU32, ARM and AVR32. MSEgui n'est lié à aucune plateforme en particulier. Des plateformes supplémentaires peuvent être ajoutées, à condition d'implémenter les éléments dependants du système. Les modules de MSEgui propres à un système en particulier se trouvent dans les sous-répertoires du dossier lib/common/kernel.
106108
107109## Principaux objectifs recherchés au cours du développement
108110
109111- Une productivité accrue.
110112- Une apparence et des fonctionnalités identiques sur toutes les plateformes, sans précautions particulières de la part de l'utilisateur.
111113- Aussi peu de dépendances que possibles.
112114- Orthogonalité : il doit y avoir aussi peu d'interférences que possible entre les différents éléments du programme et aussi peu d'exceptions et de cas spéciaux que possible.
113115- Des composants hautement paramétrables.
114116- Travailler avec MSEide+MSEgui devrait être amusant.
115117
116118## Architecture
117119
118120MSEgui ne dépend d'aucune bibliothèque externe de composants. MSEgui communique directement avec l'interface graphique du système d'exploitation, X11 via Xlib sous Linux et GDI sous Windows.
119121
120122Les éléments individuels de la bibliothèque n'emploient aucune ressource du système d'exploitation. Seule la fenêtre principale est connue du système d'exploitation. Le traitement des événements externes (clavier, souris, contrôle du focus) se fait à l'intérieur de MSEgui, en Pascal.
121123
122124La classe de base pour les éléments de la bibliothèque est la classe `twidget`. Il n'y a aucune distinction entre les éléments graphiques simples et ceux qui peuvent recevoir le focus (comme c'est le cas avec Delphi). Tous les widgets MSEgui disposent de toutes les fonctionnalités de la classe `twidget`.
123125
124126La classe `twidget` a deux propriétés remarquables qui sont d'une part `twidget.frame` et d'autre part `twidget.face`. Quand ces deux propriétés ne sont pas utilisées, elles ont la valeur **nil**, de façon à ne consommer aucune ressource.
125127
126128La propriété `twidget.frame` est responsable du cadre qui entoure la surface utile de l'élément. L'apparence du cadre est modifiable. Ce peut être un simple cadre 3D, rapide à dessiner, aussi bien qu'une construction complexe basée sur des images. Le cadre comprend aussi des éléments qui peuvent être utilisés pour faire des barres de défilement, des boutons et des labels.
127129
128130La propriété `twidget.face` dessine l'arrière-plan de la surface utile d'un élément. Des dégradés de couleur et des images peuvent être utilisés. Une transparence partielle est possible.
129131
130132Setting the properties of frame and face can be centralised by using `tframecomp` and `tfacecomp`, which can be selected into `tframe` and `tface` as templates.
131133
132134The next level of centralization is `tskincontroller`, through which program-wide settings can be made. In order to achieve that, `tskinkontroller` assigns to the GUI elements the appropriate `tframcomp` and `tfacecomp` templates.
133135
134136The control of the widget functions (focusin, focusout, ...) is done by virtual procedures and functions and not through messages. The MSEgui message function has other tasks. Also a Corba-style interface is used - for the safe connection between the various components and the automatic disconnection through destroy, a `tobjectlinker` is used.
135137
136138The type `msestring` is used in MSEgui for storing text. At the moment, msestring equals WideString. However, the reference counted FPC WideString (UnicodeString) is planned to be used under Windows, as soon as it becomes available in one of the future FPC releases.
137139
138140In text files the utf-8, ASCII or the local encoding is used - MSEide+MSEgui does not use utf-16 files.
139141
140142The MSEgui database components provide the conversion from the local encoding or the utf-8 (adjustable) to WideString for the data buffering. For file operations, a set of MSEgui's own functions with WideString interface exists. An MSEgui application can therefore work consistently with WideStrings, which is a significant relief for some tasks.
141143
142144Specialized data edit widgets for the basic data types (integer, real, tdatetime, ...) are available in MSEgui (`tintegeredit`, `trealedit`, `tdatetimeedit`, ...). The main event property of these widgets is `onsetvalue`, which can be used for reacting upon user input.
143145
144146The `t*edit` widgets can be inserted into a `twidgetgrid` and in that way form a column of the appropriate data format.
145147
146148For viewing and editing of data fields a `tdbwidgetgrid` togeather with a set of `tdb*editwidget`s can be used. Worth mentioning are also different lookup components and a `tlookupbuffer`, a fast associative data memory.
147149
148150The basic component of the MSEgui's database environment is `tmsebufdataset`, from which `tmsesqlquery` is derived. MSEgui DB is a fork of the FPC SQLDB system, where TBufDataset and large parts of TSQLQuery and the connection components have been completely rewritten.
149151
150152`tmsebufdataset` offers local indices, calculated and internalcalc-fields, a mode with an interrupted database connection, an in-memory mode where no database connectivity is necessary and can keep a local journal, in order to later reconect a previously disconnected database connection. `tmsebufdataset` stores texts as WideStrings of variable length.
151153
152154Further, there are SQL script components and `tsqlresult` for quick queries without the TDataset overhead. Persistent TField instances are either kept within `tmsesqlquery`, where they can be edited in the object inspector via `tmsesqlquery.controller.fields`, or they can be inserted into forms or modules as as individual components from the 'DBf' component palette.
153155
154156MSEide supports 'visual form inheritance', Submodule (Delphi TFrame equivalent) and allows the assignment of components of other forms or modules to component properties at design time.
155157
156158Internationalization is done via resource modules that are loadable at runtime. The MSEi18n, a tool that supports the import and export of texts in spreadsheet programs is available for editing - therefore facilitating a translation by nonprogrammers.
157159
158160<sup>1</sup>) This chapter is based on a translation of a German text provided by Martin Schreiber.
159161
160162# Tips: MSEide
161163
162164## Larger fonts
163165
164166Some may find the standard menu font a bit small. The standard font for the main menu of an MSEgui application is the font defined by the stf_menu stock font. You can change a stock font value with a startup parameter, \<fontheight\> is given in pixels.
165167
166-`--FONTALIAS=<alias>,<fontname>[,<fontheight>[,<fontwidth>[,<options>]]]`
168+```text
169+--FONTALIAS=<alias>,<fontname>[,<fontheight>[,<fontwidth>[,<options>]]]
170+```
167171
168172So if you start the mseide like this, you can get a larger menu font:
169173
170-` mseide --FONTALIAS=stf_menu,sans,16`
174+```text
175+ mseide --FONTALIAS=stf_menu,sans,16
176+```
171177
172178In order to increase the base font size for all stock fonts use
173179
174-` mseide --FONTALIAS=stf_default,,16`
180+```text
181+ mseide --FONTALIAS=stf_default,,16
182+```
175183
176184## Shortcuts
177185
178186Common
179187
180188- **Ctrl+F4** - Close
181189- **Ctrl+S** - Save
182190- **Ctrl+E** - Select page
183191- **F11** - Toggle Form/Inspector
184192- **F12** - Toggle Form/Unit
185193- **Shift+Ctrl+\[0..9\]** - Bookmark 0..9
186194- **Ctrl+\[0..9\]** - Go to bookmark 0..9
187195- **Ctrl+LeftClick** - Go to var(class, method, unit) declaration
188196- **Shift+Ctrl+Up** - Go to method declaration
189197- **Shift+Ctrl+Down** - Go to method implementation
190198- **Shift+Ctrl+Space** - Show procedure header
191199
192200Debug
193201
194202- **F7** - Step
195203- **F8** - Next
196204- **F9** - Continue
197205- **Shift+F7** - Finish
198206- **Shift+Ctrl+F8** - Next instruction
199207- **Shift+Ctrl+F7** - Step instruction
200208- **F5** - Toggle breakpoint
201209- **Shift+F5** - Toggle breakpoint enabled/disabled
202210- **Ctrl+B** - Breakpoints on/off
203211- **Ctrl+W** - Watches on/off
204212
205213Editor
206214
207215- **Ctrl+Z** - Undo
208216- **Ctrl+X** - Cut
209217- **Ctrl+C** - Copy
210218- **Ctrl+V** - Paste
211219- **Ctrl+F** - Find
212220- **F3** - Search again
213221- **Ctrl+L** - Go to line.
214222- **Ctrl+I** - Indent block
215223- **Ctrl+U** - Unindent
216224
217225## Print from IDE
218226
219227You need [Ghostscript](https://ghostscript.com/).
220228
221229## Recent opened files or projects
222230
223231The last opened projects are in the dropdown list of 'Project'-'Open'-'Name'. The last opened files are in the dropdown list of 'File'-'Open'-'Name'.
224232
225233## Menu Editing
226234
227235- Use submenu.count to set the wanted menu items count.
228236- Right click on submenu.count or on a menu item "Item X" to display a context-sensitive menu that allows to insert,append or delete a submenu entry
229237- Use drag and drop on a submenu entry to move the the item in the array.
230238
231239## New Panels in the IDE
232240
233241Example, you want to have the watch, stack and cpu window in a window:
234242
235243- select the menu item **View**-**Panels**-**New Panel**.
236244- select the menu item **View**-**Watches**.
237245- drag the Watches window by the grip (not the window title!) in the new panel.
238246- same with Stack and CPU window.
239247- to split horizontal drag one of the grip of the inserted widgets to the left border of the panel.
240248- to split vertical drag one of the grip of the inserted widgets to the bottom border of the panel.
241249- to use tabs drag one of the grip of the inserted widgets to the centre of the panel.
242250
243251## Design Tab-Order
244252
245253Main way in **MSEide** is set the tab order after all widgets are placed in the form with the popup menu function "Set Tab Order". Select a widget in the container where you wish to set the tab oder, click right, click "Set Tab Order", click row 0, click "Start", click the widget in the container which should get tab order 0, click the widget which should get tab order 1..
246254
247255An alternative is to drag and drop the rows to the desired position. The first row corresponds to the tab order 0 the second to the 1 and so on.
248256
249257### Creating a new event handler
250258
251259Select the event you want in the **Object Inspector**, then type name of the new event handler. IDE create a new procedure(declaration and implementation) in the source code. If you double-click the name of the event handler in the **Object Inspector**, source editor opens with the cursor at begin of your handler implementation.
252260
253261# Trucs et astuces
254262
255263## Contrôle à onglets
256264
257265- Déposez un contrôle **ttabwidget** sur la fiche. Vous avez alors un conteneur (*ttabwidget1*) pour vos pages.
258266- Déposez autant de contrôles **ttabpage** que vous le souhaitez sur *ttabwidget1*.
259267
260268## Séparateur
261269
262270Supposons que nous ayons deux widgets (widgetLeft, widgetRight) entre lesquels nous souhaitons un séparateur horizontal. (Le séparateur sera positionné à la verticale, mais la séparation sera horizontale, n'est-ce pas ?)
263271
264272- Ajoutez un TSplitter sur la fiche et donnez-lui la taille que vous souhaitez.
265273- Donnez à la propriété **linkleft** de *tsplitter1* la valeur **widgetLeft**, et à la propriété **linkright** la valeur **widgetRight**. Nos deux widgets sont désormais collés au séparateur.
266274- Donnez à la propriété **spo_hmove** la valeur **True**. C'est tout.
267275- Si vous souhaitez conserver une proportion entre la largeur de *widgetLeft* et celle de *widgetRight* lorsque la forme est redimensionnée, donnez à la propriété **so_hprop** la valeur **True**.
268276- Pour un séparateur vertical, utilisez les propriétés **linktop**, **linkbottom**, **spo_vmove**, **spo_vprop**.
269277
270278## Switch-off auto-scrolling of the form(widget)
271279
272280Change the **container - frame - sbhorz - options - sbo_showauto** property of the form to **False**.
273281
274282## Read/write data in the twidgetgrid
275283
276284- **editwidget.value** -\> value of the actual row
277285- **editwidget\[rowindex\]** or **editwidget.gridvalue\[rowindex\]** -\> value of the addressed row
278286- **editwidget.gridvalues** the whole column as a dynamic array.
279287
280288## First events
281289
282290**OnCreate** is called before loaded procedures of the components of the form are called, **OnLoaded** is called after loaded procedures of the components of the form are called. Many components do initializations in loaded procedures, event properties are inactive before procedure loaded of the component is called.
283291
284292## MDI
285293
286294MDI - application can be created using TDockFormWidget or TDockPanel (as MDI-area) and TDockForm (as ancestor for you MDI-child window). There are examples:
287295
288296- How to use TDockForm with custom MDI-buttons <http://brefi.narod.ru/mdi_example2.tar.gz> or in *\$MSESOURCES/contributed/ivankob/examples*
289297- Simple MDI-controller (create, switch, ... the child windows) <http://mihafpc.narod.ru/MDISample.tar.gz> or in *\$MSESOURCES/contributed/miha*
290298
291299## Drawing
292300
293301### Redraw form the additional thread
294302
295303Use a **tthreadcomp** (tab **Gui**) to do the long time procedure. If you need to access widgets and other gui variables from the additional thread, call **application.lock** before and **aplication.unlock** after accessing the main event thread elements.
296304
297305### Force repaint
298306
299307- **twidget.invalidate** to invalidate an individual widget
300308- **twidget.rootwidget.invalidate** to invalidate the window
301309- **application.invalidate** to invalidate all windows (=forms) in the application
302310
303311### Draw text
304312
305313There are two methods to draw texts in MSEgui:
306314
307315- Simple text positioning by baseline position of start of the first character with **tcanvas.drawstring**.
308316- With the drawtext procedures of **msedrawstring.pas**.
309317
310318### Widgets canvas
311319
312320No twidget has a canvas. The canvas used for painting is normally one of the canvas of twindow, it can also be an canvas of a tbitmap or a tprinter or... MSEgui uses one canvas to paint a whole window with all widgets. *tcanvas.font* is initialized by **twidget.getfont**, *canvas.color* by **twidget.actualcolor** before calling **twidget.dopaint**, see **twidget.paint** procedure in msegui.pas.
313321
314322### Theming (Frames & Faces)
315323
316324Every twidget has a property **frame** and **face**. If they are deactivated (\<disabled\> in object inspector) they are only an nil pointer and need no more resources. Activate them by clicking on the ellipse button in the right object inspector column in the row face respective frame.
317325
318326The **face** property defines the background of the client area of the widget.
319327
320328It is a combination of a fade and a bitmap. Both of them can be semitransparent. The bitmap can be stretched and/or tiled. Example: you want to create a button with a fade as face.
321329
322330- place a *tbutton* on the form.
323331- in object inspector activate property face.
324332- set *face.fade.color.count* to 2.
325333- click on the **+** at *color.count*.
326334- in item 0 select cl_gray.
327335- in item 1 select cl_ltgray, now you have a left to write fade from gray to light gray.
328336- change *face.fade.direction* to *gd_up* or *gd_down*, you get a convex resp. concave fade.
329337
330338If you want, you can blend an additional structure over the fade:
331339
332340- select the wanted pattern image in *face.image*.
333341- activate *face.image.alignment* al_tiled.
334342- adjust *face.image.transparency* to your needs, \$000000 = opaque, \$ffffff = fully transparent. The number defines the transparency of the three color channels (\$RRGGBB).
335343
336344To centralise the face look use an **tfacecomp** (tab *Gui*) and select the facecomp in *template* of the *face* properties.
337345
338346The **frame** property defines the look of an additional frame around the component and shows a possible caption at the widget. Example: you want an lowered frame around and a caption right of the button.
339347
340348- activate property *frame*.
341349- set *frame.levelo* to -1.
342350- set *frame.leveli* to 1.
343351- enter the caption text in *frame.caption*.
344352- set *frame.captionpos* to cp_right.
345353
346354To centralise the frame look use an **tframecomp** (tab *Gui*) and select the framecomp in *template* of the *frame* properties.
347355
348356### Desktop colors in the MSE application
349357
350358Default values of the mapped colors stored in the array **msegraphics.defaultmapped**. For change it's values you can use function **msegraphics.setcolormapvalue** [Win32 and KDE example](http://www.freepascal.org/wiki/index.php/User:Miha) (*\$MSESOURCES/contributed/miha/GuiStyle.pas*)
351359
352360# Application examples and screenshots
353361
354362## A Firebird application
355363
356364The following screen shots are taken from an MSEgui Firebird database application. The programmer writes he has customized the look and feel of his application in about 30 minutes with a tfacecomp and two tframecomp. He states that the look and feel is identical on Linux and Windows.
357365
358366![](/wiki-images/a/a7/Mse_dbwidgetgrid1.jpg)
359367
360368![](/wiki-images/e/ea/Mse_dbwidgetgrid2.jpg)
361369
362370Linux version: ![](/wiki-images/c/c0/Mse_form1.jpg)
363371
364372Windows version: ![](/wiki-images/8/8a/Mse_form1w.jpg)
365373
366374Linux version: ![](/wiki-images/a/ab/Mse_button1.jpg)
367375
368376Windows version: ![](/wiki-images/6/65/Mse_button1w.jpg)
369377
370378The report is designed and rendered with the built-in MSEide+MSEgui report designer and report generator.
371379
372380![](/wiki-images/2/2e/Mse_report1.jpg)
373381
374382Two MDI forms with fade and flat frame.
375383
376384![](/wiki-images/1/18/Mse_gripfade1.png)
377385
378386## An embedded system
379387
380388An embedded system for medical applications, in this case steam sterilizers, was realized with MSE-IDE & MSE-GUI for the control unit, nowadays also commonly called the "human machine interface", HMI.
381389
382390![](/wiki-images/d/d4/MainScreen.png)
383391
384392The control unit uses a touch panel a its display, therefore all active controls have to be made rather large to enable the personnel to handle them easily. The main screen consists of a few informational display fields and allows to select the implemented sterilizing processes by means of a menu consisting of several button components showing the process names along with a short description in a separate panel. The visibility of the buttons and their captions are defined during program loading by means of a configuration file. The informational fields display the devices' operating values in real time using a MSE system timer to collect the information from the PLC.\
385393
386394![Process Display](/wiki-images/2/2b/ProcessDisplay.png)
387395
388396After processing has been started, the display is switched to a different format showing the operating values in large digits on some numeric display field components on the left and a graphical representation of the process history on the right, again both as real time "live displays". If the diagram curves would reach the right panel border, the diagram would change to a scrolling mode, always showing the current state at the extreme right.\
389397
390398![State Display](/wiki-images/b/b2/StateDisplay.png)
391399
392400For diagnostic purposes, also a schematic state display is available. This shows a simplified schematic of the apparatus, along with real time animated symbols of the control elements, as there are valves and pumps, each displayed in a derived version of a timage component, created and placed dynamically on program load. Also shown are the most important process values as numerical displays, also dynamically placed. The schematic field really is the output of a separate program, running in parallel to the process display which provides the upper and lower parts of the screen display.\
393401
394402![Control Screen](/wiki-images/e/ec/ControlScreen.png)
395403
396404There is also a mode for setting several control and function parameters and to recall previous operational and diagnostic data. It is organised as a tabbed screen containing several run time parametrized menu pages and a couple of display field pages. Some of the pages allow access only after entering a pass code to prevent missuse of critical functions.\
397405
398406![Protocol Review](/wiki-images/a/aa/ProtocolReview.png)
399407
400408This is a screen displaying a graphical protocol of a previous process. The protocol is usually printed out immediately after termination, as required by the regulations. The printer output is generated as a postscript file, processed by ghostscript both for print out and for the on screen display shown, which uses the png format for loading into the display field.\
401409
402410![Attribution](/wiki-images/e/e0/Attribution.png)
403411
404412Of course, there is also an attribution display, showing program version, creator information and the tools used for the creation of the system, Free Pascal and MSE-IDE & MSE-GUI. As background, it uses a photography of one such apparatus as it is used in clinics displayed in an image component carrying several label fields used for the text. Above all of that sits a transparent button to close the picture.
405413
406414# Reference: MSEide
407415
408416- To move and resize components without gridsnap use shift+cursorkeys and ctrl+cursorkeys.
409417- There are many possibilities with properties twidget.frame and twidget.face, for instance tiled semitransparent bitmaps and color fades (all twidget descendants have these properties!).
410418
411419For client area of forms use tmseform.container.frame and tmseform.container.face, tmseform has additionally onpaint to do custom drawing.
412420
413421You can write your own widgets and override procedure dopaint or use teventwidget with onpaint,onresize,onmouseevent,onkeydown,onkeyup...
414422
415-`How to convert filenames to windows format? `\
416-`Unit msefileutils: `\
417-`function tosysfilepath(const path: filenamety): filenamety; `\
418-`procedure tosysfilepath1(var path: filenamety); `\
419-`Converts to filename format of actual OS. `\
420-`function tomsefilepath(const path: filenamety): filenamety; `\
421-`procedure tomsefilepath1(var path: filenamety); `\
422-`Converts from filename format of actual OS.`
423+``` pascal
424+How to convert filenames to windows format?
425+Unit msefileutils:
426+function tosysfilepath(const path: filenamety): filenamety;
427+procedure tosysfilepath1(var path: filenamety);
428+Converts to filename format of actual OS.
429+function tomsefilepath(const path: filenamety): filenamety;
430+procedure tomsefilepath1(var path: filenamety);
431+Converts from filename format of actual OS.
432+```
423433
424-`Where is the MDI ???   `\
425-`In MSEgui we have tdockform and tdockpanel for that purpose. `\
426-`Have a look at property dragdock.`
434+```text
435+Where is the MDI ???
436+In MSEgui we have tdockform and tdockpanel for that purpose.
437+Have a look at property dragdock.
438+```
427439
428440## MSEi18n
429441
430442# [[Reference: MSEgui]]
431443
432444[[Reference: MSEgui|On this page you can find a working in progress for documenting MSEGUI.]]
433445
434446# External links
435447
436448WARNING: MSE project is part now of mse-org: <https://github.com/mse-org>
437449
438450MSEide & MSEgui sources are here: <https://github.com/mse-org/mseide-msegui>
439451
440452Website: <http://mseide-msegui.sourceforge.net/>
441453
442454Community website: <http://www.msegui.com>
443455
444456Unofficial incomplete help pages started from Z505 at: <http://z505.com/cgi-bin/mse/idx.cgi?file=generalindex>
445457
446458Read the beginner's tutorial (in Russian) at: <http://freepascal.ru/article/mse/20060108181639/>
447459
448460Also: "MSEide+MSEgui. Draw lesson." (in Russian) <http://freepascal.ru/article/mse/20060205191314/>
449461
450462You can also find an English translation here: <http://www.geocities.com/yetanothergeek/mseide-tutorial-en/>
451463
452464This page in Russian: <http://freepascal.ru/wiki/index.php/MSEide%26MSEgui>
453465
454466MSElang, the future compiler for the MSEide+MSEgui project <https://gitlab.com/mseide-msegui/mselang/wikis/home>
455467
456468------------------------------------------------------------------------
457469
458470---
459471*From the Free Pascal wiki, page "MSEide+MSEgui/fr", as it stood on 2024-02-28 after a change by Roland57, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history