Discussion of article "Graphical Interfaces XI: Refactoring the Library code (build 14.1)"

 

New article Graphical Interfaces XI: Refactoring the Library code (build 14.1) has been published:

As the library grows, its code must be optimized again in order to reduce its size. The version of the library described in this article has become even more object-oriented. This made the code easier to learn. A detailed description of the latest changes will allow the readers to develop the library independently based on their own needs.

An MQL application has been implemented for testing purposes. Its graphical interface contains all the controls of the library to allow you to see how all of that works. This is how it looks like: 

Fig. 12. Graphical interface of the test MQL application.

Author: Anatoli Kazharski

 

Thanks Anatoly!
I was looking forward to this update.
Incredible work!
Many thanks to you and MetaQuotes Software Corp.


 

I understand the user interface of the library has changed?

 

Excellent Work!

I was waiting for a very long time for an update like this.

Someone need to translate it ASAP!

 
Konstantin:

I take it the user interface of the library has changed?

There will be another article from this update (14.2). Wait for it to be published. All changes and additions are described in detail.
 
Anatoli Kazharski:
There will be another article from this update (14.2). Wait for it to be published. All changes and additions are detailed.

Very much waiting :) The changes are tremendous, but unfortunately not all for the better....

Well, or so far poorly sorted out. Wait, read, understand :)

 
Oleksii Chepurnyi:

...

The changes are tremendous, but unfortunately not all for the better.....

Like what?
 
Anatoli Kazharski:
Like what?

In order of importance :)

1. SpinEdit, which is now CTextEdit. Previously we clicked in the input field, selected text, typed a new value, enter enter. Now we click, just put the cursor, the mouse is not highlighted in any way, and does not respond to the numeric keyboard. Well, String instead of Double, I don't even know whether it's good or bad.... Let's redo it - let's see :)

2. ComboBox. I use a small drop-down list, I don't need a scroll bar. I managed to remove it only by increasing the height of the list, somewhere at the height of one item in the list.

3. Redrawing at reinitialisation has grown a lot. One small window (~25 items) disappears for ~200ms when changing the TF. It used to be almost imperceptible.

PS Intuitively I would like to minimise/unmap the window with a double click :) Maybe it is implemented in the library, I just haven't found it?

 
Oleksii Chepurnyi:

...

1. SpinEdit, which is now CTextEdit. Previously we clicked in the input field, selected the text, typed a new value, enter enter. Now we click, the cursor is just placed, the mouse is not highlighted in any way, and it does not respond to the numeric keyboard. Well, String instead of Double, I don't even know whether it's good or bad.... Let's redo it - let's see :)

2. ComboBox. I use a small drop-down list, I don't need a scroll bar. I managed to remove it only by increasing the height of the list, somewhere at the height of one item in the list.

3. Redrawing at reinitialisation has grown a lot. One small window (~25 items) disappears for ~200ms when changing the TF. This used to be almost imperceptible.

...

Ok, I'll take a look.

Oleksii Chepurnyi:

...

PS I intuitively want to minimise/unmount the window with a double click :) Maybe it is implemented in the library, I just haven't found it?


Not yet.

 

Code compression, universalisation of classes and a qualitative step forward in technology. I finally see it. Good.


At this stage, as I understood from the article, almost all basic element objects have acquired bitmap type, and only constituent parts of elements are drawn, i.e. pictures, texts and rectangles.


The first technical obstacle to switching to full drawing is that OnChartEvent() does not capture the event of clicking on a fully drawn object.

The second one is that you can't set the Zorder property for a drawn object (I think you've found a solution here).


Then, there are many more difficulties...


Question: why do you need to overcome them, if, judging by the result, you have an excellent GUI as it is. What is the practical sense of further transformations?

 
Реter Konow:

Code compression, universalisation of classes and a qualitative step forward in technology. I finally see it. Good.


At this stage, as I understood from the article, almost all basic element objects have acquired bitmap type, and only constituent parts of elements are drawn, i.e. pictures, texts and rectangles.


The first technical obstacle to switching to full drawing is that OnChartEvent() does not capture the event of clicking on a fully drawn object.

The second one is that you can't set the Zorder property for a drawn object (I think you've found a solution here).


Then, there are many more difficulties...


Question: why do you need to overcome them, if, judging by the result, you have an excellent GUI as it is. What is the practical sense of further transformations?

Peter, these "problems" can be solved in 1 day. I once did it by switching from an interface built on graphical objects to an interface completely drawn on 1 bitmap.