You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.1 KiB

  1. #ifndef DIALOG_SHIM_
  2. #define DIALOG_SHIM_
  3. /*
  4. * This program source code file is part of KiCad, a free EDA CAD application.
  5. *
  6. * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
  7. * Copyright (C) 2012 KiCad Developers, see CHANGELOG.TXT for contributors.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, you may find one here:
  21. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  22. * or you may search the http://www.gnu.org website for the version 2 license,
  23. * or you may write to the Free Software Foundation, Inc.,
  24. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  25. */
  26. #include <wx/dialog.h>
  27. #include <hashtables.h>
  28. #if wxMINOR_VERSION == 8 && defined(__WXGTK__)
  29. #define DLGSHIM_USE_SETFOCUS 1
  30. #else
  31. #define DLGSHIM_USE_SETFOCUS 0
  32. #endif
  33. /**
  34. * Class DIALOG_SHIM
  35. * may sit in the inheritance tree between wxDialog and any class written by
  36. * wxFormBuilder. To put it there, use wxFormBuilder tool and set:
  37. * <br> subclass name = DIALOG_SHIM
  38. * <br> subclass header = dialog_shim.h
  39. * <br>
  40. * in the dialog window's properties.
  41. **/
  42. class DIALOG_SHIM : public wxDialog
  43. {
  44. public:
  45. DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& title,
  46. const wxPoint& pos = wxDefaultPosition,
  47. const wxSize& size = wxDefaultSize,
  48. long style = wxDEFAULT_DIALOG_STYLE,
  49. const wxString& name = wxDialogNameStr );
  50. bool Show( bool show ); // overload wxDialog::Show
  51. #if DLGSHIM_USE_SETFOCUS
  52. private:
  53. void onInit( wxInitDialogEvent& aEvent );
  54. #endif
  55. };
  56. #endif // DIALOG_SHIM_