wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.

Overview

About

wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.

wxWidgets Logo

wxWidgets allows you to write native-looking GUI applications for all the major desktop platforms and also helps with abstracting the differences in the non-GUI aspects between them. It is free for the use in both open source and commercial applications, comes with the full, easy to read and modify, source and extensive documentation and a collection of more than a hundred examples. You can learn more about wxWidgets at https://www.wxwidgets.org/ and read its documentation online at https://docs.wxwidgets.org/

Platforms

AppVeyor Unix (make) Unix (CMake) MSW (MSVC) MSW (gcc) Mac OSS-Fuzz

This version of wxWidgets supports the following primary platforms:

  • Windows XP, Vista, 7, 8 and 10 (32/64 bits).
  • Most Unix variants using the GTK+ toolkit (version 2.6 or newer or 3.x).
  • macOS (10.10 or newer) using Cocoa under both amd64 and ARM platforms.

Most popular C++ compilers are supported including but not limited to:

  • Microsoft Visual C++ 2005 or later (up to 2022).
  • g++ 4 or later, including MinGW/MinGW-64/TDM under Windows.
  • Clang under macOS and Linux.
  • Intel icc compiler.
  • Oracle (ex-Sun) CC.

Licence

wxWidgets licence is a modified version of LGPL explicitly allowing not distributing the sources of an application using the library even in the case of static linking.

Building

For building the library, please see platform-specific documentation under docs/ directory, e.g. here are the instructions for wxGTK, wxMSW and wxOSX.

If you're building the sources checked out from Git, and not from a released version, please see these additional Git-specific notes.

Further information

If you are looking for community support, you can get it from

Commercial support is also available.

Finally, keep in mind that wxWidgets is an open source project collaboratively developed by its users and your contributions to it are always welcome. Please check our guidelines if you'd like to do it.

Have fun!

The wxWidgets Team.

