My approach. The core is the engine. - page 35

 
Dmitry Fedoseev:

What do you think? What is there that the standard library can't handle?

Okay, Dimitri. The public here doesn't want to give up. I may not be much of an artist. But I tried to show the possibilities of the designer. They are quite wide. You can create not only quickly, but also beautifully (well, that's for those who are more talented than me in drawing).

I will demonstrate the code of the clock window:

//----------------------------------------------------------------------------------
NEW_WINDOW,  W_NAME, "Time limits",  W_ICON, "Schedule (16x16)",  W_TYPE, SETTINGS, ALWAYS_ON_TOP,   
MARGINS,-9,-7,
//----------------------------------------------------------------------------------
"MF",N_COLOR,(int)C'200,169,149', 
"MF",NG_LINES,56, 
"MF",NG_STEP,-1,
//----------------------------------------------------------------------------------
 GROUP, A,
//---------------------------------------
__,BOARD,"Time limits for initial trades:", W,280,_,H,30,_,FONT_SIZE,13, _,TEXT_FONT,"Arial Black",_,ADAPT_2_GRADIENT,"MF",_,text, N_COLOR,(int)C'255,255,255',
//--------------------------------------- 
 END_GROUP,
//--------------------------
 i, AT, _X2X, "MF", 33, _Y2Y, "MF", 5,
//----------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
 GROUP, A,
//---------------------------------------
 __,REC,"R1", W,190,_,H,63,
//--------------------------------------- 
 END_GROUP,
//--------------------------
 i, AT, _X2W, "OFF", 10, _Y2H, "Time limits for initial trades:", 10,
 i,RECS, 
        N_FRAME,1,
        N_FRAME_COLOR,(int)C'209,173,149', 
       // FRAME_TYPE,_abc,  
        N_COLOR,(int)C'240,209,189',
       // NG_LINES,15,NG_STEP,1,
        NG_LINES,36, 
        NG_STEP,1,
        END,
//----------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
 GROUP, A,
    
__, BUTTON,"OFF", W,100,_,H,65, _,P_COLOR,(int)C'250,189,179',  _,A_COLOR,(int)C'255,20,17', _,AP_COLOR,(int)C'255,60,17', _,PARAM_TYPE,_BOOL, _,N_COLOR,(int)C'240,219,189', _,FIC,
         
 END_GROUP,
//--------------------------
 i, AT, _X2X, "MF", 5, _Y2H, "Time limits for initial trades:", 10,
//--------------------------  
i,BUTTONS,  PARAM_TYPE,_BOOL,   text,_A1_,_C2C,       text,_A2_,_C2C,     FONT_SIZE,12,   N_FRAME,1,   A_FRAME,1,   NP_FRAME,1,    END,
"OFF",A_TEXT,"ON",
//-------------------------- 
"OFF",NG_LINES,65, 
"OFF",NG_STEP,-1,
"OFF",AG_LINES,65, 
"OFF",AG_STEP,-1,
"OFF",NPG_LINES,65, 
"OFF",NPG_STEP,-1,
//----------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
 GROUP, A,
    
__, EDIT,"Hour to start", _,EDIT_ALIGN_CENTER, _,V_CURRENT,"1",  //_,READ_ONLY, 
    
    EDIT,"End hour",      _,EDIT_ALIGN_CENTER,_,V_CURRENT,"0",  //_,READ_ONLY, 
    
 END_GROUP,
//--------------------------
 i, AT, _X2W, "OFF", 17, _Y2H, "Time limits for initial trades:", 30,
 
 i,X_GAP,3,

 i,EDITS,  
 FRAME_TYPE,_b,
 POINTED,0,
 H,39,
 W,90,
 FONT_SIZE,20,
 N_COLOR,(int)C'240,209,189',
 NH_COLOR,(int)C'240,209,189',
 A_COLOR,(int)C'240,209,189',
 AH_COLOR,(int)C'240,209,189',
 N_FRAME_COLOR,(int)C'200,169,149',
 
 TEXT_FONT,"Arial Black",
 bar,N_FRAME,1,
 bar,A_FRAME,1,
 bar,FRAME_TYPE,_bc,
 
 bar,N_FRAME_COLOR,(int)C'200,169,149',
 bar,NH_FRAME_COLOR,(int)C'200,169,149',
 bar,A_FRAME_COLOR,(int)C'200,169,149',
 bar,AH_FRAME_COLOR,(int)C'200,169,149',
 
 bar,N_COLOR,(int)C'255,229,219',
 bar,NH_COLOR,(int)C'255,229,219',
 bar,A_COLOR,(int)C'255,229,219',
 bar,AH_COLOR,(int)C'255,229,219',
 
 bar,NG_LINES,36, 
 bar,NG_STEP,  1,
 bar,AG_LINES,36, 
 bar,AG_STEP,  1,
 
 text,N_COLOR,  (int)C'200,139,129',
 text,NH_COLOR, (int)C'200,139,129',
 text,A_COLOR,  (int)C'200,139,129',
 text,AH_COLOR, (int)C'200,139,129',
 
END,

//----------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
 GROUP, A,

__, BOARD,"Hour to start:", W_C2C,"Hour to start",0, _,ON_TOP,"Hour to start",0,  

__, BOARD,"End hour:",      W_C2C,"End hour",     0, _,ON_TOP,"End hour",     0,   

 END_GROUP,
