Crowdsourced GUI. Open beta testing. - page 16

 
Nikolai Semko:

I still don't understand. For an indicator or EA to work with your gui, does something else (kernel, engine, etc.) have to be running in parallel?

Not anymore. The engine is an open inclusive file. It's connected as shown in the illustration in the previous post. Look carefully again.

#include<GUI_DRIVE.mqh>
Документация по MQL5: Файловые операции / FileOpen
Документация по MQL5: Файловые операции / FileOpen
  • www.mql5.com
[in]  Имя открываемого файла, может содержать подпапки. Если файл открывается для записи, то указанные подпапки будут созданы в случае их отсутствия. [in]  значение, используемое в качестве разделителя в txt или csv-файле. Если для csv-файла разделитель не указан, то по умолчанию используется символ табуляции. Если для txt-файла разделитель не...
 

Реter Konow
:

Not anymore. The engine is an open inclusive file. Connected as shown in the illustration in the previous post. Look carefully again.

Ok then.
But how do I read and/or change some element in the first interface window from my program? What does it look like?
In my example it looks like this

if (myGUI.win[0].ChecBox[2].isCheck())   myGUI.win[1].TextLabel[5].text  =  DoubleToString(rates[0].close,_Digits);

 
Nikolai Semko:

OK, then.
But how do I read and/or change some element in the first interface window from my program? What does it look like?
In my example it looks like this


Simpler. All functions of the controls are automatically named and printed to the api file. Need to get or change a checkbox? You start writing its name and intellisense gives you a list of your checkboxes with similar names:

This is where you write the reactions:

//=====================================================================================================================
//WINDOW:   Menu | element: CHECKBOX  | name: Simple checkbox  |  Location: Window's Main Frame
//=====================================================================================================================
case CHECKBOX3___Simple_checkbox:
               //------------------------------------------------------------------------------------------------------
               //What to do when checkbox checked or unchecked?
               //------------------------------------------------------------------------------------------------------
               switch((int)action)
               {
                case checked:     break;
  
                case unchecked:     break;
               }
               //------------------------------------------------------------------------------------------------------
               //Your comment:
               //------------------------------------------------------------------------------------------------------
               break;
  
//=====================================================================================================================


And here's his challenge:

E_Menu_Simple_checkbox(); 

It starts with prefix E_, then window name and item name. Intellisense will take care of it. You don't need to remember everything.

 
Nikolai Semko:

OK, then.
But how can I read and/or change an element in the first interface window from my program? What does it look like?
In my example it looks like this


The graphical constructor can create defines, for example:

#define  close_prise_of_last_bar myGUI.win[1].TextLabel[5].text
#define  show_last_price myGUI.win[0].ChecBox[2].isCheck()

and then you can make the code even more readable:

if (show_last_price)  close_prise_of_last_bar  =  DoubleToString(rates[0].close,_Digits);
 
Nikolai Semko:

The graphical constructor can create defines, for example:

and then you can make the code even more readable:

All of this has been around for a long time. It's been tested for a year now.

 
Реter Konow:

Simpler. All control functions are automatically named and printed to the api file. Need to get or change a checkbox? You start writing its name and intellisense gives you a selection of your checkboxes with similar names:

This is where you write the reactions:


And here's his challenge:

It starts with prefix E_, then window name and item name. Intellisense will take care of it. You don't need to remember everything.

don't understand

 
Nikolai Semko:

I don't get it.

You plug in three files and you have full ownership of all the gui created in the editor. It couldn't be simpler.

 
Is it possible to create graphic elements by code?
 
Aliaksandr Hryshyn:
Is it possible to create graphic elements by code?
That doesn't make sense. If only by code of the markup language. An editor is the easiest option.
 
Реter Konow:
This makes no sense. If only in the code of the markup language. The editor is the simplest option.

see how state-less gui works (google it) .

if (Button("hello world!")) {

printf("fck u self");

}

it draws and reacts to the button at the same time

Reason: