forum-msg-id-129402-edit

Original date:2016-02-12 02:13:08 Edited by: jmduro Subject: Re: LazGUI

jmduro said...

Some features need to be discussed:

  • which parameters needed ?

I answer myself. lazGUI server createButton routine can be easily converted to a generic routine createWidget that takes a list of parameters with name and value, so it can address the whole set of Lazarus widgets with a single routine. Every parameter name must have the exact name of the corresponding Lazarus widget property.

With a set of 3 simple methods, alls the GUI creation can be done: create_widget, modify_widget, destroy widget. This can be done by sending a sequence to the server in the following form

  • main_tag name
    • parameter value
    • parameter value
    • and so on
  • end_tag

where main_tag is create, modify or destroy, name is a class name for create and and instance name for modify or destroy (example: create TButton, modify btnOK, destroy btnOK). The sequence can be an XML sequence or whatever structured sequence.

All the help is already available in Lazarus documentation.

Widget names, defined by the server, shoud be built as Lazarus does: <classname><increment> (example: button1) and on the Euphoria client side there could be a correspondence table with more representative names (example: btnOK = Button1).

The Euphoria client could either listen on another TCP connection for event notifications or ask the server for notifications, or even both.

The driven GUI is a completely autonomous application, so functions to react on events should stay on the client side when not implicit reactions. Example: to show an info bullet when going over a widget, you just need to set the Hint parameter of the widget. Everything is done implicitly by Lazarus. But if you click on the widget, the client will get a notification and will have to react to update the serveur GUI if necessary.

The server can be built with whatever RAD that allows to dynamically create widgets but its widgets should be organized as classes, with properties. So instead of CodeTyphon/Lazarus, you could build it the same way with RealBasic, Gambas or some C-based RAD.

Jean-Marc

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu