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

 
Vasiliy Sokolov:

Why did you voice it? Now Peter will read it and decide what to do. He'll go back into hiding for a few years.

Cheers for the good man).

 
Aliaksandr Hryshyn:

This is a very poorly readable representation of the information. It is better to work with such data fully automatically. Automatic creation (visual editor), use, edit. Be sure to make a visual editor!

I understand that my representation of the data in the prototype array is unclear. I gave a simpler example where everything is clear.

int P_CORE[3][10] = {
//Основание кнопки.-----------------------------
//
//NAME     TYPE   ELEMENT     X    Y     X_SIZE  Y_SIZE       COLOR 
//----------------------------------------------
{ 100001,  base,  button,    100, 100,    200,    50,    C'245,245,245'},
//---------------------------------------------- 
//Текст кнопки.---------------------------------
//
//NAME    TYPE   ELEMENT   X    Y     X_SIZE  Y_SIZE       COLOR 
//----------------------------------------------
{100002,  text,  button,  120, 120,     0,      0,       C'245,0,0'},
//---------------------------------------------- 
//Иконка кнопки.-------------------------------- 
//
//NAME    TYPE     ELEMENT   X    Y     X_SIZE  Y_SIZE       COLOR 
{100003,  icon,    button,  140, 140,     16,     16,           0},
//---------------------------------------------- 
};

A visual editor is almost a reality. It can be made. I'll try.

 
Реter Konow:

A visual editor is almost a reality. It can be done. I'll try.

Don't! Peter, the deadline is looming. You were promised to publish the engine soon. Stick to your plans. Finally release your miracle, and then you'll create another masterpiece in a leisurely fashion.

 
Do all controls have the same number of properties and are they(property sets) identical?
 
Vasiliy Sokolov:

Don't! Peter, the deadline is looming. You promised to publish the engine soon. Stick to your plans. Finally release your miracle, and then you'll create another masterpiece in a leisurely fashion.

Okay.

 
Реter Konow:

I realise that my representation of the data in the prototype array is unclear. I gave a simpler example where everything is clear.

A visual editor is almost a reality. It can be made. I will try.

The format is simple, but it's not working with it. I mean when objects have a lot of properties.

Here's an example of your approach, actually used, the principles are the same. Lexical parsing of text is very hard to do manually. Only automation. And don't tell me it's convenient.

