{"id":20697072,"url":"https://github.com/tsnsoft/wxwidgets_demo","last_synced_at":"2026-04-20T12:32:30.951Z","repository":{"id":119287277,"uuid":"243195694","full_name":"tsnsoft/wxwidgets_demo","owner":"tsnsoft","description":"Пример программы на С++ в Code::Blocks с использованием wxWidgets","archived":false,"fork":false,"pushed_at":"2020-11-04T13:30:57.000Z","size":6952,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T02:49:07.835Z","etag":null,"topics":["codeblocks","cpp","example","windows","wxwidgets","wxwidgets-applications"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsnsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-26T07:24:52.000Z","updated_at":"2021-01-13T04:19:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"415317cb-cf73-4d11-ae6b-764c3d4e0269","html_url":"https://github.com/tsnsoft/wxwidgets_demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tsnsoft/wxwidgets_demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsnsoft%2Fwxwidgets_demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsnsoft%2Fwxwidgets_demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsnsoft%2Fwxwidgets_demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsnsoft%2Fwxwidgets_demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsnsoft","download_url":"https://codeload.github.com/tsnsoft/wxwidgets_demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsnsoft%2Fwxwidgets_demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32047143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codeblocks","cpp","example","windows","wxwidgets","wxwidgets-applications"],"created_at":"2024-11-17T00:16:33.474Z","updated_at":"2026-04-20T12:32:30.925Z","avatar_url":"https://github.com/tsnsoft.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wxwidgets_demo\nПример программы на С++ в Code::Blocks с использованием wxWidgets\n\n![Screenshot](screenshot1.png)\n\n![Screenshot](screenshot2.png)\n\n![Screenshot](screenshot3.png)\n\n---\n\n![Screenshot](screenshot10.png)\n![Screenshot](screenshot11.png)\n![Screenshot](screenshot12.png)\n![Screenshot](screenshot13.png)\n![Screenshot](screenshot14.png)\n![Screenshot](screenshot15_1.png)\n![Screenshot](screenshot15_2.png)\n![Screenshot](screenshot16.png)\n![Screenshot](screenshot17.png)\n![Screenshot](screenshot18.png)\n![Screenshot](screenshot19.png)\n![Screenshot](screenshot20.png)\n![Screenshot](screenshot21.png)\n\n---\n\n```\n#include \"wxwidgets_testMain.h\"\n#include \u003cwx/msgdlg.h\u003e\n\n#include \u003ciostream\u003e\n#include \u003csstream\u003e\n#include \u003ccmath\u003e\n\n//(*InternalHeaders(wxwidgets_testDialog)\n#include \u003cwx/font.h\u003e\n#include \u003cwx/intl.h\u003e\n#include \u003cwx/settings.h\u003e\n#include \u003cwx/string.h\u003e\n//*)\n\n//helper functions\nenum wxbuildinfoformat\n{\n    short_f, long_f\n};\n\nwxString wxbuildinfo(wxbuildinfoformat format)\n{\n    wxString wxbuild(wxVERSION_STRING);\n\n    if (format == long_f )\n    {\n#if defined(__WXMSW__)\n        wxbuild \u003c\u003c _T(\"-Windows\");\n#elif defined(__UNIX__)\n        wxbuild \u003c\u003c _T(\"-Linux\");\n#endif\n\n#if wxUSE_UNICODE\n        wxbuild \u003c\u003c _T(\"-Unicode build\");\n#else\n        wxbuild \u003c\u003c _T(\"-ANSI build\");\n#endif // wxUSE_UNICODE\n    }\n\n    return wxbuild;\n}\n\n//(*IdInit(wxwidgets_testDialog)\nconst long wxwidgets_testDialog::ID_STATICTEXT1 = wxNewId();\nconst long wxwidgets_testDialog::ID_STATICLINE1 = wxNewId();\nconst long wxwidgets_testDialog::ID_TEXTCTRL2 = wxNewId();\nconst long wxwidgets_testDialog::ID_TEXTCTRL1 = wxNewId();\nconst long wxwidgets_testDialog::ID_BUTTON1 = wxNewId();\nconst long wxwidgets_testDialog::ID_STATICTEXT3 = wxNewId();\nconst long wxwidgets_testDialog::ID_BUTTON2 = wxNewId();\n//*)\n\nBEGIN_EVENT_TABLE(wxwidgets_testDialog,wxDialog)\n    //(*EventTable(wxwidgets_testDialog)\n    //*)\nEND_EVENT_TABLE()\n\nwxwidgets_testDialog::wxwidgets_testDialog(wxWindow* parent,wxWindowID id)\n{\n    //(*Initialize(wxwidgets_testDialog)\n    Create(parent, id, _(\"Пример с  wxWidgets\"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T(\"id\"));\n    BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);\n    StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _(\"Я люблю\\nwxWidgets !\"), wxDefaultPosition, wxDefaultSize, 0, _T(\"ID_STATICTEXT1\"));\n    wxFont StaticText1Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);\n    if ( !StaticText1Font.Ok() ) StaticText1Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);\n    StaticText1Font.SetPointSize(20);\n    StaticText1-\u003eSetFont(StaticText1Font);\n    BoxSizer1-\u003eAdd(StaticText1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 10);\n    BoxSizer2 = new wxBoxSizer(wxVERTICAL);\n    StaticLine1 = new wxStaticLine(this, ID_STATICLINE1, wxDefaultPosition, wxSize(10,-1), wxLI_HORIZONTAL, _T(\"ID_STATICLINE1\"));\n    BoxSizer2-\u003eAdd(StaticLine1, 0, wxALL|wxEXPAND, 4);\n    TextCtrl2 = new wxTextCtrl(this, ID_TEXTCTRL2, _(\"0\"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(\"ID_TEXTCTRL2\"));\n    BoxSizer2-\u003eAdd(TextCtrl2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);\n    TextCtrl1 = new wxTextCtrl(this, ID_TEXTCTRL1, _(\"0\"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(\"ID_TEXTCTRL1\"));\n    BoxSizer2-\u003eAdd(TextCtrl1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);\n    doCalc = new wxButton(this, ID_BUTTON1, _(\"Сумма\"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(\"ID_BUTTON1\"));\n    BoxSizer2-\u003eAdd(doCalc, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);\n    StaticText_Sum = new wxStaticText(this, ID_STATICTEXT3, _(\"0\"), wxDefaultPosition, wxDefaultSize, 0, _T(\"ID_STATICTEXT3\"));\n    BoxSizer2-\u003eAdd(StaticText_Sum, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);\n    BoxSizer1-\u003eAdd(BoxSizer2, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 4);\n    Button2 = new wxButton(this, ID_BUTTON2, _(\"Выход\"), wxDefaultPosition, wxSize(99,23), 0, wxDefaultValidator, _T(\"ID_BUTTON2\"));\n    BoxSizer1-\u003eAdd(Button2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 4);\n    SetSizer(BoxSizer1);\n    BoxSizer1-\u003eFit(this);\n    BoxSizer1-\u003eSetSizeHints(this);\n    Center();\n\n    Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)\u0026wxwidgets_testDialog::OndoCalcClick);\n    Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)\u0026wxwidgets_testDialog::OnQuit);\n    //*)\n}\n\nwxwidgets_testDialog::~wxwidgets_testDialog()\n{\n    //(*Destroy(wxwidgets_testDialog)\n    //*)\n}\n\nvoid wxwidgets_testDialog::OnQuit(wxCommandEvent\u0026 event)\n// Выход из программы\n{\n    wxMessageBox(_(\"С++ с wxWidgets - это круто!\"), _(\"До свидания!\"));\n    Close();\n}\n\nvoid wxwidgets_testDialog::OndoCalcClick(wxCommandEvent\u0026 event)\n// Кнопка расчета значения\n{\n    double a = strtod(TextCtrl1-\u003eGetValue(), NULL);\n    double b = strtod(TextCtrl2-\u003eGetValue(), NULL);\n    double c = a + b;\n    std::ostringstream foo;\n    foo.precision(10);\n    foo \u003c\u003c c;\n    StaticText_Sum-\u003eSetLabel(foo.str());\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsnsoft%2Fwxwidgets_demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsnsoft%2Fwxwidgets_demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsnsoft%2Fwxwidgets_demo/lists"}