------------ Дoбавленo:
(С data_font разорался-таки!)
------------ Дoбавленo:
Dilma, просьба добавить битовые операции (хотя бы только bitwise-or) в CodeGen. Это нужно для распутывания св-ва Font (точнее, параметра "стиль" (Italic, Bold, Underlined)).
Сейчас генерируется такой код:
#cpp
button1 = new wxButton(this, ID_BUTTON1, _T("Normal Button"), wxPoint(15, 0), wxSize(55, 20));
button1->SetFont(wxFont(8, wxFONTFAMILY_DEFAULT, (0&2==0)?wxFONTSTYLE_NORMAL:wxFONTSTYLE_ITALIC, (0&1==0)?wxFONTWEIGHT_NORMAL:wxFONTWEIGHT_BOLD, (0&4==0), _T("MS Sans Serif")));
button2 = new wxButton(this, ID_BUTTON2, _T("Italic"), wxPoint(15, 20), wxSize(55, 20));
button2->SetFont(wxFont(8, wxFONTFAMILY_DEFAULT, (2&2==0)?wxFONTSTYLE_NORMAL:wxFONTSTYLE_ITALIC, (2&1==0)?wxFONTWEIGHT_NORMAL:wxFONTWEIGHT_BOLD, (2&4==0), _T("MS Sans Serif")));
button3 = new wxButton(this, ID_BUTTON3, _T("Bold"), wxPoint(15, 40), wxSize(55, 20));
button3->SetFont(wxFont(8, wxFONTFAMILY_DEFAULT, (1&2==0)?wxFONTSTYLE_NORMAL:wxFONTSTYLE_ITALIC, (1&1==0)?wxFONTWEIGHT_NORMAL:wxFONTWEIGHT_BOLD, (1&4==0), _T("MS Sans Serif")));
button4 = new wxButton(this, ID_BUTTON4, _T("Strikeout"), wxPoint(15, 60), wxSize(55, 20));
button4->SetFont(wxFont(8, wxFONTFAMILY_DEFAULT, (8&2==0)?wxFONTSTYLE_NORMAL:wxFONTSTYLE_ITALIC, (8&1==0)?wxFONTWEIGHT_NORMAL:wxFONTWEIGHT_BOLD, (8&4==0), _T("MS Sans Serif")));
button5 = new wxButton(this, ID_BUTTON5, _T("Underline"), wxPoint(15, 80), wxSize(55, 20));
button5->SetFont(wxFont(8, wxFONTFAMILY_DEFAULT, (4&2==0)?wxFONTSTYLE_NORMAL:wxFONTSTYLE_ITALIC, (4&1==0)?wxFONTWEIGHT_NORMAL:wxFONTWEIGHT_BOLD, (4&4==0), _T("MS Sans Serif")));
button6 = new wxButton(this, ID_BUTTON6, _T("Western"), wxPoint(15, 120), wxSize(55, 20));
button6->SetFont(wxFont(8, wxFONTFAMILY_DEFAULT, (0&2==0)?wxFONTSTYLE_NORMAL:wxFONTSTYLE_ITALIC, (0&1==0)?wxFONTWEIGHT_NORMAL:wxFONTWEIGHT_BOLD, (0&4==0), _T("Arial")));
button7 = new wxButton(this, ID_BUTTON7, _T("Herbew"), wxPoint(15, 100), wxSize(55, 20));
button7->SetFont(wxFont(8, wxFONTFAMILY_DEFAULT, (0&2==0)?wxFONTSTYLE_NORMAL:wxFONTSTYLE_ITALIC, (0&1==0)?wxFONTWEIGHT_NORMAL:wxFONTWEIGHT_BOLD, (0&4==0), _T("Arial")));
------------ Дoбавленo:
Dilma, а всё-таки хотелось бы иметь доступ к методам кодогенератора из ф-ции lng_proc...