Oberon Community Platform Forum
December 14, 2019, 05:28:23 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: GUI Builder project  (Read 12815 times)
BohdanT
Sr. Member
****
Posts: 271


Life is difficult, but fortunately is short!


WWW
« on: October 01, 2008, 03:18:48 PM »

Well, I have produced.
I look forward to the views, advice and suggestions

http://a2os.org.ua/FormDesigner/FormDesigner.html
Logged
staubesv
Administrator
Sr. Member
*****
Posts: 387



« Reply #1 on: October 01, 2008, 04:03:57 PM »

Cool!!!  Cheesy

Suggestion:
Going via WMWindowManager, it is possible to get a list of all windows (example: WMNavigate.Mod). You can check which of the windows are of the type WMComponents.FormWindow and this way, you can get access to the components of currently open windows.  Your property editing facility could then be used to show/edit the properties of running applications . Theoretically, it would possible to insert components into running applications, but the issue "persistency" needs to be solved to make that useful.
Logged
soren renner
Global Moderator
Full Member
*****
Posts: 216



« Reply #2 on: October 01, 2008, 04:08:30 PM »

I want it! Bohdan, you are the mango! You have, as you say, produced.

Logged
BohdanT
Sr. Member
****
Posts: 271


Life is difficult, but fortunately is short!


WWW
« Reply #3 on: October 01, 2008, 04:47:48 PM »

I'm need to finish a few things. The first appointment handlers events.

Sources are now in a terrible state. (Please do not download them, I would be ashamed of them. I will remake 20 times. Now they are simply unusable condition)
On this, I overlaid video, rather than source code.

Please wait a little bit.
Logged
staubesv
Administrator
Sr. Member
*****
Posts: 387



« Reply #4 on: October 01, 2008, 04:50:30 PM »

Would also be cool if you could make a project page...
Logged
BohdanT
Sr. Member
****
Posts: 271


Life is difficult, but fortunately is short!


WWW
« Reply #5 on: October 01, 2008, 05:01:55 PM »

Quote
Would also be cool if you could make a project page...
   
Please look my Profile.

Page in Russian in order to promote the A2. For English-speaking users running automatic translator from Google
Logged
Pat
Jr. Member
**
Posts: 69


« Reply #6 on: October 04, 2008, 04:33:35 PM »

Congratulations - a great achievement !

We would like to have it in the release as soon as possible/as soon as cleaned up.
BTW: It would be nice to have it producing an XML description of the component, and also to have the ability of opening such XMLs and modifying it interactively.

Greetings
Pat
Logged
BohdanT
Sr. Member
****
Posts: 271


Life is difficult, but fortunately is short!


WWW
« Reply #7 on: October 04, 2008, 07:47:37 PM »

Quote
Congratulations - a great achievement !
Thanks, but until this is not achievement,  this is only effort Wink

Quote
We would like to have it in the release as soon as possible/as soon as cleaned up.
I think that the cleanup will take week (if will not be strong busy on the work), because I studied Aos through this project, sources in very poor condition;)

Quote
It would be nice to have it producing an XML description of the component, and also to have the ability of opening such XMLs and modifying it interactively.
   
What exactly do you mean, explain more, please?
    
If you mean the saving of editing components in the file, but now it is well done. All that is stored in XML (see example below). The standard way to saving not get (or rather load the stored form, with such components as Scrollbar. All the more that I need to be maintained even eventhandlers).
Code:
<Component>
<Panel>
<Properties>
<Bounds>
<Left>0</Left>
<Top>0</Top>
<Width>800</Width>
<Height>600</Height>
</Bounds>
</Properties>
</Panel><Component>
<Label>
<Properties>
<Bounds>
<Left>90</Left>
<Top>99</Top>
<Width>100</Width>
<Height>100</Height>
</Bounds>
<Caption>label1</Caption>
</Properties>
</Label></Component>

<Component>
<Label>
<Properties>
<Bounds>
<Left>90</Left>
<Top>210</Top>
<Width>100</Width>
<Height>100</Height>
</Bounds>
<Caption>label2</Caption>
</Properties>
</Label></Component>
<Component>
<Panel>
<Properties>
<Bounds>
<Left>199</Left>
<Top>142</Top>
<Width>302</Width>
<Height>285</Height>
</Bounds>
<FillColor>-1D1D1D01</FillColor>
</Properties>
</Panel><Component>
<Scrollbar>
<Properties>
<Bounds>
<Left>273</Left>
<Top>0</Top>
<Width>29</Width>
<Height>285</Height>
</Bounds>
<Alignment>3</Alignment>
<TakesFocus>false</TakesFocus>
<Pos>0</Pos>
</Properties>
</Scrollbar></Component>
</Component></Component>
   
If you mean, description of components plug-in repository, I just want it well done.    
I think display components in the form of two level tree.  Also I'm able to add "properties by default" for each component, and icons for each component will be stored in the archive. Here is a sample description:
Code:
<Repository>
<Package name="Standart">
<key c="Panel" m="WMStandardComponents"/>
<key c="Label" m="WMStandardComponents">
<Properties>
<Caption>Label</Caption>
</Properties>
</key>
<key c="Button" m="WMStandardComponents"/>
<key c="Scrollbar" m="WMStandardComponents"/>
<key c="Resizer" m="WMStandardComponents"/>
<key c="Checkbox" m="WMStandardComponents"/>
<key c="GroupPanel" m="WMStandardComponents"/>
<key c="ImagePanel" m="WMStandardComponents"/>
</Package>
<Package name="Additional">
<key c="AClockComponent" m="WMAClock"/>
<key c="Calendar" m="WMCalendar"/>
</Package>
</Repository>
« Last Edit: October 04, 2008, 07:58:55 PM by BohdanT » Logged
Pat
Jr. Member
**
Posts: 69


« Reply #8 on: October 05, 2008, 01:06:23 PM »

Have you ever had a look at the  "Layla" layout language - it may offer some inspiration for your project.
Layla is a compact layout definition language allowing to define, store and rebuild GUIs in a consistent manner, including references to handlers etc.
It would probably very well fit to your project.

To find it:
from the Oberon "gray box" ( A2 -> Tools -> Oberon)
paste and activate the following command:

LayLaDemo.Insert
   (TABLE Panel (border=8 cols=3 grid=DYNAMIC)
      (NEW Button (ATTR Caption = "1"))
      (SPAN 2 1 (NEW Button (w=[1] h=[1]) (ATTR Caption = "2")))
      (NEW Button  (ATTR Caption = "3"))
      (NEW Button  (ATTR Caption = "4"))
      (NEW Button  (ATTR Caption = "5"))
      (BREAK (HLIST Panel (h=60 w=[] border=3)
         (NEW Caption (vjustifyMe=CENTER) (ATTR Value="Zwischentitel 2"))
         (NEW Button (hjustifyMe=RIGHT) (ATTR Caption="Press"))
      ))   
      (NEW Button  (ATTR Caption = "6"))
      (NEW Button  (ATTR Caption = "7"))
   )

Then, from the gray box, have a look at the files and the documentation:
Layla.Tool
LayLa.QuickGuide.Text
LayLa.Guide.Eng.Text
and other Layla* files
and also at
Layout.Tool
Logged
BohdanT
Sr. Member
****
Posts: 271


Life is difficult, but fortunately is short!


WWW
« Reply #9 on: October 05, 2008, 07:50:24 PM »

Thank you, I know about this project (http://matthias.sala.ch/kulula Thanks Neuf).
Indeed it may include support. But there are some issues, but now it is too early to discuss.

However, I want to quote your words:
"also to have the ability of opening such XMLs and modifying it interactively"
You never comment on what you had in mind;)
Logged
Pat
Jr. Member
**
Posts: 69


