Sign in Join
Wiki copytemporary

MSEide+MSEgui/es: what changed

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

OldNewLine
11# Introducción
22
33MSEide es un sistema de desarrollo gráfico (GUI) de plataforma cruzada orientado a programadores de Pascal. Está completamente escrito en Pascal. MSEgui no aporta compatibilidad con la librería de componentes visuales (VCL). La librería de gráficos aporta un interface con win32 y X11. Hay que tener en cuenta que es un proyecto fruto del esfuerzo en casi su totalidad de una persona (Martin Schreiber),
44
55El IDE y GUI tienen un listado de muy buenas características:
66
77- La codificación de caracteres es UCS2.
88- Incluye utilidades de internalización.
99- Docking forms.
1010- Embedded forms (similar to TFrame).
1111- Visual form inheritance.
1212- Enlaces a xlib y gdi32, no necesita de librerias de widgets externas.
1313- Componentes de acceso a bases de datos y widgets de edición de datos.
1414- Depuración integrada.
1515- Integrated report designer.
1616- Flexible and handy build system with switchable macros.
1717- y más...
1818
1919## Pero, ¿que acerca de Lazarus?
2020
2121[Lazarus](http://www.lazarus.freepascal.org) es un IDE que trata de aportar un alto grado de compatibilidad con código VCL, al tiemo que aporta un aspecto nativo en bastantes plataformas. La visualización nativa es muy importante para bastantes desarrolladores, pero combinada con la compatibilidad VCL hace necesarias interfaces complejas a los diferentes conjuntos de widgets nativos (GTK, Win32, Carbon, QT...). La continua evolución de este conjunto de widgets nativos (GTK1 -\> GTK2, Win32 -\> ?, , QT) conlleva un interminable conjunto de mantenimientos.
2222
2323[MSEide+MSEgui](http://sourceforge.net/projects/mseide-msegui/) neither features (or suffers :-) de compatibilidad VCL, no provee un aspecto nativo en las plataformas objetivo. La librería de gráficos provee un interface a Win32 y X11. La ventaja de la capa X11 es la inmediata disponibilidad de un largo y estable conjnto de plataformas a lo largo del tiempo.
2424
2525Estas diferentes finalidades de ambos proyecto hace que se adapten a las distintas necesidades de los programadores.
2626
2727## ¿Porqué esta wiki?
2828
2929El diseño de MSE GUI es una fresca aproximación a los patrones de diseño GUI. Aporta bastantes características innovadoras para tareas típicas de un inteface gráfico de usuario (GUI). Siendo innovador, la librería MSE GUI difiere sustancialmente de VCL/LCL/CLX. Pasar de VCL a MSE puede suponer mucho más cambio que cambiar desde [[Code Conversion Guide|VCL o LCL]]. Estas páginas de la wiki tratan de mostrar facilmente los primeros pasos con esta prometedora (IDE & GUI) librería alternativa.
3030
3131# Instalación
3232
3333- Versión actual: 4.6.2 (03/11/2108).
3434- Referencia autoritativa: [MSEide+MSEgui homepage](http://mseide-msegui.sourceforge.net/) con instrucciones de instalación.
3535- Página principal cooperativa homepage: [MSEide+MSEgui](http://www.msegui.com/)
3636- Descargas: [Sourceforge](http://sourceforge.net/projects/mseide-msegui/files/)
3737- Trabajo en progreso: [git](https://gitlab.com/mseide-msegui/mseide-msegui)
3838
3939# Quick start
4040
4141## Abriendo un proyecto
4242
4343Lanza el IDE y utiliza Project-\>Open para abrir la demo de msegui/apps/demo/demo.prj. El título del IDE refleja el proyecto que hemos abierto. Pulsa F9 y (si has seguido las instrucciones de instalación correctamente :-), disfruta de la velocidad de FPC+MSE.
4444
4545## First RAD steps
4646
4747Close the running project. Use Project-\>Source to open the project source demo.pas. Ctrl-click on the parameter mainfo in the line
4848
4949`application.createform(tmainfo,mainfo);`
5050
5151to navigate to main.pas. Click on F12 to toggle between unit and form. Not everything will feel that familiar, because of that, these pages are written. Click on the button, this will auto raise the property editor (unusual but usefull). Let us add another button. Make the component palette visible if necessary (View-\>Toolbar-\>Component Palette). Select the tbutton on the widget page. Click on the form to create the button. Give it a caption in the usual way. Creating an event handler does not work with the usual double clicking on the onexecute property. Instead, you must select the onexecute property in the property editor, type the name of an event handler and press enter. The MSE RAD will create the handler and position the pointer on the definition. Use ctrl-shift-down arrow (or up) to navigate between implementation and definition. Just add some code like writeln('Hello world'); Hit F9. The writeln will end up in the target console window of MSE (not the console in which you started MSE).
5252
5353## Adding a Main Menu
5454
5555### Add Main Menu
5656
5757Add a tmainmenu component from the Gui component tab to your main form. Click on your mainform (mainfo), so that Object Inspector shows the properties of the mainform. Use the arrow next to the mainmenu property of the mainform, to select tmainmenu1 as the mainmenu of mainfo.
5858
5959### Add Menu Items
6060
6161In the Object Inspector, expand the mainmenu branch. In this branch, open the menu property of mainmenu. Change the submenu.count of menu to 1 (or higher). Now expand the submenu.count property, which will show "Item 0". Expand "Item 0" and set the caption, for instance to "&File". Now you can repeat the same procedure one level deeper... Change the submenu.count property of "Item 0" to 1. Expand this last submenu.count property and set the caption of the new "Item 0", for instance to "E&xit". Hit F9 and your program should have a menu *F*ile with the entry E*x*it in it.
6262
6363Alternatively, in Object Inspector you may right click a submenu.count property, or an "Item n" property, which will reveal a context sensitive pop up menu. Use this pop up menu to insert, append or delete menu items.
6464
6565Once you have more than one submenu, you can use drag and drop to move the menu items ("Item n"). Start the drag mouse move on the "Item n" line.
6666
6767## Crear un nuevo proyecto
6868
6969Para crear un nuevo projecto basado en una plantilla utilizar Project -\> New \> From Template. Para un nuevo proyecto GUI seleccionar "default.prj", y para un proyecto de consola seleccionar "console.prj".
7070
7171# El concepto
7272
7373MSEgui es una librería de programa escrita en Pascal, aporta los bloques de construcción para el desarrollo de programas con interface gráfico de usuario.<sup>1</sup>
7474
7575MSEide es el correspondiente entorno de desarrollo integrado (IDE) para la producción efectiva con Free Pascal y MSEgui. MSEide es también apropiado para el desarrollo de aplicaciones con gcc y microcontroladores.
7676
7777Actualmente MSEide+MSEgui corre bajo i386-linux, x86-64-linux, arm-linux, x86-64-freebsd, i386-win32 y x86-64-win64 mientras que los microprocesadores soportados son CPU32, ARM and AVR32. MSEgui es predominantemente una plataforma independiente. Se pueden añadir plataformas adicionales implementando los elementos dependientes del sistema. Los módulos dependientes del sistema de MSEgui se encuentran ubicados en subdirectorios dentro de lib/common/kernel.
7878
7979## Principales finalidades del desarrollo
8080
8181- Una relevante incremento en la productividad. comparado con otros sistemas de desarrollo.
8282- Idéntica apariencia y funcionalidad en todas las plataformas, sin adimentos medibles en el código de usuario.
8383- La dependencia de librerias adicionales de mantiene al mínimo posible.
8484- Ortogonalidad - debería haber la mínima interferencia posible entre los diferentes elementos de programa y tan pocos como sea posible a nivel de escepciones y casos especiales.
8585- Elementos del interface gráfico de usuario (GUI) altamente parametrizados.
8686- Trabajando con MSEide+MSEgui debería ser agradable.
8787
8888## Architecture overview
8989
90-MSEgui <u>no requiere de librerias de componentes externas</u> - , se comunica directamente con el interface gráfico del sistema operativo. Con X11 a través de Xlib en Linux y con gdi32 bajo Windows.
90+MSEgui no requiere de librerias de componentes externas - , se comunica directamente con el interface gráfico del sistema operativo. Con X11 a través de Xlib en Linux y con gdi32 bajo Windows.
9191
92-Para los elementos individuales del GUI <u>no se necesitan recursos adicionales del sistema operativo</u> - únicamente las ventanas principales son conocidas pore el sistema operativo. El procesado completo de los eventos externos (teclado, ratón, control del foco, ...) tiene lugar dentro de MSEgui a nivel de Pascal.
92+Para los elementos individuales del GUI no se necesitan recursos adicionales del sistema operativo - únicamente las ventanas principales son conocidas pore el sistema operativo. El procesado completo de los eventos externos (teclado, ratón, control del foco, ...) tiene lugar dentro de MSEgui a nivel de Pascal.
9393
94-La clase base para los elementos del GUI es un <u>`twidget`</u>. No hay distinción entre elementos gráficos simples y los que puedan recibir el foco, como es el caso en Delphi. Todos los widgets de MSEgui tienen a su disposición la funcionalidad completa de un `twidget`.
94+La clase base para los elementos del GUI es un `twidget`. No hay distinción entre elementos gráficos simples y los que puedan recibir el foco, como es el caso en Delphi. Todos los widgets de MSEgui tienen a su disposición la funcionalidad completa de un `twidget`.
9595
9696Importantes característica de un `twidget` son: `twidget.frame` y `twidget.face`. Cuando no se utilizan frame o face se representan mediante un puntero NIL, de forma que no consuma recursos.
9797
98-<u>`twidget.frame`</u> es responsable del frame around del área de trabajo del elemento. La apariencia del frame es altamente ajustable - puede ser simle y rápidamente ser dibujable mediante un frame 3D, al tiempo que una compleja y lenta estructura basada en imágenes. Hay además otros elementos del frame que pueden construir barras de desplazamiento, pulsadores y etiquetas.
98+`twidget.frame` es responsable del frame around del área de trabajo del elemento. La apariencia del frame es altamente ajustable - puede ser simle y rápidamente ser dibujable mediante un frame 3D, al tiempo que una compleja y lenta estructura basada en imágenes. Hay además otros elementos del frame que pueden construir barras de desplazamiento, pulsadores y etiquetas.
9999
100-<u>`twidget.face`</u> dibuja el fondo del área de trabajo de un elemento del escritorio del GUI - de forma que se pueden mostrar gradientes de color e imágenes de maneras diferentes, mientras que se permite también una transparecia parcial.
100+`twidget.face` dibuja el fondo del área de trabajo de un elemento del escritorio del GUI - de forma que se pueden mostrar gradientes de color e imágenes de maneras diferentes, mientras que se permite también una transparecia parcial.
101101
102-Setting the properties of frame and face can be centralised by using <u>`tframecomp`</u> and <u>`tfacecomp`</u>, which can be selected into `tframe` and `tface` as templates.
102+Setting the properties of frame and face can be centralised by using `tframecomp` and `tfacecomp`, which can be selected into `tframe` and `tface` as templates.
103103
104-The next level of centralization is <u>`tskincontroller`</u>, 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.
104+The 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.
105105
106-<u>The control of the widget functions</u> (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.
106+The 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.
107107
108-The type <u>`msestring`</u> 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.
108+The 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.
109109
110110In text files the utf-8, ASCII or the local encoding is used - MSEide+MSEgui does not use utf-16 files.
111111
112-The <u>MSEgui database components</u> 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.
112+The 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.
113113
114-<u>Specialized data edit widgets</u> 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.
114+Specialized 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.
115115
116116The `t*edit` widgets can be inserted into a `twidgetgrid` and in that way form a column of the appropriate data format.
117117
118-For <u>viewing and editing of data fields</u> 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.
118+For 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.
119119
120-The basic component of the MSEgui's <u>database environment</u> 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.
120+The 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.
121121
122122`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.
123123
124-Further, there are <u>SQL script components</u> 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.
124+Further, 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.
125125
126-MSEide supports <u>'visual form inheritance'</u>, Submodule (Delphi TFrame equivalent) and allows the assignment of components of other forms or modules to component properties at design time.
126+MSEide 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.
127127
128-<u>Internationalization</u> 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.
128+Internationalization 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.
129129
130130<sup>1</sup>) This chapter is based on a translation of a German text provided by Martin Schreiber.
131131
132132# Tips: MSEide
133133
134134## Larger fonts
135135
136136Some 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.
137137
138138`--FONTALIAS=<alias>,<fontname>[,<fontheight>[,<fontwidth>[,<options>]]]`
139139
140140So if you start the mseide like this, you can get a larger menu font:
141141
142142` mseide --FONTALIAS=stf_menu,sans,16`
143143
144144In order to increase the base font size for all stock fonts use
145145
146146` mseide --FONTALIAS=stf_default,,16`
147147
148148## Shortcuts
149149
150150Common
151151
152152- **Ctrl+F4** - Close
153153- **Ctrl+S** - Save
154154- **Ctrl+E** - Select page
155155- **F11** - Toggle Form/Inspector
156156- **F12** - Toggle Form/Unit
157157- **Shift+Ctrl+\[0..9\]** - Bookmark 0..9
158158- **Ctrl+\[0..9\]** - Go to bookmark 0..9
159159- **Ctrl+LeftClick** - Go to var(class, method, unit) declaration
160160- **Shift+Ctrl+Up** - Go to method declaration
161161- **Shift+Ctrl+Down** - Go to method implementation
162162- **Shift+Ctrl+Space** - Show procedure header
163163
164164Debug
165165
166166- **F7** - Step
167167- **F8** - Next
168168- **F9** - Continue
169169- **Shift+F7** - Finish
170170- **Shift+Ctrl+F8** - Next instruction
171171- **Shift+Ctrl+F7** - Step instruction
172172- **F5** - Toggle breakpoint
173173- **Shift+F5** - Toggle breakpoint enabled/disabled
174174- **Ctrl+B** - Breakpoints on/off
175175- **Ctrl+W** - Watches on/off
176176
177177Editor
178178
179179- **Ctrl+Z** - Undo
180180- **Ctrl+X** - Cut
181181- **Ctrl+C** - Copy
182182- **Ctrl+V** - Paste
183183- **Ctrl+F** - Find
184184- **F3** - Search again
185185- **Ctrl+L** - Go to line.
186186- **Ctrl+I** - Indent block
187187- **Ctrl+U** - Unindent
188188
189189## Print from IDE
190190
191191You need the [ghostscript](http://ghostscript.com/awki)
192192
193193## Recent opened files or projects
194194
195195The 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'.
196196
197197## Menu Editing
198198
199199- Use submenu.count to set the wanted menu items count.
200200- 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
201201- Use drag and drop on a submenu entry to move the the item in the array.
202202
203203## New Panels in the IDE
204204
205205Example, you want to have the watch, stack and cpu window in a window:
206206
207207- select the menu item **View**-**Panels**-**New Panel**.
208208- select the menu item **View**-**Watches**.
209209- drag the Watches window by the grip (not the window title!) in the new panel.
210210- same with Stack and CPU window.
211211- to split horizontal drag one of the grip of the inserted widgets to the left border of the panel.
212212- to split vertical drag one of the grip of the inserted widgets to the bottom border of the panel.
213213- to use tabs drag one of the grip of the inserted widgets to the centre of the panel.
214214
215215## Design Tab-Order
216216
217217Main 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..
218218
219219An 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.
220220
221221### Creating a new event handler
222222
223223Select 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.
224224
225225# Tips: MSEgui
226226
227227## Tabbed control
228228
229229- Put **ttabwidget** control on the form. Now you have container (*ttabwidget1*) for pages.
230230- Put as many **ttabpage** controls on the *ttabwidget1* as tabs you want.
231231
232232## Splitter
233233
234234We have two widgets (widgetLeft, widgetRight) and we need horizontal splitter between them.
235235
236236- Add TSplitter to form and resize it as you want.
237237- Change the **linkleft** of *tsplitter1* to **widgetLeft** and **linkright** to **widgetRight**. At this step our widgets stick to splitter.
238238- Change the **spo_hmove** to **True**. That's all.
239239- If you want to save a proportion between width of *widgetLeft* and width of *widgetRight* when the main form is resized then change the **so_hprop** to **True**.
240240- If you need the vertical splitter then use other properties **linktop**, **linkbottom**, **spo_vmove**, **spo_vprop**.
241241
242242## Switch-off auto-scrolling of the form(widget)
243243
244244Change the **container - frame - sbhorz - options - sbo_showauto** property of the form to **False**.
245245
246246## Read/write data in the twidgetgrid
247247
248248- **editwidget.value** -\> value of the actual row
249249- **editwidget\[rowindex\]** or **editwidget.gridvalue\[rowindex\]** -\> value of the addressed row
250250- **editwidget.gridvalues** the whole column as a dynamic array.
251251
252252## First events
253253
254254**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.
255255
256256## MDI
257257
258258MDI - application can be created using TDockFormWidget or TDockPanel (as MDI-area) and TDockForm (as ancestor for you MDI-child window). There are examples:
259259
260260- How to use TDockForm with custom MDI-buttons <http://brefi.narod.ru/mdi_example2.tar.gz> or in *\$MSESOURCES/contributed/ivankob/examples*
261261- Simple MDI-controller (create, switch, ... the child windows) <http://mihafpc.narod.ru/MDISample.tar.gz> or in *\$MSESOURCES/contributed/miha*
262262
263263## Drawing
264264
265265### Redraw form the additional thread
266266
267267Use 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.
268268
269269### Force repaint
270270
271271- **twidget.invalidate** to invalidate an individual widget
272272- **twidget.rootwidget.invalidate** to invalidate the window
273273- **application.invalidate** to invalidate all windows (=forms) in the application
274274
275275### Draw text
276276
277277There are two methods to draw texts in MSEgui:
278278
279279- Simple text positioning by baseline position of start of the first character with **tcanvas.drawstring**.
280280- With the drawtext procedures of **msedrawstring.pas**.
281281
282282### Widgets canvas
283283
284284No 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.
285285
286286### Theming (Frames & Faces)
287287
288288Every 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.
289289
290290The **face** property defines the background of the client area of the widget.
291291
292292It 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.
293293
294294- place a *tbutton* on the form.
295295- in object inspector activate property face.
296296- set *face.fade.color.count* to 2.
297297- click on the **+** at *color.count*.
298298- in item 0 select cl_gray.
299299- in item 1 select cl_ltgray, now you have a left to write fade from gray to light gray.
300300- change *face.fade.direction* to *gd_up* or *gd_down*, you get a convex resp. concave fade.
301301
302302If you want, you can blend an additional structure over the fade:
303303
304304- select the wanted pattern image in *face.image*.
305305- activate *face.image.alignment* al_tiled.
306306- adjust *face.image.transparency* to your needs, \$000000 = opaque, \$ffffff = fully transparent. The number defines the transparency of the three color channels (\$RRGGBB).
307307
308308To centralise the face look use an **tfacecomp** (tab *Gui*) and select the facecomp in *template* of the *face* properties.
309309
310310The **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.
311311
312312- activate property *frame*.
313313- set *frame.levelo* to -1.
314314- set *frame.leveli* to 1.
315315- enter the caption text in *frame.caption*.
316316- set *frame.captionpos* to cp_right.
317317
318318To centralise the frame look use an **tframecomp** (tab *Gui*) and select the framecomp in *template* of the *frame* properties.
319319
320320### Desktop colors in the MSE application
321321
322322Default 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*)
323323
324324# Aplicaciones de ejemplo y pantallazos
325325
326326## Una aplicación utilizando Firebird
327327
328328Los siguientes pantallazos se han tomado desde una aplicación de bases de datos con Firebird que utiliza MSEgui. El programador indica que ha personalizado el aspecto y comportamiento de su aplicación en unos 30 minutos utilizando un tfacecomp y dos tframecomp y ha constatado que el aspecto y comportamiento es idéntico tanto en Linux como en Windows.
329329
330-<figure>
331-<img src="mse_dbwidgetgrid2.jpg" title="mse_dbwidgetgrid2.jpg" />
332-<figcaption>mse_dbwidgetgrid2.jpg</figcaption>
333-</figure>
330+![](/wiki-images/e/ea/Mse_dbwidgetgrid2.jpg)
334331
335332Versión utilizando Linux: ![](/wiki-images/c/c0/Mse_form1.jpg)
336333
337334Versión utilizando Windows: ![](/wiki-images/8/8a/Mse_form1w.jpg)
338335
339336Versión utilizando Linux: ![](/wiki-images/a/ab/Mse_button1.jpg)
340337
341338Versión utilizando Windows: ![](/wiki-images/6/65/Mse_button1w.jpg)
342339
343340El reporte ha sido diseñado y renderizado con el diseñador y generador de reportes del MSEide+MSEgui embebido.
344341
345-<figure>
346-<img src="mse_report1.jpg" title="mse_report1.jpg" />
347-<figcaption>mse_report1.jpg</figcaption>
348-</figure>
342+![](/wiki-images/2/2e/Mse_report1.jpg)
349343
350344Dos forumularios MDI con frame fade y flat.
351345
352-<figure>
353-<img src="mse_gripfade1.png" title="mse_gripfade1.png" />
354-<figcaption>mse_gripfade1.png</figcaption>
355-</figure>
346+![](/wiki-images/1/18/Mse_gripfade1.png)
356347
357348## Un sistema embebido
358349
359350Un sistema embebido para aplicaciones médicas, en este caso esterilizadores steam, fue realizado con MSE-IDE & MSE-GUI con la unidad de conrol, nowadays además comunmente llamado "human machine interface", HMI.
360351
361-<figure>
362-<img src="MainScreen.png" title="Main Screen" />
363-<figcaption>Main Screen</figcaption>
364-</figure>
352+![](/wiki-images/d/d4/MainScreen.png)
365353
366354La unidad de control utiliza un panel táctil como display, por lo que todos los controles activos necesitan ser suficientemente largos para que el personal pueda manejarlos a mano facilmente. La pantalla principal consiste de unos pocos campos informativos que permiten seleccionar los procesos de esterilizado por meido de un menú consistente en varios componentes pulsadores con sus correspondientes nombres descriptivos junto con una breve descripción de su funcionalidad en un panel separado. La visibilidad de los pulsadores y sus captions se definen durante la carga del programa mediante un fichero de configuración. Los campos informativos muestran los valores de operación de los dispositivos en tiempo real utilizando un timer de sistema MSE para recolectar la información desde un PLC.
367355
368-\
369-\
370356![Process Display](/wiki-images/2/2b/ProcessDisplay.png)
371357
372358After 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.\
373-\
359+
374360![State Display](/wiki-images/b/b2/StateDisplay.png)
375361
376362For 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.\
377-\
363+
378364![Control Screen](/wiki-images/e/ec/ControlScreen.png)
379365
380366There 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.\
381-\
367+
382368![Protocol Review](/wiki-images/a/aa/ProtocolReview.png)
383369
384370This 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.\
385-\
371+
386372![Attribution](/wiki-images/e/e0/Attribution.png)
387373
388374Of 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.
389375
390376# Reference: MSEide
391377
392378- To move and resize components without gridsnap use shift+cursorkeys and ctrl+cursorkeys.
393379- 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!).
394380
395381For client area of forms use tmseform.container.frame and tmseform.container.face, tmseform has additionally onpaint to do custom drawing.
396382
397383You can write your own widgets and override procedure dopaint or use teventwidget with onpaint,onresize,onmouseevent,onkeydown,onkeyup...
398384
399385`How to convert filenames to windows format? `\
400386`Unit msefileutils: `\
401387`function tosysfilepath(const path: filenamety): filenamety; `\
402388`procedure tosysfilepath1(var path: filenamety); `\
403389`Converts to filename format of actual OS. `\
404390`function tomsefilepath(const path: filenamety): filenamety; `\
405391`procedure tomsefilepath1(var path: filenamety); `\
406392`Converts from filename format of actual OS.`
407393
408394`Where is the MDI ???   `\
409395`In MSEgui we have tdockform and tdockpanel for that purpose. `\
410396`Have a look at property dragdock.`
411397
412398## MSEi18n
413399
414400# [[Reference: MSEgui]]
415401
416402[[Reference: MSEgui|On this page you can find a working in progress for documenting MSEGUI.]]
417403
418404# External links
419405
420406Website: <http://mseide-msegui.sourceforge.net/>
421407
422408Community website: <http://www.msegui.com>
423409
424410Unofficial incomplete help pages started from Z505 at: <http://z505.com/cgi-bin/mse/idx.cgi?file=generalindex>
425411
426412Read the beginner's tutorial (in Russian) at: <http://freepascal.ru/article/mse/20060108181639/>
427413
428414Also: "MSEide+MSEgui. Draw lesson." (in Russian) <http://freepascal.ru/article/mse/20060205191314/>
429415
430416You can also find an English translation here: <http://www.geocities.com/yetanothergeek/mseide-tutorial-en/>
431417
432418This page in Russian: <http://freepascal.ru/wiki/index.php/MSEide%26MSEgui>
433419
434420MSElang, the future compiler for the MSEide+MSEgui project <https://gitlab.com/mseide-msegui/mselang/wikis/home>
435421
436422------------------------------------------------------------------------
437423
438424---
439425*From the Free Pascal wiki, page "MSEide+MSEgui/es", as it stood on 2020-04-20 after a change by FTurtle, 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