Libraries: EasyAndFastGUI library for creating graphical interfaces - page 15

 
Anatoli Kazharski #:

@Samuel Bandi Roccatello

Hi!

I will be dealing with this issue soon. Most likely, I need to revise the approach in the Resources.mqh file.

I've been playing with the EAF library the last couple of days and while studying the CResources class, its design didn't seem ideal to me -- I think the resource image data (and methods) should be declared as static to have reduce memory footprint by having a single instance of the images. Alternatively, the CResources instance in CImage class (see Objects.mqh), could be made static to avoid duplicating resources in memory, as it is unlikely that more than one set of resources will be needed in the same application.

class CImage
  {
protected:
   static CResources  m_resources;
   //...
  }
 
Hi,

Unfortunately, version 2.15 is no longer available via the Market.
Is there any other way to get the current version (preferably with the example)?

Thank you very much!
 
cabanossi #:
Hi,

Unfortunately, version 2.15 is no longer available via the Market.
Is there any other way to get the current version (preferably with the example)?

Thank you very much!

Hello, I join the question. I am also looking to get version 2.00 or older with examples. Thank you.

 
Good day 

I need help. 
How do I get the value of the date from drop calendar. 

   CDropCalendar     m_dateExpire;
//---
/---
//---GUI reate
   if(!CWndCreate::CreateDropCalendar(m_dateExpire, "", m_window, 0, 7, 200, 93, TimeCurrent()))
      return(false);


datetime CProgram::GetExpireDate()//THis is the Function I want to fix 
{
 datetime monthdate = m_dateExpire.???;
 printf("Time: %s",TimeToString(monthdate));
return monthdate;
}
 
Jefferson Judge Metha #:
Good day 

I need help. 
How do I get the value of the date from drop calendar. 

Found it 

   datetime monthdate =(datetime)m_dateExpire.GetTextEditPointer().GetValue();
 

Seems between 2016 to 2019, you stopped bordering with Rounded buttons as seen in  Graphical Interfaces X: Updates for Easy And Fast Library (Build 2) - MQL5 Articles.

I'm comparing the CButton from that time to the most recent version to learn what changed. It would have been awesome if this is the default or if it has its own CRoundedButton as seen below.

Fig. 1. Sample graphical interface with the default color scheme against the light background


Sincerely, it is really easier to work with this library than the native CCharts.

Kudos

Graphical Interfaces X: Updates for Easy And Fast Library (Build 2)
Graphical Interfaces X: Updates for Easy And Fast Library (Build 2)
  • www.mql5.com
Since the publication of the previous article in the series, Easy And Fast library has received some new features. The library structure and code have been partially optimized slightly reducing CPU load. Some recurring methods in many control classes have been moved to the CElement base class.
 

Hello Anatoli,

while trying something like Ctrl-Click on the Table I stumbled over the CMouse-Code:

This line seems not enough to get the left mouse button (see MQL help for CHARTEVENT_MOUSE_MOVE) :

      bool m_left_button_state =(bool)int(sparam);


As I tried with a short program it shows the variable m_left_button_state will be true for all int(sparam) >0.

Therefore the right mouse button and even the special keys Ctrl and Shift make this var = true.

It should be a bittest for 1. Like I did it for the Ctrl-Key in the following code .


Hope I have not missed something and hope it helps.

Plus: Thank you for your great Lib !

if(id==CHARTEVENT_MOUSE_MOVE) {
    
      bool ctrl = ((((uint)sparam) & 8)== 8)?true:false; // ctrl key

      //--- Coordinates and the state of the left mouse button
      int m_x                 =(int)lparam;
      int m_y                 =(int)dparam;
      bool m_left_button_state =(bool)int(sparam);

      Print("m_left_button_state ", m_left_button_state, " --- ", int(sparam));   


 

 
Hi everyone+

I just saw that there is no option to download the new library through the store (it's a shame that it is like that,,,, I understand the reasons that Anatoli Kazharski explained)

What other way is there to download it? Or what articles talk about the implementation of any of its features?

I would like to take this opportunity to thank Anatoli Kazharski for the work he has done here.
 

why type void ?

//+------------------------------------------------------------------+
//| Проверка расположения курсора мыши над элементом                 |
//+------------------------------------------------------------------+
void CElementBase::CheckMouseFocus(void)
  {
   m_mouse_focus=m_mouse.X()>X() && m_mouse.X()<=X2() && m_mouse.Y()>Y() && m_mouse.Y()<=Y2();
  }
//+------------------------------------------------------------------+
//| Проверка пересечения границ элемента                             |
//+------------------------------------------------------------------+
bool CElementBase::CheckCrossingBorder(void)
 
BillionerClub #:

why type void ?

At night, I was sitting and didn't notice that the result is assigned to the variable. Thanks, question resolved.