static sLex_state ind_lex_states[34]={{0,0,0,0},{0,22,0,0},{22,22,0,0},{44,0,0,1},{44,8,1,0},{52,1,1,0},{53,0,1,1},{53,1,2,0},{54,9,2,1},{63,0,3,1},{63,9,4,1},{72,11,5,1},{83,13,6,1},{96,0,7,1},{96,0,8,1},{96,0,9,1},{96,5,10,0},{101,0,10,1},{101,1,11,0},{102,3,11,1},{105,0,12,1},{105,13,13,1},{118,13,14,1},{131,0,15,1},{131,5,16,1},{136,3,17,1},{139,13,18,1},{152,13,19,1},{165,0,20,1},{165,13,21,1},{178,9,22,2},{187,9,24,2},{196,0,26,1},{196,0,27,1}};
static sLex_rule ind_lex_rules[196]={{9,13,3},{32,32,3},{34,34,4},{43,43,5},{44,44,6},{45,45,5},{47,47,7},{48,57,8},{59,59,9},{65,69,10},{70,70,11},{71,83,10},{84,84,12},{85,90,10},{95,95,10},{97,101,10},{102,102,11},{103,115,10},{116,116,12},{117,122,10},{123,123,13},{125,125,14},{9,13,3},{32,32,3},{34,34,4},{43,43,5},{44,44,6},{45,45,5},{47,47,7},{48,57,8},{59,59,9},{65,69,10},{70,70,11},{71,83,10},{84,84,12},{85,90,10},{95,95,10},{97,101,10},{102,102,11},{103,115,10},{116,116,12},{117,122,10},{123,123,13},{125,125,14},{32,32,4},{34,34,15},{48,58,4},{63,63,4},{65,90,4},{92,92,4},{95,95,4},{97,122,4},{48,57,8},{47,47,16},{0,45,17},{46,46,18},{47,47,17},{48,57,8},{58,68,17},{69,69,19},{70,100,17},{101,101,19},{102,65535,17},{0,47,20},{48,57,10},{58,64,20},{65,90,10},{91,94,20},{95,95,10},{96,96,20},{97,122,10},{123,65535,20},{0,47,20},{48,57,10},{58,64,20},{65,65,21},{66,90,10},{91,94,20},{95,95,10},{96,96,20},{97,97,21},{98,122,10},{123,65535,20},{0,47,20},{48,57,10},{58,64,20},{65,81,10},{82,82,22},{83,90,10},{91,94,20},{95,95,10},{96,96,20},{97,113,10},{114,114,22},{115,122,10},{123,65535,20},{0,9,16},{10,10,23},{11,12,16},{13,13,24},{14,65535,16},{48,57,25},{43,43,18},{45,45,18},{48,57,25},{0,47,20},{48,57,10},{58,64,20},{65,75,10},{76,76,26},{77,90,10},{91,94,20},{95,95,10},{96,96,20},{97,107,10},{108,108,26},{109,122,10},{123,65535,20},{0,47,20},{48,57,10},{58,64,20},{65,84,10},{85,85,27},{86,90,10},{91,94,20},{95,95,10},{96,96,20},{97,116,10},{117,117,27},{118,122,10},{123,65535,20},{0,9,16},{10,10,23},{11,12,16},{13,13,24},{14,65535,16},{0,47,28},{48,57,25},{58,65535,28},{0,47,20},{48,57,10},{58,64,20},{65,82,10},{83,83,29},{84,90,10},{91,94,20},{95,95,10},{96,96,20},{97,114,10},{115,115,29},{116,122,10},{123,65535,20},{0,47,20},{48,57,10},{58,64,20},{65,68,10},{69,69,30},{70,90,10},{91,94,20},{95,95,10},{96,96,20},{97,100,10},{101,101,30},{102,122,10},{123,65535,20},{0,47,20},{48,57,10},{58,64,20},{65,68,10},{69,69,31},{70,90,10},{91,94,20},{95,95,10},{96,96,20},{97,100,10},{101,101,31},{102,122,10},{123,65535,20},{0,47,32},{48,57,10},{58,64,32},{65,90,10},{91,94,32},{95,95,10},{96,96,32},{97,122,10},{123,65535,32},{0,47,33},{48,57,10},{58,64,33},{65,90,10},{91,94,33},{95,95,10},{96,96,33},{97,122,10},{123,65535,33}};
static sLex_action ind_lex_actions[28]={{match,1},{match,5},{backup_match,8},{match,6},{backup_match,11},{backup_match,11},{backup_match,11},{match,3},{match,4},{match,12},{match_and_backup,8},{match_and_backup,8},{match_and_backup,11},{backup_match,11},{backup_match,11},{match,2},{match,2},{backup_match,7},{backup_match,11},{backup_match,11},{match_and_backup,7},{backup_match,11},{backup_match,9},{backup_match,11},{backup_match,10},{backup_match,11},{match_and_backup,9},{match_and_backup,10}};
 
Dmitry Fedoseev:
Do all controls have the same number of properties and are they(property sets) identical?

+ I join in the question.

 
Dmitry Fedoseev:
Do all controls have the same number of properties and are they(property sets) identical in general?

Yes. More precisely, not all Elements, but all Objects. An Element is a set of Objects. Each type of Element has a different number of Objects.

There are several types of Objects - Base, Text, Icon, Canvas.The number and set of properties is universal for any type of Object.

Their properties are identical, but for some objects, some properties are not used. For example, the Font property is not used for Basis.

 
Реter Konow:

Their properties are identical, but for some objects some properties are not used. For example, Base does not use the Font property.

So, in order to maintain the dimensionality of the array, some of your objects have fake properties. It's very flexible, you can't tell anything.

 
Not just all of them... ))