{"id":3729,"date":"2021-12-10T11:03:30","date_gmt":"2021-12-10T11:03:30","guid":{"rendered":"http:\/\/truelogic.org\/wordpress\/?p=3729"},"modified":"2022-02-17T06:20:43","modified_gmt":"2022-02-17T06:20:43","slug":"1-wxwidgets-introduction","status":"publish","type":"post","link":"https:\/\/truelogic.org\/wordpress\/2021\/12\/10\/1-wxwidgets-introduction\/","title":{"rendered":"1.wxWidgets &#8211; Introduction"},"content":{"rendered":"\n<p><strong>OVERVIEW<\/strong><\/p>\n\n\n\n<p>wxWidgets along with Qt are the two most popular cross-platform GUI libraries for C++. wxWidgets has been ported to other languages as well like Python, Perl, Ruby etc. So if one is familiar with using wxWidgets in one language, they can leverage the same knowledge in another language.<\/p>\n\n\n\n<p>This series of tutorials assumes that you are already familiar with the basics of C++ programming. Prior exposure to building desktop UI is a great plus point but not a necessity.<\/p>\n\n\n\n<p><strong>SETUP &amp; INSTALLATION<\/strong><\/p>\n\n\n\n<p>The actual example source code samples will be the same whether you are building on Windows or  MacOS or Linux. However the libraries and commands for converting source into executable will vary according to the OS platform being used.<\/p>\n\n\n\n<p>We are using the latest version of wxWidgets which is 3.1.5 at this time. The procedure to setup wxWidgets under Linux (Debian\/Ubuntu variants) is given here: <\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\"https:\/\/truelogic.org\/wordpress\/2021\/10\/31\/setting-up-wxwidgets-environment-for-c-in-ubuntu-linux\/ (opens in a new tab)\" href=\"https:\/\/truelogic.org\/wordpress\/2021\/10\/31\/setting-up-wxwidgets-environment-for-c-in-ubuntu-linux\/\" target=\"_blank\">https:\/\/truelogic.org\/wordpress\/2021\/10\/31\/setting-up-wxwidgets-environment-for-c-in-ubuntu-linux\/<\/a><\/p>\n\n\n\n<p>Building it under Windows 10 is given here: <\/p>\n\n\n\n<p><a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/06\/setting-up-wxwidgets-environment-for-c-in-windows-10\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/06\/setting-up-wxwidgets-environment-for-c-in-windows-10\/ (opens in a new tab)\">https:\/\/truelogic.org\/wordpress\/2021\/12\/06\/setting-up-wxwidgets-environment-for-c-in-windows-10\/<\/a><\/p>\n\n\n\n<p>If you are able to compile and build the sample application provided in either of the two posts, then you are ready to do programming using wxWidgets.<\/p>\n\n\n\n<p><strong>TABLE OF CONTENTS<\/strong><\/p>\n\n\n\n<p>Given below is the list of topics we will cover:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>1.  Introduction<\/li><li>2.  <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/11\/2-wxwidgets-basics-of-getting-started\/\">Basics of Getting Started<\/a><ul><li>2a.<a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/11\/2a-wxwidgets-console\/\"> console<\/a><\/li><li>2b.<a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/11\/2b-wxwidgets-wxstring\/\"> wxString<\/a><\/li><li>2c. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/11\/2c-wxwidgets-process-control\/\">Process Control<\/a><\/li><li>2d. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/11\/2d-wxwidgets-platform-info\/\">Platform Info<\/a><\/li><li>2e. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/11\/2e-wxwidgets-date-and-time\/\">Date and time<\/a><\/li><li>2f.  <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/11\/2f-wxwidgets-files-directories\/\">Files &amp; Directories<\/a><\/li><\/ul><\/li><li> 3. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/12\/3-wxwidgets-windowing-basics\/\">Windowing Basics<\/a><ul><li>3a. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/13\/3a-wxwidgets-simple-window\/\">Simple Window <\/a><\/li><li>3b. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/13\/3b-wxwidgets-application-icon\/\">Application Icon<\/a><\/li><li>3c.<a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/13\/3c-wxwidgets-buttons-labels\/\"> Buttons &amp; Labels<\/a><\/li><li>3d.<a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/13\/3d-wxwidgets-panels\/\"> Panels<\/a><\/li><li>3e  <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/13\/3e-wxwidgets-preview-to-event-handling\/\">Preview to Event Handling<\/a><\/li><\/ul><\/li><li> <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/14\/4-wxwidgets-menus-toolbars\/\">4. Menus &amp; Toolbars<\/a><ul><li>4a<a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/14\/4a-wxwidgets-menu-and-menuitems\/\">. Menu and MenuItems<\/a><\/li><li>4b. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/14\/4b-wxwidgets-submenu\/\">Submenu<\/a><\/li><li>4c. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/14\/4c-wxwidgets-toolbar\/\">Toolbar<\/a><\/li><li>4d. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/14\/4d-wxwidgets-multiple-toolbars\/\">Multiple Toolbars<\/a><\/li><\/ul><\/li><li> 5.<a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/17\/5-wxwidgets-layouts\/\">Layouts<\/a><ul><li>     5a.<a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/17\/5a-wxwidgets-absolute-positioning\/\"> Absolute Positioning<\/a><\/li><li>     5b. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/17\/5b-wxwidgets-dynamic-positioning-with-sizers\/\">Dynamic Positioning with Sizers<\/a><ul><li>  5b-1. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/17\/5b-1-wxwidgets-wxboxsizer\/\">wxBoxSizer<\/a><\/li><li>  5b-2. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/18\/5b-2-wxwidgets-wxstaticboxsizer\/\">wxStaticBoxSizer<\/a><\/li><li>  5b-3. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/19\/5b-3-wxwidgets-gridsizer\/\">GridSizer<\/a><\/li><li>  5b-4. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/20\/5b-4-wxwidgets-flexgridsizer\/\">FlexGridSizer<\/a><\/li><li>  5b-5. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/21\/5b-5-wxwidgets-gridbagsizer\/\">GridBagSizer<\/a><\/li><li>  5b-6. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/22\/5b-6-wxwidgets-building-a-complex-ui\/\">Building a Complex UI <\/a><\/li><\/ul><\/li><\/ul><\/li><li> 6.<a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/24\/6-wxwidgets-event-handling\/\">Event Handling<\/a><ul><li>6a. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/24\/6a-wxwidgets-using-event-tables\/\">Using Event Tables<\/a><\/li><li>6b. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/24\/6b-wxwidgets-using-connect\/\">Using Connect<\/a><\/li><li>6c. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/24\/6c-wxwidgets-using-bind\/\">Using Bind<\/a><\/li><li>6d. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/25\/6d-wxwidgets-event-propagation\/\">Event Propagation<\/a><\/li><li>6e. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/25\/6e-wxwidgets-vetoing-events\/\">Vetoing Events<\/a><\/li><li>6f. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/26\/6f-wxwidgets-using-window-identifiers\/\">Using Window Identifiers<\/a><\/li><li>6g. <a href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/26\/6g-wxwidgets-using-bind-and-unbind\/\">Using Bind and Unbind<\/a><\/li><\/ul><\/li><li> 7.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/03\/7-wxwidgets-dialogs\/\">Dialogs<\/a><ul><li>7a.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/03\/7b-wxwidgets-wxmessagedialog\/\">wxMessageDialog<\/a><\/li><\/ul><ul><li>7b.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/03\/7b-wxwidgets-wxfiledialog\/\">wxFileDialog<\/a><\/li><li>7c.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/03\/7c-wxwidgets-wxfontdialog\/\">wxFontDialog<\/a><\/li><li>7d.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/03\/7d-wxwidgets-creating-custom-dialog\/\">Creating Custom Dialog<\/a><\/li><\/ul><\/li><li> 8.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/06\/8-wxwidgets-widgets-part-1\/\">Widgets Part 1<\/a><ul><li>8a.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/06\/8a-wxwidgets-wxcheckbox\/\">wxCheckBox<\/a><\/li><li>8b.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/06\/8b-wxwidgets-wxbitmapbutton\/\">wxBitmapButton<\/a><\/li><li>8c.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/06\/8c-wxwidgets-wxtogglebutton\/\">wxToggleButton<\/a><\/li><li>8d.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/06\/8d-wxwidgets-wxstaticline\/\">wxStaticLine<\/a><\/li><li>8e.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/06\/8e-wxwidgets-wxstatictext\/\">wxStaticText<\/a><\/li><li>8f.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/06\/8f-wxwidgets-wxslider\/\">wxSlider<\/a><\/li><\/ul><\/li><li> 9.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/12\/9-wxwidgets-widgets-part-2\/\">Widgets Part 2<\/a><ul><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/12\/9a-wxwidgets-wxlistbox\/\">9a. wxListBox<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/13\/9b-wxwidgets-wxnotebook\/\">9b.wxNoteBook<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/13\/9c-wxwidgets-wxscrolledwindow\/\">9c. wxScrolledWindow<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/13\/9d-wxwidgets-wxgrid\/\">9d. wxGrid<\/a><\/li><\/ul><\/li><li> 10.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/15\/10-wxwidgets-drag-drop\/\">Drag &amp; Drop<\/a><ul><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/15\/10a-wxwidgets-wxtextdrop\/\">10a. wxTextDrop<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/19\/10b-wxwidgets-wxfiledrop\/\">10b. wxFileDrop<\/a><\/li><\/ul><\/li><li>11.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/24\/11-wxwidgets-graphics\/\">Graphics<\/a><ul><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/24\/wxwidgets-11a-drawing-lines\/\">11a.Drawing Lines<\/a><\/li><\/ul><ul><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/24\/11b-wxwidgets-drawing-text\/\">11b.Drawing Text<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/24\/11c-wxwidgets-drawing-points\/\">11c.Drawing Points<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/24\/11d-wxwidgets-the-pen-object\/\">11d.The Pen Object<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/24\/11e-wxwidgets-regions\/\">11e. Regions<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/24\/11f-wxwidgets-gradient\/\">11f.Gradient<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/24\/11g-wxwidgets-shapes\/\">11g.Shapes<\/a><\/li><\/ul><\/li><li> 12.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/26\/12-wxwidgets-creating-a-custom-widget\/\">Creating a Custom Widget<\/a><\/li><li>13.<a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/29\/13-wxwidgets-non-gui-objects-and-classes\/\">Non-GUI Objects and Classes<\/a><ul><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/29\/13a-wxwidgets-character-buffer\/\">13a. Character Buffer<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/01\/31\/13b-wxwidgets-stream-classes\/\">13b. Stream Classes<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/02\/05\/13c-wxwidgets-multithreading\/\">13c. Multithreading<\/a><\/li><li>13d. <a href=\"https:\/\/truelogic.org\/wordpress\/2022\/02\/07\/13d-wxwidgets-wxconfig-usage\/\">wxConfig Usage<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/02\/09\/13e-wxwidgets-persistent-objects\/\">13e. Persistent Objects<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/02\/10\/13f-wxwidgets-regular-expressions\/\">13f. Regular Expressions<\/a><\/li><\/ul><ul><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/02\/14\/13g-wxwidgets-archive-formats\/\">13g. Archive Formats<\/a><\/li><li><a href=\"https:\/\/truelogic.org\/wordpress\/2022\/02\/17\/13h-wxwidgets-interprocess-communications\/\">13h. Interprocess Communications<\/a><\/li><\/ul><\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>OVERVIEW wxWidgets along with Qt are the two most popular cross-platform GUI libraries for C++. wxWidgets has been ported to other languages as well like <a class=\"mh-excerpt-more\" href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/10\/1-wxwidgets-introduction\/\" title=\"1.wxWidgets &#8211; Introduction\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":3595,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[302,365],"tags":[],"class_list":["post-3729","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cc","category-wxwidgets"],"_links":{"self":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/3729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/comments?post=3729"}],"version-history":[{"count":68,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/3729\/revisions"}],"predecessor-version":[{"id":4284,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/3729\/revisions\/4284"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/media\/3595"}],"wp:attachment":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/media?parent=3729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/categories?post=3729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/tags?post=3729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}