« Reply #10 on: October 05, 2008, 09:17:52 PM »

I am a strong adherent of the Model-Viewer-Controller paradigm ( as earlier implemented in an exemplary fashion in the Gadgets ).
Abstract models of data should be clearly separated from GUIs.
A2 offers the necessary mechanisms to do this in principle: e.g. the system menu's structure can be stored as XML ( Menu.XML ), and the A2 skin description language is a, although somewhat isolated, proof of concept of this separability of model, view and controller.
In contrast, many of the current components are hardcoded as an entity, making reuse of their parts impractical.
Look, for example, at WMDiagramComponents.Mod :
A graph consists in principle of a Data Model and a GUI. The GUI consists of a hierarchical group containing a graph area, a number of multisegment-lines, a number of axes, and a number of text designators.
These elements are very basic in principle and could be reused for whatever, if they would exist as basic building blocks.
The hardcoding as computer source code renders this impractical, so that for another application, rendering lines, backgrounds and graph areas is somehow duplicated, although not in an identical fashion, in the code base of other modules. Just a GUI element "curve" parametrized by a model consisting of number of datapoints, or a model function, does not exist as an independent GUI element, altough this is needed in so many diverse contexts (see BasicFigures.Mod for the separable approach in Gadgets).
Thus, instead of instantaniating a new Diagram using a call to module WMDiagramComponents, such a diagram or one of your GUIs might be composable by "drag and drop" or by using a compact "layout language" desciption, or by using a much more compact program module, or by loading a hierarchical structured xml file for the GUI.
You are very near to that in your effort.
Greetings
Pat

BTW: Your link is interesting, but the  Layla Layout description language and its embedding in the gadgets concept is really worth looking at (see Book.Tool in the gray oberon box).
Logged
BohdanT
Sr. Member
****
Posts: 271


Life is difficult, but fortunately is short!


WWW
« Reply #11 on: October 06, 2008, 10:28:57 AM »

You do not understand my problem with Event-Handlers. There is no problem to generate the code. The problem is that you need to install high-quality relationship with PET. Ie to hint users at an available Handler, adding new Handler in the edited code. Etc. etc.

My question for the LayLa:
Tell me why LayLa better than XML (apparently this twin-brothers)?

For XML I see first advantage: of the entire system is built on connection with XML. The second: user does not need to learn a new syntax, XML is well known.

What advantages of LayLa??
« Last Edit: October 06, 2008, 10:56:34 AM by BohdanT » Logged
danp
Newbie
*
Posts: 37


« Reply #12 on: October 06, 2008, 08:35:05 PM »

Hi Bohdan,

Very nice job. I have a similar application, but more data input then gadgets oriented. There is a functional events handler system implemented, with the same principle as yours. Give it a look, and if you find something interesting for your project I can share sources or some hints. I attach here a small tutorial, and if you want to see the framework at work you have to:

Download the Windows client Brumba_12-05-07 from
http://ftp://81.208.36.220
user: public
password: user

At the login page fill in:
Application: 85.18.123.96/Dan
Database: DanDb
User: public
Password: user

Choose Clienti from the menu (this is a multi form PAGE), or Hotline (single FORM) to see how it look like. Then Setup / IDE to enter the development environment. Open FORMS / Hotline and click Events upper button. You will see two form events handlers onOpen and onNewAfter.
You can see the available events for an object by opening the events panel (Events button on left group) and the clinking on the form space or fields. The same for Properties.

Dan

* BrumbaTutorial.7z (369.35 KB - downloaded 416 times.)
Logged
BohdanT
Sr. Member
****
Posts: 271


Life is difficult, but fortunately is short!


WWW
« Reply #13 on: October 07, 2008, 07:27:36 AM »

Hi danp!
   
E realizzare un grande progetto! Colossali! Bravo!
I was very impressed!

With the best regards,
Bohdan
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!