Issues
  • Add macro wxNO_UNSAFE_WXSTRING_CONV2 disallowing any implicit conversion between wxString and const char *

    Add macro wxNO_UNSAFE_WXSTRING_CONV2 disallowing any implicit conversion between wxString and const char *

    This is a follow-up of bug #18113.

    The codec used for converting between wxString and const char* is wxConvLibc. This may not be appropriate for everyone.

    This pull request is to enable the macro wxNO_UNSAFE_WXSTRING_CONV2 that, when set, disallows any implicit conversion to and from const char*. An encoding must always be indicated instead.

    In order to let everything compile with and without the macro, all the inline strings must be converted from char to wchar_t.

    tests needed 
    opened by ardovm 88
  • wxExecute() bug with Unix child processes closing all their open descriptors

    wxExecute() bug with Unix child processes closing all their open descriptors

    Issue migrated from trac ticket # 10258

    component: base | priority: normal | resolution: fixed | keywords: wxProcess wxExecute

    2008-12-10 09:42:39: lmichalski (Lukasz Michalski) created the issue


    wxEndProcessFDIOHandler::OnExceptionWaiting is called when child process exits and closes all its descriptors.

    On recent linux kernels (I've tested 2.6.25 to 2.6.27) process descriptors are closed first, then process changes state from Running to 'On Hold' and remains in that state until waitpid is called.

    If controlling pipe notification arrives before child process changed its state waitpid with WNOHANG flag returns 0.

    In this case wxEndProcessFDIOHandler assumes that only pipe was closed and pretends that process exited.

    Lack of subsequent waitpid() calls leaves child process in "On Hold" state forever.

    My solution to this problem is to remove WNOHANG flag from wxEndProcessFDIOHandler::OnExceptionWaiting. This could possibly lock parent process if child will do something nasty to controlling pipe, but for now I don't see better solution to this.

    base v3.0 
    opened by wxtrac 87
  • Merge 'dynamic notebook' branch of AUI

    Merge 'dynamic notebook' branch of AUI

    Issue migrated from trac ticket # 14756

    component: wxAui | priority: normal | resolution: wontfix | keywords: aui notebook dynamic

    2012-10-17 22:22:50: mmacleod (Malcolm MacLeod) created the issue


    Please find attached a patch containing all changes from the 'dynamic notebook' branch of AUI that I have been maintaining. While far from perfect at this point I think that it is time (and the pragmatic thing to do) to go ahead with this and then iron out the problems as they happen, with my work load and the huge amount of other patches coming in it is unlikely that a better opportunity will arise to do this merge and if we wait too much longer we risk it just becoming simply impossible. It is also crucial I think that this must make it into wxWidgets 3, and therefore 2.9.5 is the last opportunity for proper testing and stability fixes, so it makes sense to push this before 2.9.5

    This patch regresses the following revisions that will have to be looked at again after merging (one of them overly critical I don't think): 72641 72627 71560

    The following (minor) documentation patches will have to be looked at again and/or redone, I unfortunately don't have the time currently for this, but can try get around to it in the coming weeks after the merge, of course if anybody else wants to assist thats even better... 72686 72418 71907 71204 70807 70708 70691 70541 70248 70183 69280 69267 67428 67280 67279 66698 66670 66007 65096 64940

    In addition to the above there are some small visual regressions in wxAuiNotebook art to look into, and probably also various other wxAuiNotebook regressions that will appear with more testing. The new functionality of course is also bound to have numerous bugs.

    invalid feature 
    opened by wxtrac 81
  • Doc/View framework for wxAUI MDI

    Doc/View framework for wxAUI MDI

    Issue migrated from trac ticket # 8945

    component: wxAui | priority: normal | resolution: outdated | keywords: wxAuiDocMDI

    2008-01-07 13:22:33: ru10 created the issue


    Here is my patch for including Doc/View framework into wxAUI MDI concept.

    I created the classes wxAuiDocMDIParent/ChildFrame which derives from the corresponding wxAuiMDI classes. I took back the wxDocMDI code and adapted it to the wxAui needs.

    I thus added the files tabdocmdi.h/cpp and modified the VS project of wxAUI and wxWidgets to take them in care. I created a sample app but you should probably create de folder 'samples\auidocvwmdi' before applying the patch. Moreover, I created the related doc in tex format. The doc makes reference to the wxAuiMDI classes which do not exist at this time.

    It seem to work fine under Windows XP sp2, I do not test it under other platforms.

    I'm waiting for any remark, critic, idea...

    invalid v3.0 feature 
    opened by wxtrac 79
  • Modern HTTP(s) Support

    Modern HTTP(s) Support

    This is my proposal for a simple HTTP request class which would allow modern HTTP and HTTP/s connections based on APIs provided by the operating system.

    Please have a look at the interface file to see the complete documentation.

    Usage would look like this:

    // Create the request object
    wxObjectDataPtr<wxWebRequest> request(
        wxWebSession::GetDefault().CreateRequest("https://www.wxwidgets.org/downloads/logos/blocks.png"));
    // Bind events
    request->Bind(wxEVT_WEBREQUEST_STATE, [](wxWebRequestEvent& evt) {
        switch (evt.GetState())
        {
            // Request completed
            case wxWebRequest::State_Completed:
            {
                wxImage logoImage(*evt->GetResponse()->GetStream());
                if (logoImage.IsOK())
                    wxLogInfo("Image loaded");
                break;
            }
            // Request failed
            case wxWebRequest::State_Failed:
                wxLogError("Could not load logo: %s", evt.GetErrorDescription());
                break;
        }
    });
    // Start the request
    request->Start();
    

    As always any feedback is welcome. I don't have an ETA on when or if I would implement this, but I've experience with the proposed underlying APIs and it should be easy to get started.

    Initial todo for a basic (but functional) implementation:

    • [x] Interface Documentation
    • [x] Finalize API
      • [x] Storage_File event params
      • [x] Storage_None event params
      • [x] Authentification params and event
    • [x] Add generic wxCredentialEntryDialog
    • [x] Sample application with common usage scenarios
    • [x] WinHTTP implementation
    • [ ] NSURLSession implementation
    • [x] libcurl implementation
    • [ ] Improve error handling

    Further improvements in the future could be:

    The following APIs would be used:

    Operating SystemAPIHTTPSHTTP/2
    Windows WinHTTP Yes Windows 10 1607
    macOS NSURLSession macOS 10.9 macOS 10.11
    iOS NSURLSession iOS 7.0 iOS 9.0
    Linux libcurl Yes 7.47.0

    Sample App Screenshots

    image image

    high priority 
    opened by TcT2k 79
  • Make wxWidgets Per-Monitor DPI-Aware

    Make wxWidgets Per-Monitor DPI-Aware

    This PR makes wxWidgets Per-Monitor DPI-Aware on Windows.

    Per-Monitor DPI support is added for standard (GDI-based) Windows controls and controls drawn using wxDC*. Other objects, like wxBitmap, wxImage, wxDC*, wxGraphicsContext, wxGLCanvas and any other image/drawing related controls are not affected.
    *The font in wxDC based controls will change if it has an associated wxWindow, anything else (e.g. line width) is based on the DPI of the main monitor.


    In short, it works as follows:

    • When a new top-level window is created:
      • Check if the process is Per-Monitor DPI-Aware, and if so:
      • Determine active DPI.
      • Adjust the PPI of the fonts to the new DPI.
    • React to WM_DPICHANGED events:
      • Invalidate sizes of the window and all its (non-top-level) children.
      • Call MSWUpdateFontOnDPIChange which will adjust the PPI of the wxFont to the new DPI. This function can be overridden by classes implementing wxWindow to do their own DPI specific handling.
      • Generate the new wxDPIChangedEvent to inform application.
      • Change the window size to the new size suggested by WM_DPICHANGED.
    • Let FromDIP(), ToDIP() and GetContentScaleFactor() use the active DPI of the window.

    It is usable with Windows 10 Creators Update (build 1703) or later, as it correctly scales Checkboxes, RadioButtons and other native GUI items, and all non-client areas (blog).

    To use it, add <dpiAwareness>PerMonitorV2</dpiAwareness> to the manifest. This option is currently not available directly in Visual Studio. Move (a dialog of) the application to a monitor with a different DPI, or change the DPI of the current monitor, and voilà.

    Patch to enable Per-Monitor DPI-Awareness in samples for CMake build system.
     build/cmake/functions.cmake | 1 +
     samples/dpi.manifest        | 8 ++++++++
     2 files changed, 9 insertions(+)
    
    diff --git a/build/cmake/functions.cmake b/build/cmake/functions.cmake
    index 6e0e528c0d..7397b62780 100644
    --- a/build/cmake/functions.cmake
    +++ b/build/cmake/functions.cmake
    @@ -622,6 +622,7 @@ function(wx_add_sample name)
                 # Include default sample.rc
                 list(APPEND src_files ${wxSOURCE_DIR}/samples/sample.rc)
             endif()
    +        list(APPEND src_files ${wxSOURCE_DIR}/samples/dpi.manifest)
         elseif(APPLE AND NOT IPHONE)
             list(APPEND src_files ${wxSOURCE_DIR}/src/osx/carbon/wxmac.icns)
         endif()
    diff --git a/samples/dpi.manifest b/samples/dpi.manifest
    new file mode 100644
    index 0000000000..5891f961eb
    --- /dev/null
    +++ b/samples/dpi.manifest
    @@ -0,0 +1,8 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
    +  <asmv3:application>
    +    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
    +      <dpiAwareness>PerMonitorV2</dpiAwareness>
    +    </asmv3:windowsSettings>
    +  </asmv3:application>
    +</assembly>
    

    The table in the collapsed panel below shows the results of the wxWidgets components tested for Per-Monitor DPI-Awareness.

    Test Results (last updated 28-04-2019)

    | Object | Result | Comment | | :--- | :---: | :--- | | Controls | | | | wxActivityIndicator | ☑ | | | wxAddRemoveCtrl | ☑ | | | wxAnimationCtrl | ☑ | | | wxBitmapButton | ☑ | | | wxBitmapComboBox | ☑ | | | wxBitmapToggleButton | ☑ | | | wxButton | ☑ | | | wxCalendarCtrl | ☑ | | | wxCheckBox | ☑ | | | wxCheckListBox | ☑ | | | wxChoice | ☑ | | | wxCollapsibleHeaderCtrl | ☑ | | | wxCollapsiblePane | ☑ | | | wxComboBox | ☑ | | | wxComboCtrl | ☑ | | | wxCommandLinkButton | ☑ | | | wxDataViewCtrl | ☑ | | | wxDataViewListCtrl | ☑ | | | wxDataViewTreeCtrl | ☑ | | | wxGenericDirCtrl | ☑ | | | wxEditableListBox | ☑ | | | wxFileCtrl | ☑ | | | wxGauge | ☑ | | | wxHeaderCtrlSimple | ☑ | | | wxHyperlinkCtrl | ☑ | | | wxListBox | ☑ | | | wxListCtrl | ☑ | Report and List view | | wxNativeWindow | ☑ | | | wxOwnerDrawnComboBox | ☑ | | | wxRadioBox | ☑ | | | wxRadioButton | ☑ | | | wxRearrangeList | ☑ | | | wxScrollBar | ☑ | | | wxSearchCtrl | ☑ | | | wxSimpleHtmlListBox | ☑ | | | wxSlider | ☑ | | | wxSpinButton | ☑ | | | wxSpinCtrl | ☑ | | | wxSpinCtrlDouble | ☑ | | | wxStaticBitmap | ☑ | | | wxStaticBox | ☑ | | | wxStaticLine | ☑ | | | wxStaticText | ☑ | | | wxTextCtrl | ☑ | | | wxToggleButton | ☑ | | | wxTreeCtrl | ☑ | | | wxTreeListCtrl | ☑ | | | wxWebView | ☒ | not supported? Change zoom level? | | Dialogs | | | | wxColourDialog | ☑ | Colour panel does not resize when dialog is opened. Size is correct when dialog is created after a DPI change (native issue) | | wxGenericColourDialog | ☒ | No HiDPI support (not used on Windows) | | wxDirDialog | ☑ | | | wxGenericDirDialog | ☑ | | | wxFileDialog | ☑ | Uses AutoSystemDpiAware when dialog has custom panel | | wxGenericFileDialog | ☑ | | | wxFindReplaceDialog | ☑ | | | wxFontDialog | ☑ | Some controls do not resize. Dialog is fine when created after a DPI change (native issue) | | wxGenericFontDialog | ☑ | | | wxGenericProgressDialog | ☑ | | | wxProgressDialog | ☑ | | | wxMessageDialog | ☑ | | | wxMultiChoiceDialog | ☑ | | | wxNumberEntryDialog | ☑ | | | wxPrintAbortDialog | ☑ | | | wxPropertySheetDialog | ☑ | | | wxRichTextFormattingDialog | ☑ | | | wxRearrangeDialog | ☑ | | | wxRichTextStyleOrganiserDialog | ☑ | | | wxSingleChoiceDialog | ☑ | | | wxSymbolPickerDialog | ☑ | | | wxTextEntryDialog | ☑ | | | wxPasswordEntryDialog | ☑ | | | wxWizard | ☑ | | | Picker Controls | | | | wxColourPickerCtrl | ☑ | | | wxDatePickerCtrl | ☑ | | | wxDirPickerCtrl | ☑ | | | wxFilePickerCtrl | ☑ | | | wxFontPickerCtrl | ☑ | | | wxTimePickerCtrl | ☑ | | | Book Controls | | | | wxChoicebook | ☑ | | | wxListbook | ☑ | | | wxNotebook | ☑ | | | wxSimplebook | ☑ | | | wxToolbook | ☑ | | | wxTreebook | ☑ | | | Other | | | | wxAUI | ☐ | | | wxGrid | ☐ | | | wxMDIParentFrame | ☒ | needs its own WM_DPICHANGED event handling | | wxMenu | ☑ | | | wxPropertyGrid | ☑ | | | wxPopupWindow | ☒ | Support can be added by moving DPI Event handling from wxTopLevelWindow to wxNonOwnedWindow | | wxRibbon | ☐ | | | wxRichTextCtrl | ☑ | | | wxStatusBar | ☑ | | | wxStyledTextCtrl | ☑ | Zoom-level and margin width adjusted | | wxToolBar | ☑ | |


    It seems checkboxes cannot be used inside tables, so Unicode symbols are used

    | Not Tested | Success | Failure | | --- | --- | --- | | ☐ | ☑ | ☒ | | &#9744; | &#9745; | &#9746; |

    review needed 
    opened by MaartenBent 73
  • crash under OS X 10.9 when using the 10.9 Xcode build environment of Mavericks

    crash under OS X 10.9 when using the 10.9 Xcode build environment of Mavericks

    Issue migrated from trac ticket # 15589

    component: wxOSX | priority: normal | resolution: fixed

    2013-10-17 11:07:04: rocrail (Rob Versluis) created the issue


    I can run the minimal example on Mac OS X 10.9 Mavericks. But after compiling my own application, which runs OK on Mac OS X 10.8 Mountain Lion, it crashes. How can I fix this problem in my application?

    • thread #1: tid # 0x18d54, 0x00007fff889c108a libstdc++.6.dylibstd::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_M_grab(std::allocator<wchar_t> const&, std::allocator<wchar_t> const&) + 4, queue'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1, address=0x76fffffffc) frame #0: 0x00007fff889c108a libstdc++.6.dylibstd::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_M_grab(std::allocator<wchar_t> const&, std::allocator<wchar_t> const&) + 4 frame #1: 0x00007fff889c1656 libstdc++.6.dylibstd::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) + 32 frame #2: 0x0000000100b47f24 libwx_osx_cocoau-3.0.dylibwxLog::IsLevelEnabled(unsigned long, wxString) + 84 frame #3: 0x0000000100bf6afd libwx_osx_cocoau-3.0.dylibwxCSConv::DoCreate() const + 61 frame #4: 0x0000000100bf8dea libwx_osx_cocoau-3.0.dylibwxGet_wxConvLocalPtr() + 106 frame #5: 0x0000000100bfa9f3 libwx_osx_cocoau-3.0.dylib_GLOBAL__I_a + 419 frame #6: 0x00007fff5fc11c2e dyldImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 268 frame #7: 0x00007fff5fc11dba dyldImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40 frame #8: 0x00007fff5fc0ea62 dyldImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 308 frame #9: 0x00007fff5fc0e9eb dyldImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 189 frame #10: 0x00007fff5fc0e8f6 dyldImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 54 frame #11: 0x00007fff5fc021da dylddyld::initializeMainExecutable() + 189 frame #12: 0x00007fff5fc05560 dylddyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 2419 frame #13: 0x00007fff5fc0127b dylddyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 477 frame #14: 0x00007fff5fc0105e dyld_dyld_start + 54
    macOS v3.0.0 
    opened by wxtrac 65
  • Bind() doesn't work with protected and private inheritance

    Bind() doesn't work with protected and private inheritance

    Issue migrated from trac ticket # 17623

    component: base | priority: low | resolution: fixed | keywords: work-needed

    2016-08-10 11:28:32: tambre (Raul Tambre) created the issue


    Whenever a class is derived from a class for which events can be bound and the inheritance of the class is either private or protected, the Bind() fails with a compile-time error about the conversion to wxEvtHandler* being inaccessible.

    The error message on MSVC14 is as follows:

    wxWidgets\include\wx/meta/convertible.h(31): error C2243: 'type cast': conversion from 'Test *' to 'wxEvtHandler *' exists, but is inaccessible
      wxWidgets\include\wx/event.h(335): note: see reference to class template instantiation 'wxConvertibleTo<Class,wxEvtHandler>' being compiled
              with
              [
                  Class=Test
              ]
      wxWidgets\include\wx/event.h(3568): note: see reference to class template instantiation 'wxEventFunctorMethod<EventTag,Test,EventArg,EventHandler>' being compiled
              with
              [
                  EventTag=wxEventTypeTag<wxSizeEvent>,
                  EventArg=wxSizeEvent,
                  EventHandler=Test
              ]
      Test.cpp(78): note: see reference to function template instantiation 'void wxEvtHandler::Bind<wxEventTypeTag<wxSizeEvent>,Test,wxSizeEvent,Test>(const EventTag &,void (__cdecl Test::* )(EventArg &),EventHandler *,int,int,wxObject *)' being compiled
              with
              [
                  EventTag=wxEventTypeTag<wxSizeEvent>,
                  EventArg=wxSizeEvent,
                  EventHandler=Test
              ]
    

    The issue was discovered as a bug in this SO question: http://stackoverflow.com/questions/38833116/conversion-in-derived-class-inaccessible-if-base-class-is-protected

    The error is caused by the wxConvertibleTo template incorrectly not detecting that protected and private inheritance is also fine.

    I have attached a minimal sample and a patch for C++11 versions. I would like to get the patch merged, but I'm guessing it would likely require making it work with the ancient compilers wxWidgets supports.

    low priority base v3.1.0 
    opened by wxtrac 61
  • The new Generic wxFileCtrl

    The new Generic wxFileCtrl

    Issue migrated from trac ticket # 8690

    priority: normal

    2007-07-29 18:18:30: xeee created the issue


    This patch renames the existing wxFileCtrl to wxFileList(I think it's a proper name, it just displays a file list and it's even inherited from wxListCtrl) and adds the new generic wxFileCtrl to the current trunk along with its latex docs and a page in widgets sample for the new control. The only part that is not very ready is the sample, but the control itself and its docs are fine, I'm working on the sample right now and I'll send a newer version soon.

    opened by wxtrac 58
  • wxMemoryDC::DrawBitmap() with a bitmap with alpha loses the existing memory DC contents

    wxMemoryDC::DrawBitmap() with a bitmap with alpha loses the existing memory DC contents

    Issue migrated from trac ticket # 14403

    component: wxMSW | priority: normal | resolution: fixed | keywords: DrawBitmap alpha

    2012-06-15 11:55:08: GP89 (Paul) created the issue


    Link to question on wxpython user list: [https://groups.google.com/forum/?fromgroups#!topic/wxpython-users/Iqtjj37sxXo ]

    I'm experiencing a weird problem on windows where I create a bitmap in a memory dc, but if I try and draw a bitmap onto it with DrawBitmap I lose everything else in the image.

    As Robin pointed out in my post the issue can be fixed by setting the banner_bmp image to use a bit depth of 24

    I've attached a sample showing the issue and the bitmap in question (although other pngs I've tried all have the same effect)

    windows 7 64bit, python 2.7.3 32bit, wx 2.8.12.1 (msw-unicode)

    MSW v3.0 
    opened by wxtrac 57
  • Conflict between _T macro and Sun Studio 12 headers

    Conflict between _T macro and Sun Studio 12 headers

    Issue migrated from trac ticket # 10660

    component: base | priority: high | resolution: fixed | keywords: _T() macro-conflict suncc

    2009-03-30 11:02:31: jroemmler (Jochen Roemmler) created the issue


    Hi, I'm compiling and using wxWidgets library in various versions and platforms on a number of different machines. Lately, I came across a serious problem with macro _T which is defined in wxWidgets header files (see [http://docs.wxwidgets.org/stable/wx_stringfunctions.html#underscoret]). A simple "program" like this won't compile any longer:

    // file bad.cpp
    #include <wx/wx.h>
    
    # /opt/SUNWspro/bin/CC -V
    CC: Sun C++ 5.8 Patch 121018-18 2009/02/25
    # /opt/SUNWspro/bin/CC -I/usr/local/wxWidgets-2.6.3/build_Motif_CC_shared/lib/wx/include/motif-ansi-release-2.6 -I/usr/local/wxWidgets-2.6.3/include -I/usr/local/wxWidgets-2.6.3/contrib/include -D__WXMOTIF__ -I/usr/openwin/include -I/usr/dt/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -xarch=amd64 -o /dev/null -c bad.cpp
    "/opt/SUNWspro/prod/include/CC/Cstd/./memory", line 107: Error: Type name expected instead of "{".
    "/opt/SUNWspro/prod/include/CC/Cstd/./string", line 850:     Where: While specializing "__rwstd::__rw_basis<__rwstd::_T, __rwstd::_Base>".
    "/opt/SUNWspro/prod/include/CC/Cstd/./string", line 850:     Where: Specialized in std::string .
    "/opt/SUNWspro/prod/include/CC/Cstd/./stdexcept", line 65:     Where: Specialized in non-template code.
    

    The problem is because _T is also used in template code by latest Sun Studio (11 and 12) STL header files (see my posting here: [http://forums.sun.com/thread.jspa?threadID=5376645]). I think using names with underscore-prefix in (public) header files is definitely a bad idea.

    My suggestion for wxWidgets 3.0 would be to break source code compatibility and get rid of _T() (and _() while we're at it); using existing wxT() instead is a simple search'n'replace operation - or making it a #define like so:

    #ifdef wxUSE_DEPRECATED_T_MACRO #define T ... #else do not define _T because it may lead to name clashes in user code _ or STL compiler header files. #endif

    What do you think? Jochen

    high priority build base 
    opened by wxtrac 57
  • menu

    menu "Window"

    Describe the bug menu "Window"

    Expected vs observed behaviour menu Window items arent working. Menu "Window" sometimes goes before help sometimes it lands last on menuBar. I would like to be able to hide it. i just downloaded and built lib.

    Patch or snippet allowing to reproduce the problem MainFrame::MainFrame(const wxString& title,wxPoint point,wxSize size): wxAuiMDIParentFrame(NULL, wxID_ANY, title,point,size){

    wxMenu* fileMenu = new wxMenu; wxMenu* sifrantiMenu = new wxMenu; wxMenu* workMenu = new wxMenu; wxMenu* toolsMenu = new wxMenu; wxMenu* helpMenu = new wxMenu;

    sifrantiMenu->Append(sifrClientMenu);
    

    } **--------------------------------------------------------------------------- { wxClient frameClient = new wxClient(this, includeWinID::DN_WIN_SIFR_CLIENTS, _T("Clients")); //DN_WIN_SIFR_CLIENTS frameClient->Show(true); }

    class wxClient :public wxEditor,public wxAddressDetails, public wxBankDetails {}

    class wxEditor :public wxAuiMDIChildFrame {}

    it will not close the frame

    Platform and version information

    • wxWidgets version you use: 3.1.7
    • wxWidgets port you use: wxGTK
    • OS and its version: debian bookworm
    • For wxGTK only:
      • GTK version: 3
      • Which GDK backend is used: X11
      • If relevant, i.e. for appearance-related problems: Mate default
    opened by Stormfinger 1
  • Difference in handling SetCursor() on dragging in wxListCtrl

    Difference in handling SetCursor() on dragging in wxListCtrl

    Describe the bug There is a difference in handling SetCursor() during the DnD operation in wxListCtrl.

    Expected vs observed behaviour I expect the cursor to change appropriately on all 3 platforms, however only MSW works fine.

    Patch or snippet allowing to reproduce the problem

    --- minimal_orig.cpp 2022-05-08 16:54:31.000000000 -0500 +++ minimal.cpp 2022-05-08 16:50:12.000000000 -0500 @@ -18,7 +18,7 @@

    // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h"

    +#include "wx/listctrl.h"

    // for all others, include the necessary headers (this file is usually all you // need because it includes almost all "standard" wxWidgets headers) @@ -63,8 +63,12 @@ // event handlers (these functions should not be virtual) void OnQuit(wxCommandEvent& event); void OnAbout(wxCommandEvent& event);

    • void OnBeginDrag(wxListEvent &event);
    • void OnLeftUp(wxMouseEvent &event);

    private:

    • bool m_isDragging;
    • wxListCtrl *left; // any class wishing to process wxWidgets events must use this macro wxDECLARE_EVENT_TABLE(); }; @@ -143,7 +147,21 @@ { // set the frame icon SetIcon(wxICON(sample));
    • auto panel = new wxPanel( this, wxID_ANY );
    • left = new wxListCtrl( panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_NO_HEADER );
    • auto right = new wxListCtrl( panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_NO_HEADER );
    • left->AppendColumn( "" );
    • right->AppendColumn( "" );
    • left->InsertItem( 0, "Test" );
    • left->SetCursor( wxCURSOR_HAND );
    • right->SetCursor( wxCURSOR_HAND );
    • auto sizer = new wxBoxSizer( wxHORIZONTAL );
    • sizer->Add( left, 0, wxEXPAND, 0 );
    • sizer->Add( right, 0, wxEXPAND, 0 );
    • panel->SetSizer( sizer );
    • Layout();
    • left->Bind( wxEVT_LIST_BEGIN_DRAG, &MyFrame::OnBeginDrag, this );
    • Bind( wxEVT_LEFT_UP, &MyFrame::OnLeftUp, this ); #if wxUSE_MENUBAR // create a menu bar wxMenu *fileMenu = new wxMenu; @@ -201,3 +219,27 @@ wxOK | wxICON_INFORMATION, this); }

    +void MyFrame::OnBeginDrag(wxListEvent &event) +{

    • int flags;
    • const wxPoint& pt = event.m_pointDrag;
    • auto left = dynamic_cast<wxListCtrl *>( event.GetEventObject() );
    • left->SetCursor( wxCURSOR_WAIT );
    • int itemPos = left->HitTest( pt, flags );
    • auto m_item = left->GetItemText( left->HitTest( pt, flags ) );
    • m_isDragging = true;
    • this->CaptureMouse(); +}

    +void MyFrame::OnLeftUp(wxMouseEvent &event) +{

    • const wxPoint pt = event.GetPosition();
    • if( m_isDragging )
    • {
    •    left->SetCursor( wxCURSOR_HAND );
      
    •    ReleaseMouse();
      
    • }
    • event.Skip(); +}

    To Reproduce Steps to reproduce the behaviour, please make them as detailed as possible, e.g.

    1. Build the modified sample on Windows and OSX
    2. Run it on Windows.
    3. Move the mouse cursor over the "Test" string. Cursor becomes a hand cursor
    4. Try to drag and drop the string from left control to the right control
    5. Observe the cursor is changing to become a wait cursor
    6. Do the same things on OSX - observe the cursor does not change to ait cursor.

    Platform and version information

    • wxWidgets version you use: 3.1.6
    • wxWidgets port you use: wxMSW and wxOSX]
    • OS and its version: Windows 8.1 and macOS 10.13.6
    • For wxGTK only:
      • GTK version: [e.g. 3.24.5]
      • Which GDK backend is used: [X11 or Wayland]
      • If relevant, i.e. for appearance-related problems: [current theme]
    opened by oneeyeman1 0
  • Allow using wxBitmapBundle with wxDataViewBitmapRenderer

    Allow using wxBitmapBundle with wxDataViewBitmapRenderer

    While looking at #22359, I've realized that we couldn't use wxBitmapBundle to show images in wxDVC, so I've fixed this and now the following diff

    diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp
    index 4b2f1d933e..4057a43959 100644
    --- a/samples/dataview/dataview.cpp
    +++ b/samples/dataview/dataview.cpp
    @@ -904,7 +904,7 @@ void MyFrame::BuildDataViewCtrl(wxPanel* parent, unsigned int nPanel,
                 wxDataViewColumn* const colCheckIconText = new wxDataViewColumn
                     (
                          L"\u2714 + icon + text",
    -                     new wxDataViewCheckIconTextRenderer(),
    +                     new wxDataViewBitmapRenderer(), // also works with explicit "wxBitmap"
                          MyListModel::Col_ToggleIconText,
                          wxCOL_WIDTH_AUTOSIZE
                     );
    diff --git a/samples/dataview/mymodels.cpp b/samples/dataview/mymodels.cpp
    index d6d76c2414..5aa6f20388 100644
    --- a/samples/dataview/mymodels.cpp
    +++ b/samples/dataview/mymodels.cpp
    @@ -472,6 +472,11 @@ void MyListModel::GetValueByRow( wxVariant &variant,
                 break;
    
             case Col_ToggleIconText:
    +            if ( row % 2 )
    +                variant << m_icon[row % 2]; // .GetBitmap(wxSize(16, 16)); -- not needed any longer, but still works too
    +            else
    +                variant = wxNullVariant;
    +            break;
                 {
                     wxString text;
                     wxCheckBoxState state;
    

    compiles and works, i.e. shows crisp and not scaled bitmaps in high DPI.

    @vslavik If you could please test this with Poedit, it would be great.

    @MaartenBent @csomor Your review would be welcome as always, TIA!

    opened by vadz 0
  • Fix (not) showing values for empty cells in wxDVC using wxDataViewVirtualListModel in wxGTK

    Fix (not) showing values for empty cells in wxDVC using wxDataViewVirtualListModel in wxGTK

    This should fix #22359 and, AFAICS, doesn't have any negative effects.

    I couldn't find any real explanation about why was this check added in the first place, but there doesn't seem to be any performance reason to not make it even for the virtual list models: it is called for every item in the model, which makes it totally unsuitable for big numbers of items, but this was already the case before anyhow and the extra overhead of calling HasValue() for it shouldn't be noticeable compared to calling GetValue(). But please let me know if I'm missing anything here or, also, if there are any other situations in which this still doesn't fix the original problem.

    GTK 
    opened by vadz 1
  • CMake: Support external NanoSVG library

    CMake: Support external NanoSVG library

    Partially based on #22393, but it leaves the other build systems alone.

    Support both header-only NanoSVG library, and NanoSVG library that already have the functions implemented.

    Since upstream NanoSVG doesn't have CMake support, there is no official target name or namespace to check. Currently it checks for NanoSVG::nanosvg and NanoSVG::nanosvgrast, but this list can easily be extended.

    Default CMake build still uses the old method (including ../../3rdparty/nanosvg/src/nanosvg.h), but it can also use external build without implementation using:

        set(wxUSE_NANOSVG_EXTERNAL 1 PARENT_SCOPE)
        set(NANOSVG_LIBRARIES )
        set(NANOSVG_INCLUDE_DIRS "${wxSOURCE_DIR}/3rdparty/nanosvg/src")
    
    opened by MaartenBent 0
  • Documentation of predefined colors with wrong description

    Documentation of predefined colors with wrong description

    The description of the function bool wxFromString( const wxString& string, wxColour* colour ) is also displayed as the description for all predefined colors.

    This issue appears to exist since wxWidgets-3.1.4 (or maybe 3.1.3, did not check this version). Anyway, the documentation of wxWidgets-3.1.2 does not display a wrong description.

    It can also be seen in the latest documentation.

    documentation 
    opened by taler21 1
Releases(v3.1.6)
Owner
Cross-Platform GUI Library
null
Purely native C++ cross-platform GUI framework for Android and iOS development. https://www.boden.io

BODEN CROSS-PLATFORM FRAMEWORK Build purely native cross-platform experiences with Boden Website ⬡ Getting Started ⬡ API Reference ⬡ Guides ⬡ Twitter

Ashampoo Systems GmbH & Co KG 1.5k May 18, 2022
Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.

libui: a portable GUI library for C This README is being written. Status It has come to my attention that I have not been particularly clear about how

Pietro Gagliardi 10.2k May 7, 2022
A library for creating native cross-platform GUI apps

Yue A library for creating native cross-platform GUI apps. Getting started Documentations FAQ Development Examples Sample apps (with screenshots) Muba

Yue 2.8k May 16, 2022
Build performant, native and cross-platform desktop applications with Node.js and CSS like styling. 🚀

NodeGui Build performant, native and cross-platform desktop applications with Node.js and CSS like styling. ?? NodeGUI is powered by Qt5 ?? which make

NodeGui 7.7k May 13, 2022
Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS.

?? Available Translations: ???? ???? ???? ???? ???? ???? ???? ???? . View these docs in other languages at electron/i18n. The Electron framework lets

Electron 101.7k May 16, 2022
A minimalist andf platform-agnostic application layer for writing graphical applications, with a strong emphasis on simplicity and ease of use.

SlimApp A minimalist(*) and platform-agnostic application layer for writing graphical applications. Available as either a single header file or a dire

Arnon Marcus 33 Apr 22, 2022
Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui

ImGuizmo Latest stable tagged version is 1.83. Current master version is 1.84 WIP. What started with the gizmo is now a collection of dear imgui widge

Cedric Guillemet 2k May 17, 2022
U++ is a C++ cross-platform rapid application development framework focused on programmer's productivity. It includes a set of libraries (GUI, SQL, Network etc.), and integrated development environment (TheIDE).

Ultimate++ Ultimate++ is a C++ cross-platform rapid application development framework focused on programmers productivity. It includes a set of librar

Ultimate++ 435 May 12, 2022
A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs.

webview for golang and c/c++ A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. The goal of the project is to

polevpn 11 Apr 14, 2022
A single-header ANSI C immediate mode cross-platform GUI library

Nuklear This is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed a

Immediate Mode UIs, Nuklear, etc. 5.6k May 9, 2022
A cross-platform GUI for jzIntv

jzIntvImGui Welcome to jzIntvImGui! It's an all-in-one powerful Dear ImGui interface which allows you to manage your collection of Intellivision games

null 4 May 8, 2022
Cross-platform GUI library

Harbour Nuklear backend This backend provides support for Nuklear. It works on on all supported platforms with an OpenGL backend, including iOS and An

Rafał Jopek 2 Jan 19, 2022
FLTK - Fast Light Tool Kit - a cross-platform C++ GUI toolkit for UNIX(r)/Linux(r) (X11)

FLTK - Fast Light Tool Kit - a cross-platform C++ GUI toolkit for UNIX(r)/Linux(r) (X11)

The FLTK Team 894 May 18, 2022
This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI

ImGui Goodies This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI. Currently, th

null 92 Apr 29, 2022
Framework Open EDA Gui

FOEDAG FOEDAG denotes Qt-based Framework Open EDA Gui Documentation FOEDAG's full documentation includes tutorials, tool options and contributor guide

The Open-Source FPGA Foundation 22 May 4, 2022
Open Source, cross platform C++ library providing integration of VulkanSceneGraph with Qt windowing

Open Source, cross platform C++ library providing integration of VulkanSceneGraph with Qt windowing. Supports Windows, Linux and macOS.

Vulkan made easy 8 May 13, 2022
Examples, tutorials and applications for the LVGL embedded GUI library

Examples, tutorials and applications for the LVGL embedded GUI library

LVGL 417 May 10, 2022
FlatUI is a immediate mode C++ GUI library for games and graphical applications.

FlatUI is a immediate mode C++ GUI library for games and graphical applications. Go to our landing page to browse our documentation.

Google 595 May 10, 2022
The HorusUI library allows you to quickly develop GUIs for your applications by leveraging the ease of use provided by immediate mode GUI concepts.

Immediate Mode Graphical User Interface for Tools OVERVIEW The HorusUI library allows you to quickly develop GUIs for your applications by leveraging

null 128 May 6, 2022