//--------------------------
i,BOARDS, FONT_SIZE,11,ADAPT_2_GRADIENT,"MF", text,N_COLOR,(int)C'180,149,129',   END,
//----------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
GROUP, A,

__, H_LINE,"HL3",W,188,_,N_COLOR,(int)C'255,223,199',

END_GROUP,
//----------------------
 i, AT, _X2X, "R1", 1, _Y2Y, "R1", 1,

//----------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
GROUP, A,

__, V_LINE,"vL",H,61,_,N_COLOR,(int)C'255,223,199',

END_GROUP,
//------------------------------------
 i, AT, _X2X, "R1", 1, _Y2Y, "R1", 1,

//----------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
GROUP, A,

__, H_LINE,"HL5",W,190,_,N_COLOR,(int)C'199,163,139',

END_GROUP,
//----------------------
 i, AT, _X2X, "R1", 1, _Y2H, "R1", 0,

//----------------------------------------------------------------------------------

//----------------------------------------------------------------------------------
GROUP, A,

__, V_LINE,"vL2",H,63,_,N_COLOR,(int)C'199,163,139',

END_GROUP,
//----------------------
 i, AT, _X2W, "R1", 0, _Y2Y, "R1", 1,

//----------------------------------------------------------------------------------------------------
GROUP, A,

__, LABEL,A, N_LABEL,"Time (32x32)",

END_GROUP,
//--------------------------
i, AT, _X2X, "MF", 3, _Y2Y, "MF", 5,
//----------------------------------------------------------------------------------
END_WINDOW,
//***************************************************************************************************************************************** *
 

Sure, the code is big. But it is extremely simple.

The main thing is that elements with already set properties (size, colour, gradient) can be simply taken from the code and copied to other windows.

No syntax, no classes, etc... They just took an item, or a group of items, or the whole window and paste it anywhere. In one piece.

Then, change something and you get a new element, element group or window.

 
Реter Konow:

...But I tried to show possibilities of constructor...

Here:NEW_WINDOW, W_NAME, "Time limits", W_ICON, "Schedule (16x16)", W_TYPE, SETTINGS, ALWAYS_ON_TOP,

That's what you're trying to portray as an OOP, only in your... in your own way. This is essentially a constructor call: new Qwerty(z,x,c).

 
Dmitry Fedoseev:

Here:NEW_WINDOW, W_NAME, "Time limits", W_ICON, "Schedule (16x16)", W_TYPE, SETTINGS, ALWAYS_ON_TOP,

That's what you're trying to portray as an OOP, only in your... in your own way. It's essentially a constructor call: new Qwerty(z,x,c).

Perhaps. But the order doesn't matter here.

For example:

NEW_WINDOW,  W_NAME, "Time limits",  W_ICON, "Schedule (16x16)",  W_TYPE, SETTINGS, ALWAYS_ON_TOP,

or .

NEW_WINDOW, W_ICON, "Schedule (16x16)", W_NAME, "Time limits",     ALWAYS_ON_TOP, W_TYPE, SETTINGS,


It makes no difference.

Note that properties can be set for a whole group of the same type at once:

i,BOARDS, FONT_SIZE,11,ADAPT_2_GRADIENT,"MF", text,N_COLOR,(int)C'180,149,129',   END,
 
Реter Konow:

Maybe. But the order is not important here.

For example:

or


It makes no difference.

Note that properties can be set for a whole group of similar elements at once:

If the order is not important, then there are no tooltips. And when you call a function or class constructor with parameters, the compiler makes hints by parameters. And you know, this is a very significant help. So the standard approach is a definite fat plus.

 
Реter Konow:

The level of graphics in the standard library is not good, to say the least. The labour involved in creating these windows, for example:

Huge. THAT'S WHY NOTHING SERIOUS IS CREATED.

I doubt that with the standard library you can create such graphics in principle.

You're just out of your depth :(

It's very simple and quick. All your windows can be made with the standard library. Really, I won't do it :)


Files:
HelloWorld1.ex5  250 kb
 
Yury Kulikov:

You're just not in the loop :(

It's very simple and quick. All your windows can be done with a standard library. Really, I won't do it :)


Try to make, that at pressing one button one set of control elements will be displayed, and at pressing another one another control element will be displayed. At the same time, you will be able to minimize and maximize the window. It's also assumed that there could be a lot of variants.

It would be interesting to ask Peter how he could solve this problem.

 
Dmitry Fedoseev:

Try to make one set of controls appear when you click on one button, and another set of controls appear when you click on another button. At the same time, the window can be minimized and maximized. It's also assumed that there could be a lot of variants.

It would be interesting to ask Peter how he could solve this task.

There is such a possibility. I can make one element control the phenomenon of another element, or group of elements. Well, and regular tabs work too, of course.

I'll make such an engine today and show it to you.

 
Dmitry Fedoseev:

Try to make one set of controls appear when you click on one button, and another set of controls appear when you click on another button. At the same time, the window can be minimised and maximised.

Is there a problem? I don't have time to investigate the standard library, but I think if hide/show doesn't solve the problem, you could probably swap containers, client areas, or the dialog itself.

 
Yury Kulikov:

Is there a problem? I don't have time to investigate the standard library, but I think if hide/show doesn't solve the problem, you could probably swap containers, client areas, or the dialog itself.

I don't know, I tried it and it didn't work.

Reason: